aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEinar Johan Trøan Sømåen2012-06-22 13:56:51 +0200
committerEinar Johan Trøan Sømåen2012-06-22 13:56:51 +0200
commit5a5fd609f13ef8754fb256d7ed3d774f51100ebb (patch)
treeee700071ac48f7a3b559382b072d00a68a6ff6a4
parent9b26ea4f7f363c187a2f4be21133d9c77fb46bd6 (diff)
downloadscummvm-rg350-5a5fd609f13ef8754fb256d7ed3d774f51100ebb.tar.gz
scummvm-rg350-5a5fd609f13ef8754fb256d7ed3d774f51100ebb.tar.bz2
scummvm-rg350-5a5fd609f13ef8754fb256d7ed3d774f51100ebb.zip
WINTERMUTE: Rename the functions and arguments in BPersistMgr
-rw-r--r--engines/wintermute/Ad/AdActor.cpp56
-rw-r--r--engines/wintermute/Ad/AdEntity.cpp24
-rw-r--r--engines/wintermute/Ad/AdGame.cpp64
-rw-r--r--engines/wintermute/Ad/AdInventory.cpp8
-rw-r--r--engines/wintermute/Ad/AdInventoryBox.cpp28
-rw-r--r--engines/wintermute/Ad/AdItem.cpp30
-rw-r--r--engines/wintermute/Ad/AdLayer.cpp16
-rw-r--r--engines/wintermute/Ad/AdNodeState.cpp18
-rw-r--r--engines/wintermute/Ad/AdObject.cpp78
-rw-r--r--engines/wintermute/Ad/AdPath.cpp10
-rw-r--r--engines/wintermute/Ad/AdPathPoint.cpp10
-rw-r--r--engines/wintermute/Ad/AdRegion.cpp12
-rw-r--r--engines/wintermute/Ad/AdResponse.cpp24
-rw-r--r--engines/wintermute/Ad/AdResponseBox.cpp38
-rw-r--r--engines/wintermute/Ad/AdResponseContext.cpp8
-rw-r--r--engines/wintermute/Ad/AdRotLevel.cpp6
-rw-r--r--engines/wintermute/Ad/AdScaleLevel.cpp6
-rw-r--r--engines/wintermute/Ad/AdScene.cpp110
-rw-r--r--engines/wintermute/Ad/AdSceneNode.cpp10
-rw-r--r--engines/wintermute/Ad/AdSceneState.cpp6
-rw-r--r--engines/wintermute/Ad/AdSentence.cpp42
-rw-r--r--engines/wintermute/Ad/AdSpriteSet.cpp8
-rw-r--r--engines/wintermute/Ad/AdTalkDef.cpp14
-rw-r--r--engines/wintermute/Ad/AdTalkHolder.cpp10
-rw-r--r--engines/wintermute/Ad/AdTalkNode.cpp18
-rw-r--r--engines/wintermute/Ad/AdWaypointGroup.cpp16
-rw-r--r--engines/wintermute/Base/BEvent.cpp10
-rw-r--r--engines/wintermute/Base/BFader.cpp30
-rw-r--r--engines/wintermute/Base/BFont.cpp4
-rw-r--r--engines/wintermute/Base/BFontBitmap.cpp26
-rw-r--r--engines/wintermute/Base/BFontStorage.cpp10
-rw-r--r--engines/wintermute/Base/BFontTT.cpp28
-rw-r--r--engines/wintermute/Base/BFontTT.h8
-rw-r--r--engines/wintermute/Base/BFrame.cpp24
-rw-r--r--engines/wintermute/Base/BGame.cpp148
-rw-r--r--engines/wintermute/Base/BKeyboardState.cpp22
-rw-r--r--engines/wintermute/Base/BObject.cpp98
-rw-r--r--engines/wintermute/Base/BPersistMgr.cpp382
-rw-r--r--engines/wintermute/Base/BPersistMgr.h55
-rw-r--r--engines/wintermute/Base/BPoint.cpp6
-rw-r--r--engines/wintermute/Base/BRegion.cpp16
-rw-r--r--engines/wintermute/Base/BScriptHolder.cpp12
-rw-r--r--engines/wintermute/Base/BScriptable.cpp10
-rw-r--r--engines/wintermute/Base/BSound.cpp30
-rw-r--r--engines/wintermute/Base/BSprite.cpp52
-rw-r--r--engines/wintermute/Base/BSubFrame.cpp48
-rw-r--r--engines/wintermute/Base/BSurfaceStorage.cpp8
-rw-r--r--engines/wintermute/Base/BViewport.cpp12
-rw-r--r--engines/wintermute/Base/PartEmitter.cpp106
-rw-r--r--engines/wintermute/Base/PartForce.cpp10
-rw-r--r--engines/wintermute/Base/PartParticle.cpp48
-rw-r--r--engines/wintermute/Base/file/BSaveThumbFile.cpp2
-rw-r--r--engines/wintermute/Base/scriptables/SXArray.cpp8
-rw-r--r--engines/wintermute/Base/scriptables/SXDate.cpp18
-rw-r--r--engines/wintermute/Base/scriptables/SXFile.cpp16
-rw-r--r--engines/wintermute/Base/scriptables/SXMath.cpp4
-rw-r--r--engines/wintermute/Base/scriptables/SXMemBuffer.cpp12
-rw-r--r--engines/wintermute/Base/scriptables/SXStore.cpp26
-rw-r--r--engines/wintermute/Base/scriptables/SXStore.h10
-rw-r--r--engines/wintermute/Base/scriptables/SXString.cpp12
-rw-r--r--engines/wintermute/Base/scriptables/ScEngine.cpp16
-rw-r--r--engines/wintermute/Base/scriptables/ScScript.cpp74
-rw-r--r--engines/wintermute/Base/scriptables/ScStack.cpp8
-rw-r--r--engines/wintermute/Base/scriptables/ScValue.cpp36
-rw-r--r--engines/wintermute/Base/scriptables/SxObject.cpp4
-rw-r--r--engines/wintermute/Sys/SysClass.cpp36
-rw-r--r--engines/wintermute/Sys/SysClass.h4
-rw-r--r--engines/wintermute/Sys/SysClassRegistry.cpp48
-rw-r--r--engines/wintermute/UI/UIButton.cpp50
-rw-r--r--engines/wintermute/UI/UIEdit.cpp22
-rw-r--r--engines/wintermute/UI/UIEntity.cpp6
-rw-r--r--engines/wintermute/UI/UIObject.cpp44
-rw-r--r--engines/wintermute/UI/UIText.cpp8
-rw-r--r--engines/wintermute/UI/UITiledImage.cpp26
-rw-r--r--engines/wintermute/UI/UIWindow.cpp50
-rw-r--r--engines/wintermute/coll_templ.h14
-rw-r--r--engines/wintermute/video/VidTheoraPlayer.cpp32
77 files changed, 1173 insertions, 1286 deletions
diff --git a/engines/wintermute/Ad/AdActor.cpp b/engines/wintermute/Ad/AdActor.cpp
index 3124585bc5..3d4e77565a 100644
--- a/engines/wintermute/Ad/AdActor.cpp
+++ b/engines/wintermute/Ad/AdActor.cpp
@@ -1187,34 +1187,34 @@ CBSprite *CAdActor::GetTalkStanceOld(const char *Stance) {
}
//////////////////////////////////////////////////////////////////////////
-HRESULT CAdActor::Persist(CBPersistMgr *PersistMgr) {
- CAdTalkHolder::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);
+HRESULT CAdActor::Persist(CBPersistMgr *persistMgr) {
+ CAdTalkHolder::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 S_OK;
}
diff --git a/engines/wintermute/Ad/AdEntity.cpp b/engines/wintermute/Ad/AdEntity.cpp
index 71f466fde1..f54f26d466 100644
--- a/engines/wintermute/Ad/AdEntity.cpp
+++ b/engines/wintermute/Ad/AdEntity.cpp
@@ -977,21 +977,21 @@ void CAdEntity::UpdatePosition() {
//////////////////////////////////////////////////////////////////////////
-HRESULT CAdEntity::Persist(CBPersistMgr *PersistMgr) {
- CAdTalkHolder::Persist(PersistMgr);
+HRESULT CAdEntity::Persist(CBPersistMgr *persistMgr) {
+ CAdTalkHolder::Persist(persistMgr);
- PersistMgr->Transfer(TMEMBER(_item));
- PersistMgr->Transfer(TMEMBER(_region));
- //PersistMgr->Transfer(TMEMBER(_sprite));
- PersistMgr->Transfer(TMEMBER_INT(_subtype));
- _talkSprites.Persist(PersistMgr);
- _talkSpritesEx.Persist(PersistMgr);
+ persistMgr->transfer(TMEMBER(_item));
+ persistMgr->transfer(TMEMBER(_region));
+ //persistMgr->transfer(TMEMBER(_sprite));
+ persistMgr->transfer(TMEMBER_INT(_subtype));
+ _talkSprites.Persist(persistMgr);
+ _talkSpritesEx.Persist(persistMgr);
- PersistMgr->Transfer(TMEMBER(_walkToX));
- PersistMgr->Transfer(TMEMBER(_walkToY));
- PersistMgr->Transfer(TMEMBER_INT(_walkToDir));
+ persistMgr->transfer(TMEMBER(_walkToX));
+ persistMgr->transfer(TMEMBER(_walkToY));
+ persistMgr->transfer(TMEMBER_INT(_walkToDir));
- PersistMgr->Transfer(TMEMBER(_theora));
+ persistMgr->transfer(TMEMBER(_theora));
return S_OK;
}
diff --git a/engines/wintermute/Ad/AdGame.cpp b/engines/wintermute/Ad/AdGame.cpp
index 22400accfa..938ad66b12 100644
--- a/engines/wintermute/Ad/AdGame.cpp
+++ b/engines/wintermute/Ad/AdGame.cpp
@@ -1263,50 +1263,50 @@ HRESULT CAdGame::LoadBuffer(byte *Buffer, bool Complete) {
//////////////////////////////////////////////////////////////////////////
-HRESULT CAdGame::Persist(CBPersistMgr *PersistMgr) {
- if (!PersistMgr->_saving) Cleanup();
- CBGame::Persist(PersistMgr);
+HRESULT CAdGame::Persist(CBPersistMgr *persistMgr) {
+ if (!persistMgr->_saving) Cleanup();
+ CBGame::Persist(persistMgr);
- _dlgPendingBranches.Persist(PersistMgr);
+ _dlgPendingBranches.Persist(persistMgr);
- _inventories.Persist(PersistMgr);
- PersistMgr->Transfer(TMEMBER(_inventoryBox));
+ _inventories.Persist(persistMgr);
+ persistMgr->transfer(TMEMBER(_inventoryBox));
- _objects.Persist(PersistMgr);
+ _objects.Persist(persistMgr);
- PersistMgr->Transfer(TMEMBER(_prevSceneName));
- PersistMgr->Transfer(TMEMBER(_prevSceneFilename));
+ persistMgr->transfer(TMEMBER(_prevSceneName));
+ persistMgr->transfer(TMEMBER(_prevSceneFilename));
- PersistMgr->Transfer(TMEMBER(_responseBox));
- _responsesBranch.Persist(PersistMgr);
- _responsesGame.Persist(PersistMgr);
- PersistMgr->Transfer(TMEMBER(_scene));
- _sceneStates.Persist(PersistMgr);
- PersistMgr->Transfer(TMEMBER(_scheduledFadeIn));
- PersistMgr->Transfer(TMEMBER(_scheduledScene));
- PersistMgr->Transfer(TMEMBER(_selectedItem));
- PersistMgr->Transfer(TMEMBER_INT(_talkSkipButton));
+ persistMgr->transfer(TMEMBER(_responseBox));
+ _responsesBranch.Persist(persistMgr);
+ _responsesGame.Persist(persistMgr);
+ persistMgr->transfer(TMEMBER(_scene));
+ _sceneStates.Persist(persistMgr);
+ persistMgr->transfer(TMEMBER(_scheduledFadeIn));
+ persistMgr->transfer(TMEMBER(_scheduledScene));
+ persistMgr->transfer(TMEMBER(_selectedItem));
+ persistMgr->transfer(TMEMBER_INT(_talkSkipButton));
- _sentences.Persist(PersistMgr);
+ _sentences.Persist(persistMgr);
- PersistMgr->Transfer(TMEMBER(_sceneViewport));
- PersistMgr->Transfer(TMEMBER_INT(_stateEx));
- PersistMgr->Transfer(TMEMBER(_initialScene));
- PersistMgr->Transfer(TMEMBER(_debugStartupScene));
+ persistMgr->transfer(TMEMBER(_sceneViewport));
+ persistMgr->transfer(TMEMBER_INT(_stateEx));
+ persistMgr->transfer(TMEMBER(_initialScene));
+ persistMgr->transfer(TMEMBER(_debugStartupScene));
- PersistMgr->Transfer(TMEMBER(_invObject));
- PersistMgr->Transfer(TMEMBER(_inventoryOwner));
- PersistMgr->Transfer(TMEMBER(_tempDisableSaveState));
- _items.Persist(PersistMgr);
+ persistMgr->transfer(TMEMBER(_invObject));
+ persistMgr->transfer(TMEMBER(_inventoryOwner));
+ persistMgr->transfer(TMEMBER(_tempDisableSaveState));
+ _items.Persist(persistMgr);
- PersistMgr->Transfer(TMEMBER(_itemsFile));
+ persistMgr->transfer(TMEMBER(_itemsFile));
- _speechDirs.Persist(PersistMgr);
- PersistMgr->Transfer(TMEMBER(_smartItemCursor));
+ _speechDirs.Persist(persistMgr);
+ persistMgr->transfer(TMEMBER(_smartItemCursor));
- if (!PersistMgr->_saving) _initialScene = false;
+ if (!persistMgr->_saving) _initialScene = false;
- PersistMgr->Transfer(TMEMBER(_startupScene));
+ persistMgr->transfer(TMEMBER(_startupScene));
return S_OK;
diff --git a/engines/wintermute/Ad/AdInventory.cpp b/engines/wintermute/Ad/AdInventory.cpp
index 693f09bcf6..c81e1f4be7 100644
--- a/engines/wintermute/Ad/AdInventory.cpp
+++ b/engines/wintermute/Ad/AdInventory.cpp
@@ -106,12 +106,12 @@ HRESULT CAdInventory::RemoveItem(CAdItem *Item) {
}
//////////////////////////////////////////////////////////////////////////
-HRESULT CAdInventory::Persist(CBPersistMgr *PersistMgr) {
+HRESULT CAdInventory::Persist(CBPersistMgr *persistMgr) {
- CBObject::Persist(PersistMgr);
+ CBObject::Persist(persistMgr);
- _takenItems.Persist(PersistMgr);
- PersistMgr->Transfer(TMEMBER(_scrollOffset));
+ _takenItems.Persist(persistMgr);
+ persistMgr->transfer(TMEMBER(_scrollOffset));
return S_OK;
}
diff --git a/engines/wintermute/Ad/AdInventoryBox.cpp b/engines/wintermute/Ad/AdInventoryBox.cpp
index 8d4720c984..debe74db01 100644
--- a/engines/wintermute/Ad/AdInventoryBox.cpp
+++ b/engines/wintermute/Ad/AdInventoryBox.cpp
@@ -350,20 +350,20 @@ HRESULT CAdInventoryBox::SaveAsText(CBDynBuffer *Buffer, int Indent) {
//////////////////////////////////////////////////////////////////////////
-HRESULT CAdInventoryBox::Persist(CBPersistMgr *PersistMgr) {
- CBObject::Persist(PersistMgr);
-
- PersistMgr->Transfer(TMEMBER(_closeButton));
- PersistMgr->Transfer(TMEMBER(_hideSelected));
- PersistMgr->Transfer(TMEMBER(_itemHeight));
- PersistMgr->Transfer(TMEMBER(_itemsArea));
- PersistMgr->Transfer(TMEMBER(_itemWidth));
- PersistMgr->Transfer(TMEMBER(_scrollBy));
- PersistMgr->Transfer(TMEMBER(_scrollOffset));
- PersistMgr->Transfer(TMEMBER(_spacing));
- PersistMgr->Transfer(TMEMBER(_visible));
- PersistMgr->Transfer(TMEMBER(_window));
- PersistMgr->Transfer(TMEMBER(_exclusive));
+HRESULT CAdInventoryBox::Persist(CBPersistMgr *persistMgr) {
+ CBObject::Persist(persistMgr);
+
+ persistMgr->transfer(TMEMBER(_closeButton));
+ persistMgr->transfer(TMEMBER(_hideSelected));
+ persistMgr->transfer(TMEMBER(_itemHeight));
+ persistMgr->transfer(TMEMBER(_itemsArea));
+ persistMgr->transfer(TMEMBER(_itemWidth));
+ persistMgr->transfer(TMEMBER(_scrollBy));
+ persistMgr->transfer(TMEMBER(_scrollOffset));
+ persistMgr->transfer(TMEMBER(_spacing));
+ persistMgr->transfer(TMEMBER(_visible));
+ persistMgr->transfer(TMEMBER(_window));
+ persistMgr->transfer(TMEMBER(_exclusive));
return S_OK;
}
diff --git a/engines/wintermute/Ad/AdItem.cpp b/engines/wintermute/Ad/AdItem.cpp
index 09a9ef08f4..fd792b3f5b 100644
--- a/engines/wintermute/Ad/AdItem.cpp
+++ b/engines/wintermute/Ad/AdItem.cpp
@@ -728,21 +728,21 @@ const char *CAdItem::ScToString() {
//////////////////////////////////////////////////////////////////////////
-HRESULT CAdItem::Persist(CBPersistMgr *PersistMgr) {
-
- CAdTalkHolder::Persist(PersistMgr);
-
- PersistMgr->Transfer(TMEMBER(_cursorCombined));
- PersistMgr->Transfer(TMEMBER(_cursorHover));
- PersistMgr->Transfer(TMEMBER(_cursorNormal));
- PersistMgr->Transfer(TMEMBER(_spriteHover));
- PersistMgr->Transfer(TMEMBER(_inInventory));
- PersistMgr->Transfer(TMEMBER(_displayAmount));
- PersistMgr->Transfer(TMEMBER(_amount));
- PersistMgr->Transfer(TMEMBER(_amountOffsetX));
- PersistMgr->Transfer(TMEMBER(_amountOffsetY));
- PersistMgr->Transfer(TMEMBER_INT(_amountAlign));
- PersistMgr->Transfer(TMEMBER(_amountString));
+HRESULT CAdItem::Persist(CBPersistMgr *persistMgr) {
+
+ CAdTalkHolder::Persist(persistMgr);
+
+ persistMgr->transfer(TMEMBER(_cursorCombined));
+ persistMgr->transfer(TMEMBER(_cursorHover));
+ persistMgr->transfer(TMEMBER(_cursorNormal));
+ persistMgr->transfer(TMEMBER(_spriteHover));
+ persistMgr->transfer(TMEMBER(_inInventory));
+ persistMgr->transfer(TMEMBER(_displayAmount));
+ persistMgr->transfer(TMEMBER(_amount));
+ persistMgr->transfer(TMEMBER(_amountOffsetX));
+ persistMgr->transfer(TMEMBER(_amountOffsetY));
+ persistMgr->transfer(TMEMBER_INT(_amountAlign));
+ persistMgr->transfer(TMEMBER(_amountString));
return S_OK;
}
diff --git a/engines/wintermute/Ad/AdLayer.cpp b/engines/wintermute/Ad/AdLayer.cpp
index 8198bf492b..ae8baabcd6 100644
--- a/engines/wintermute/Ad/AdLayer.cpp
+++ b/engines/wintermute/Ad/AdLayer.cpp
@@ -521,16 +521,16 @@ HRESULT CAdLayer::SaveAsText(CBDynBuffer *Buffer, int Indent) {
//////////////////////////////////////////////////////////////////////////
-HRESULT CAdLayer::Persist(CBPersistMgr *PersistMgr) {
+HRESULT CAdLayer::Persist(CBPersistMgr *persistMgr) {
- CBObject::Persist(PersistMgr);
+ CBObject::Persist(persistMgr);
- PersistMgr->Transfer(TMEMBER(_active));
- PersistMgr->Transfer(TMEMBER(_closeUp));
- PersistMgr->Transfer(TMEMBER(_height));
- PersistMgr->Transfer(TMEMBER(_main));
- _nodes.Persist(PersistMgr);
- PersistMgr->Transfer(TMEMBER(_width));
+ persistMgr->transfer(TMEMBER(_active));
+ persistMgr->transfer(TMEMBER(_closeUp));
+ persistMgr->transfer(TMEMBER(_height));
+ persistMgr->transfer(TMEMBER(_main));
+ _nodes.Persist(persistMgr);
+ persistMgr->transfer(TMEMBER(_width));
return S_OK;
}
diff --git a/engines/wintermute/Ad/AdNodeState.cpp b/engines/wintermute/Ad/AdNodeState.cpp
index 00703c3b1a..7089e63a31 100644
--- a/engines/wintermute/Ad/AdNodeState.cpp
+++ b/engines/wintermute/Ad/AdNodeState.cpp
@@ -92,15 +92,15 @@ void CAdNodeState::SetCursor(const char *Filename) {
//////////////////////////////////////////////////////////////////////////
-HRESULT CAdNodeState::Persist(CBPersistMgr *PersistMgr) {
- PersistMgr->Transfer(TMEMBER(Game));
-
- PersistMgr->Transfer(TMEMBER(_active));
- PersistMgr->Transfer(TMEMBER(_name));
- PersistMgr->Transfer(TMEMBER(_filename));
- PersistMgr->Transfer(TMEMBER(_cursor));
- PersistMgr->Transfer(TMEMBER(_alphaColor));
- for (int i = 0; i < 7; i++) PersistMgr->Transfer(TMEMBER(_caption[i]));
+HRESULT CAdNodeState::Persist(CBPersistMgr *persistMgr) {
+ persistMgr->transfer(TMEMBER(Game));
+
+ persistMgr->transfer(TMEMBER(_active));
+ persistMgr->transfer(TMEMBER(_name));
+ persistMgr->transfer(TMEMBER(_filename));
+ persistMgr->transfer(TMEMBER(_cursor));
+ persistMgr->transfer(TMEMBER(_alphaColor));
+ for (int i = 0; i < 7; i++) persistMgr->transfer(TMEMBER(_caption[i]));
return S_OK;
}
diff --git a/engines/wintermute/Ad/AdObject.cpp b/engines/wintermute/Ad/AdObject.cpp
index 27ff2599a8..5cafa399e7 100644
--- a/engines/wintermute/Ad/AdObject.cpp
+++ b/engines/wintermute/Ad/AdObject.cpp
@@ -953,45 +953,45 @@ HRESULT CAdObject::Reset() {
//////////////////////////////////////////////////////////////////////////
-HRESULT CAdObject::Persist(CBPersistMgr *PersistMgr) {
- CBObject::Persist(PersistMgr);
-
- PersistMgr->Transfer(TMEMBER(_active));
- PersistMgr->Transfer(TMEMBER(_blockRegion));
- PersistMgr->Transfer(TMEMBER(_currentBlockRegion));
- PersistMgr->Transfer(TMEMBER(_currentWptGroup));
- PersistMgr->Transfer(TMEMBER(_currentSprite));
- PersistMgr->Transfer(TMEMBER(_drawn));
- PersistMgr->Transfer(TMEMBER(_font));
- PersistMgr->Transfer(TMEMBER(_ignoreItems));
- PersistMgr->Transfer(TMEMBER_INT(_nextState));
- PersistMgr->Transfer(TMEMBER(_sentence));
- PersistMgr->Transfer(TMEMBER_INT(_state));
- PersistMgr->Transfer(TMEMBER(_animSprite));
- PersistMgr->Transfer(TMEMBER(_sceneIndependent));
- PersistMgr->Transfer(TMEMBER(_forcedTalkAnimName));
- PersistMgr->Transfer(TMEMBER(_forcedTalkAnimUsed));
- PersistMgr->Transfer(TMEMBER(_tempSprite2));
- PersistMgr->Transfer(TMEMBER_INT(_type));
- PersistMgr->Transfer(TMEMBER(_wptGroup));
- PersistMgr->Transfer(TMEMBER(_stickRegion));
- PersistMgr->Transfer(TMEMBER(_subtitlesModRelative));
- PersistMgr->Transfer(TMEMBER(_subtitlesModX));
- PersistMgr->Transfer(TMEMBER(_subtitlesModY));
- PersistMgr->Transfer(TMEMBER(_subtitlesModXCenter));
- PersistMgr->Transfer(TMEMBER(_subtitlesWidth));
- PersistMgr->Transfer(TMEMBER(_inventory));
- PersistMgr->Transfer(TMEMBER(_partEmitter));
-
- for (int i = 0; i < MAX_NUM_REGIONS; i++) PersistMgr->Transfer(TMEMBER(_currentRegions[i]));
-
- _attachmentsPre.Persist(PersistMgr);
- _attachmentsPost.Persist(PersistMgr);
- PersistMgr->Transfer(TMEMBER(_registerAlias));
-
- PersistMgr->Transfer(TMEMBER(_partFollowParent));
- PersistMgr->Transfer(TMEMBER(_partOffsetX));
- PersistMgr->Transfer(TMEMBER(_partOffsetY));
+HRESULT CAdObject::Persist(CBPersistMgr *persistMgr) {
+ CBObject::Persist(persistMgr);
+
+ persistMgr->transfer(TMEMBER(_active));
+ persistMgr->transfer(TMEMBER(_blockRegion));
+ persistMgr->transfer(TMEMBER(_currentBlockRegion));
+ persistMgr->transfer(TMEMBER(_currentWptGroup));
+ persistMgr->transfer(TMEMBER(_currentSprite));
+ persistMgr->transfer(TMEMBER(_drawn));
+ persistMgr->transfer(TMEMBER(_font));
+ persistMgr->transfer(TMEMBER(_ignoreItems));
+ persistMgr->transfer(TMEMBER_INT(_nextState));
+ persistMgr->transfer(TMEMBER(_sentence));
+ persistMgr->transfer(TMEMBER_INT(_state));
+ persistMgr->transfer(TMEMBER(_animSprite));
+ persistMgr->transfer(TMEMBER(_sceneIndependent));
+ persistMgr->transfer(TMEMBER(_forcedTalkAnimName));
+ persistMgr->transfer(TMEMBER(_forcedTalkAnimUsed));
+ persistMgr->transfer(TMEMBER(_tempSprite2));
+ persistMgr->transfer(TMEMBER_INT(_type));
+ persistMgr->transfer(TMEMBER(_wptGroup));
+ persistMgr->transfer(TMEMBER(_stickRegion));
+ persistMgr->transfer(TMEMBER(_subtitlesModRelative));
+ persistMgr->transfer(TMEMBER(_subtitlesModX));
+ persistMgr->transfer(TMEMBER(_subtitlesModY));
+ persistMgr->transfer(TMEMBER(_subtitlesModXCenter));
+ persistMgr->transfer(TMEMBER(_subtitlesWidth));
+ persistMgr->transfer(TMEMBER(_inventory));
+ persistMgr->transfer(TMEMBER(_partEmitter));
+
+ for (int i = 0; i < MAX_NUM_REGIONS; i++) persistMgr->transfer(TMEMBER(_currentRegions[i]));
+
+ _attachmentsPre.Persist(persistMgr);
+ _attachmentsPost.Persist(persistMgr);
+ persistMgr->transfer(TMEMBER(_registerAlias));
+
+ persistMgr->transfer(TMEMBER(_partFollowParent));
+ persistMgr->transfer(TMEMBER(_partOffsetX));
+ persistMgr->transfer(TMEMBER(_partOffsetY));
return S_OK;
}
diff --git a/engines/wintermute/Ad/AdPath.cpp b/engines/wintermute/Ad/AdPath.cpp
index 9d2f1d555b..6fcaa47866 100644
--- a/engines/wintermute/Ad/AdPath.cpp
+++ b/engines/wintermute/Ad/AdPath.cpp
@@ -98,13 +98,13 @@ bool CAdPath::SetReady(bool ready) {
//////////////////////////////////////////////////////////////////////////
-HRESULT CAdPath::Persist(CBPersistMgr *PersistMgr) {
+HRESULT CAdPath::Persist(CBPersistMgr *persistMgr) {
- PersistMgr->Transfer(TMEMBER(Game));
+ persistMgr->transfer(TMEMBER(Game));
- PersistMgr->Transfer(TMEMBER(_currIndex));
- _points.Persist(PersistMgr);
- PersistMgr->Transfer(TMEMBER(_ready));
+ persistMgr->transfer(TMEMBER(_currIndex));
+ _points.Persist(persistMgr);
+ persistMgr->transfer(TMEMBER(_ready));
return S_OK;
}
diff --git a/engines/wintermute/Ad/AdPathPoint.cpp b/engines/wintermute/Ad/AdPathPoint.cpp
index 73d4976a6e..d74284fa22 100644
--- a/engines/wintermute/Ad/AdPathPoint.cpp
+++ b/engines/wintermute/Ad/AdPathPoint.cpp
@@ -61,13 +61,13 @@ CAdPathPoint::~CAdPathPoint() {
//////////////////////////////////////////////////////////////////////////
-HRESULT CAdPathPoint::Persist(CBPersistMgr *PersistMgr) {
+HRESULT CAdPathPoint::Persist(CBPersistMgr *persistMgr) {
- CBPoint::Persist(PersistMgr);
+ CBPoint::Persist(persistMgr);
- PersistMgr->Transfer(TMEMBER(_distance));
- PersistMgr->Transfer(TMEMBER(_marked));
- PersistMgr->Transfer(TMEMBER(_origin));
+ persistMgr->transfer(TMEMBER(_distance));
+ persistMgr->transfer(TMEMBER(_marked));
+ persistMgr->transfer(TMEMBER(_origin));
return S_OK;
}
diff --git a/engines/wintermute/Ad/AdRegion.cpp b/engines/wintermute/Ad/AdRegion.cpp
index c335269885..16598e409b 100644
--- a/engines/wintermute/Ad/AdRegion.cpp
+++ b/engines/wintermute/Ad/AdRegion.cpp
@@ -378,13 +378,13 @@ HRESULT CAdRegion::SaveAsText(CBDynBuffer *Buffer, int Indent) {
//////////////////////////////////////////////////////////////////////////
-HRESULT CAdRegion::Persist(CBPersistMgr *PersistMgr) {
- CBRegion::Persist(PersistMgr);
+HRESULT CAdRegion::Persist(CBPersistMgr *persistMgr) {
+ CBRegion::Persist(persistMgr);
- PersistMgr->Transfer(TMEMBER(_alpha));
- PersistMgr->Transfer(TMEMBER(_blocked));
- PersistMgr->Transfer(TMEMBER(_decoration));
- PersistMgr->Transfer(TMEMBER(_zoom));
+ persistMgr->transfer(TMEMBER(_alpha));
+ persistMgr->transfer(TMEMBER(_blocked));
+ persistMgr->transfer(TMEMBER(_decoration));
+ persistMgr->transfer(TMEMBER(_zoom));
return S_OK;
}
diff --git a/engines/wintermute/Ad/AdResponse.cpp b/engines/wintermute/Ad/AdResponse.cpp
index 952ecce4b7..4567e90109 100644
--- a/engines/wintermute/Ad/AdResponse.cpp
+++ b/engines/wintermute/Ad/AdResponse.cpp
@@ -124,18 +124,18 @@ HRESULT CAdResponse::SetIconPressed(const char *Filename) {
//////////////////////////////////////////////////////////////////////////
-HRESULT CAdResponse::Persist(CBPersistMgr *PersistMgr) {
-
- CBObject::Persist(PersistMgr);
-
- PersistMgr->Transfer(TMEMBER(_icon));
- PersistMgr->Transfer(TMEMBER(_iconHover));
- PersistMgr->Transfer(TMEMBER(_iconPressed));
- PersistMgr->Transfer(TMEMBER(_iD));
- PersistMgr->Transfer(TMEMBER(_text));
- PersistMgr->Transfer(TMEMBER(_textOrig));
- PersistMgr->Transfer(TMEMBER_INT(_responseType));
- PersistMgr->Transfer(TMEMBER(_font));
+HRESULT CAdResponse::Persist(CBPersistMgr *persistMgr) {
+
+ CBObject::Persist(persistMgr);
+
+ persistMgr->transfer(TMEMBER(_icon));
+ persistMgr->transfer(TMEMBER(_iconHover));
+ persistMgr->transfer(TMEMBER(_iconPressed));
+ persistMgr->transfer(TMEMBER(_iD));
+ persistMgr->transfer(TMEMBER(_text));
+ persistMgr->transfer(TMEMBER(_textOrig));
+ persistMgr->transfer(TMEMBER_INT(_responseType));
+ persistMgr->transfer(TMEMBER(_font));
return S_OK;
}
diff --git a/engines/wintermute/Ad/AdResponseBox.cpp b/engines/wintermute/Ad/AdResponseBox.cpp
index c4ba940c89..afceaf8a31 100644
--- a/engines/wintermute/Ad/AdResponseBox.cpp
+++ b/engines/wintermute/Ad/AdResponseBox.cpp
@@ -511,25 +511,25 @@ HRESULT CAdResponseBox::Listen(CBScriptHolder *param1, uint32 param2) {
//////////////////////////////////////////////////////////////////////////
-HRESULT CAdResponseBox::Persist(CBPersistMgr *PersistMgr) {
- CBObject::Persist(PersistMgr);
-
- PersistMgr->Transfer(TMEMBER(_font));
- PersistMgr->Transfer(TMEMBER(_fontHover));
- PersistMgr->Transfer(TMEMBER(_horizontal));
- PersistMgr->Transfer(TMEMBER(_lastResponseText));
- PersistMgr->Transfer(TMEMBER(_lastResponseTextOrig));
- _respButtons.Persist(PersistMgr);
- PersistMgr->Transfer(TMEMBER(_responseArea));
- _responses.Persist(PersistMgr);
- PersistMgr->Transfer(TMEMBER(_scrollOffset));
- PersistMgr->Transfer(TMEMBER(_shieldWindow));
- PersistMgr->Transfer(TMEMBER(_spacing));
- PersistMgr->Transfer(TMEMBER(_waitingScript));
- PersistMgr->Transfer(TMEMBER(_window));
-
- PersistMgr->Transfer(TMEMBER_INT(_verticalAlign));
- PersistMgr->Transfer(TMEMBER_INT(_align));
+HRESULT CAdResponseBox::Persist(CBPersistMgr *persistMgr) {
+ CBObject::Persist(persistMgr);
+
+ persistMgr->transfer(TMEMBER(_font));
+ persistMgr->transfer(TMEMBER(_fontHover));
+ persistMgr->transfer(TMEMBER(_horizontal));
+ persistMgr->transfer(TMEMBER(_lastResponseText));
+ persistMgr->transfer(TMEMBER(_lastResponseTextOrig));
+ _respButtons.Persist(persistMgr);
+ persistMgr->transfer(TMEMBER(_responseArea));
+ _responses.Persist(persistMgr);
+ persistMgr->transfer(TMEMBER(_scrollOffset));
+ persistMgr->transfer(TMEMBER(_shieldWindow));
+ persistMgr->transfer(TMEMBER(_spacing));
+ persistMgr->transfer(TMEMBER(_waitingScript));
+ persistMgr->transfer(TMEMBER(_window));
+
+ persistMgr->transfer(TMEMBER_INT(_verticalAlign));
+ persistMgr->transfer(TMEMBER_INT(_align));
return S_OK;
}
diff --git a/engines/wintermute/Ad/AdResponseContext.cpp b/engines/wintermute/Ad/AdResponseContext.cpp
index 03904a1037..054681f656 100644
--- a/engines/wintermute/Ad/AdResponseContext.cpp
+++ b/engines/wintermute/Ad/AdResponseContext.cpp
@@ -49,10 +49,10 @@ CAdResponseContext::~CAdResponseContext() {
//////////////////////////////////////////////////////////////////////////
-HRESULT CAdResponseContext::Persist(CBPersistMgr *PersistMgr) {
- PersistMgr->Transfer(TMEMBER(Game));
- PersistMgr->Transfer(TMEMBER(_context));
- PersistMgr->Transfer(TMEMBER(_iD));
+HRESULT CAdResponseContext::Persist(CBPersistMgr *persistMgr) {
+ persistMgr->transfer(TMEMBER(Game));
+ persistMgr->transfer(TMEMBER(_context));
+ persistMgr->transfer(TMEMBER(_iD));
return S_OK;
}
diff --git a/engines/wintermute/Ad/AdRotLevel.cpp b/engines/wintermute/Ad/AdRotLevel.cpp
index fb1167f426..c35784d4d6 100644
--- a/engines/wintermute/Ad/AdRotLevel.cpp
+++ b/engines/wintermute/Ad/AdRotLevel.cpp
@@ -147,11 +147,11 @@ HRESULT CAdRotLevel::SaveAsText(CBDynBuffer *Buffer, int Indent) {
//////////////////////////////////////////////////////////////////////////
-HRESULT CAdRotLevel::Persist(CBPersistMgr *PersistMgr) {
+HRESULT CAdRotLevel::Persist(CBPersistMgr *persistMgr) {
- CBObject::Persist(PersistMgr);
+ CBObject::Persist(persistMgr);
- PersistMgr->Transfer(TMEMBER(_rotation));
+ persistMgr->transfer(TMEMBER(_rotation));
return S_OK;
}
diff --git a/engines/wintermute/Ad/AdScaleLevel.cpp b/engines/wintermute/Ad/AdScaleLevel.cpp
index d417358c0c..5ab835a149 100644
--- a/engines/wintermute/Ad/AdScaleLevel.cpp
+++ b/engines/wintermute/Ad/AdScaleLevel.cpp
@@ -145,11 +145,11 @@ HRESULT CAdScaleLevel::SaveAsText(CBDynBuffer *Buffer, int Indent) {
//////////////////////////////////////////////////////////////////////////
-HRESULT CAdScaleLevel::Persist(CBPersistMgr *PersistMgr) {
+HRESULT CAdScaleLevel::Persist(CBPersistMgr *persistMgr) {
- CBObject::Persist(PersistMgr);
+ CBObject::Persist(persistMgr);
- PersistMgr->Transfer(TMEMBER(_scale));
+ persistMgr->transfer(TMEMBER(_scale));
return S_OK;
}
diff --git a/engines/wintermute/Ad/AdScene.cpp b/engines/wintermute/Ad/AdScene.cpp
index b3551d0811..31d30356bd 100644
--- a/engines/wintermute/Ad/AdScene.cpp
+++ b/engines/wintermute/Ad/AdScene.cpp
@@ -2135,61 +2135,61 @@ float CAdScene::GetScaleAt(int Y) {
//////////////////////////////////////////////////////////////////////////
-HRESULT CAdScene::Persist(CBPersistMgr *PersistMgr) {
- CBObject::Persist(PersistMgr);
-
- PersistMgr->Transfer(TMEMBER(_autoScroll));
- PersistMgr->Transfer(TMEMBER(_editorColBlocked));
- PersistMgr->Transfer(TMEMBER(_editorColBlockedSel));
- PersistMgr->Transfer(TMEMBER(_editorColDecor));
- PersistMgr->Transfer(TMEMBER(_editorColDecorSel));
- PersistMgr->Transfer(TMEMBER(_editorColEntity));
- PersistMgr->Transfer(TMEMBER(_editorColEntitySel));
- PersistMgr->Transfer(TMEMBER(_editorColFrame));
- PersistMgr->Transfer(TMEMBER(_editorColRegion));
- PersistMgr->Transfer(TMEMBER(_editorColRegionSel));
- PersistMgr->Transfer(TMEMBER(_editorColScale));
- PersistMgr->Transfer(TMEMBER(_editorColWaypoints));
- PersistMgr->Transfer(TMEMBER(_editorColWaypointsSel));
- PersistMgr->Transfer(TMEMBER(_editorMarginH));
- PersistMgr->Transfer(TMEMBER(_editorMarginV));
- PersistMgr->Transfer(TMEMBER(_editorShowBlocked));
- PersistMgr->Transfer(TMEMBER(_editorShowDecor));
- PersistMgr->Transfer(TMEMBER(_editorShowEntities));
- PersistMgr->Transfer(TMEMBER(_editorShowRegions));
- PersistMgr->Transfer(TMEMBER(_editorShowScale));
- PersistMgr->Transfer(TMEMBER(_fader));
- PersistMgr->Transfer(TMEMBER(_height));
- PersistMgr->Transfer(TMEMBER(_initialized));
- PersistMgr->Transfer(TMEMBER(_lastTimeH));
- PersistMgr->Transfer(TMEMBER(_lastTimeV));
- _layers.Persist(PersistMgr);
- PersistMgr->Transfer(TMEMBER(_mainLayer));
- _objects.Persist(PersistMgr);
- PersistMgr->Transfer(TMEMBER(_offsetLeft));
- PersistMgr->Transfer(TMEMBER(_offsetTop));
- PersistMgr->Transfer(TMEMBER(_paralaxScrolling));
- PersistMgr->Transfer(TMEMBER(_persistentState));
- PersistMgr->Transfer(TMEMBER(_persistentStateSprites));
- PersistMgr->Transfer(TMEMBER(_pFMaxTime));
- _pFPath.Persist(PersistMgr);
- PersistMgr->Transfer(TMEMBER(_pFPointsNum));
- PersistMgr->Transfer(TMEMBER(_pFReady));
- PersistMgr->Transfer(TMEMBER(_pFRequester));
- PersistMgr->Transfer(TMEMBER(_pFTarget));
- PersistMgr->Transfer(TMEMBER(_pFTargetPath));
- _rotLevels.Persist(PersistMgr);
- _scaleLevels.Persist(PersistMgr);
- PersistMgr->Transfer(TMEMBER(_scrollPixelsH));
- PersistMgr->Transfer(TMEMBER(_scrollPixelsV));
- PersistMgr->Transfer(TMEMBER(_scrollTimeH));
- PersistMgr->Transfer(TMEMBER(_scrollTimeV));
- PersistMgr->Transfer(TMEMBER(_shieldWindow));
- PersistMgr->Transfer(TMEMBER(_targetOffsetLeft));
- PersistMgr->Transfer(TMEMBER(_targetOffsetTop));
- _waypointGroups.Persist(PersistMgr);
- PersistMgr->Transfer(TMEMBER(_viewport));
- PersistMgr->Transfer(TMEMBER(_width));
+HRESULT CAdScene::Persist(CBPersistMgr *persistMgr) {
+ CBObject::Persist(persistMgr);
+
+ persistMgr->transfer(TMEMBER(_autoScroll));
+ persistMgr->transfer(TMEMBER(_editorColBlocked));
+ persistMgr->transfer(TMEMBER(_editorColBlockedSel));
+ persistMgr->transfer(TMEMBER(_editorColDecor));
+ persistMgr->transfer(TMEMBER(_editorColDecorSel));
+ persistMgr->transfer(TMEMBER(_editorColEntity));
+ persistMgr->transfer(TMEMBER(_editorColEntitySel));
+ persistMgr->transfer(TMEMBER(_editorColFrame));
+ persistMgr->transfer(TMEMBER(_editorColRegion));
+ persistMgr->transfer(TMEMBER(_editorColRegionSel));
+ persistMgr->transfer(TMEMBER(_editorColScale));
+ persistMgr->transfer(TMEMBER(_editorColWaypoints));
+ persistMgr->transfer(TMEMBER(_editorColWaypointsSel));
+ persistMgr->transfer(TMEMBER(_editorMarginH));
+ persistMgr->transfer(TMEMBER(_editorMarginV));
+ persistMgr->transfer(TMEMBER(_editorShowBlocked));
+ persistMgr->transfer(TMEMBER(_editorShowDecor));
+ persistMgr->transfer(TMEMBER(_editorShowEntities));
+ persistMgr->transfer(TMEMBER(_editorShowRegions));
+ persistMgr->transfer(TMEMBER(_editorShowScale));
+ persistMgr->transfer(TMEMBER(_fader));
+ persistMgr->transfer(TMEMBER(_height));
+ persistMgr->transfer(TMEMBER(_initialized));
+ persistMgr->transfer(TMEMBER(_lastTimeH));
+ persistMgr->transfer(TMEMBER(_lastTimeV));
+ _layers.Persist(persistMgr);
+ persistMgr->transfer(TMEMBER(_mainLayer));
+ _objects.Persist(persistMgr);
+ persistMgr->transfer(TMEMBER(_offsetLeft));
+ persistMgr->transfer(TMEMBER(_offsetTop));
+ persistMgr->transfer(TMEMBER(_paralaxScrolling));
+ persistMgr->transfer(TMEMBER(_persistentState));
+ persistMgr->transfer(TMEMBER(_persistentStateSprites));
+ persistMgr->transfer(TMEMBER(_pFMaxTime));
+ _pFPath.Persist(persistMgr);
+ persistMgr->transfer(TMEMBER(_pFPointsNum));
+ persistMgr->transfer(TMEMBER(_pFReady));
+ persistMgr->transfer(TMEMBER(_pFRequester));
+ persistMgr->transfer(TMEMBER(_pFTarget));
+ persistMgr->transfer(TMEMBER(_pFTargetPath));
+ _rotLevels.Persist(persistMgr);
+ _scaleLevels.Persist(persistMgr);
+ persistMgr->transfer(TMEMBER(_scrollPixelsH));
+ persistMgr->transfer(TMEMBER(_scrollPixelsV));
+ persistMgr->transfer(TMEMBER(_scrollTimeH));
+ persistMgr->transfer(TMEMBER(_scrollTimeV));
+ persistMgr->transfer(TMEMBER(_shieldWindow));
+ persistMgr->transfer(TMEMBER(_targetOffsetLeft));
+ persistMgr->transfer(TMEMBER(_targetOffsetTop));
+ _waypointGroups.Persist(persistMgr);
+ persistMgr->transfer(TMEMBER(_viewport));
+ persistMgr->transfer(TMEMBER(_width));
return S_OK;
}
diff --git a/engines/wintermute/Ad/AdSceneNode.cpp b/engines/wintermute/Ad/AdSceneNode.cpp
index aceff64873..071469c996 100644
--- a/engines/wintermute/Ad/AdSceneNode.cpp
+++ b/engines/wintermute/Ad/AdSceneNode.cpp
@@ -69,13 +69,13 @@ HRESULT CAdSceneNode::SetRegion(CAdRegion *Region) {
//////////////////////////////////////////////////////////////////////////
-HRESULT CAdSceneNode::Persist(CBPersistMgr *PersistMgr) {
+HRESULT CAdSceneNode::Persist(CBPersistMgr *persistMgr) {
- CBObject::Persist(PersistMgr);
+ CBObject::Persist(persistMgr);
- PersistMgr->Transfer(TMEMBER(_entity));
- PersistMgr->Transfer(TMEMBER(_region));
- PersistMgr->Transfer(TMEMBER_INT(_type));
+ persistMgr->transfer(TMEMBER(_entity));
+ persistMgr->transfer(TMEMBER(_region));
+ persistMgr->transfer(TMEMBER_INT(_type));
return S_OK;
}
diff --git a/engines/wintermute/Ad/AdSceneState.cpp b/engines/wintermute/Ad/AdSceneState.cpp
index 3a083498fe..a3dfc3c27d 100644
--- a/engines/wintermute/Ad/AdSceneState.cpp
+++ b/engines/wintermute/Ad/AdSceneState.cpp
@@ -54,9 +54,9 @@ CAdSceneState::~CAdSceneState() {
//////////////////////////////////////////////////////////////////////////
-HRESULT CAdSceneState::Persist(CBPersistMgr *PersistMgr) {
- PersistMgr->Transfer(TMEMBER(_filename));
- _nodeStates.Persist(PersistMgr);
+HRESULT CAdSceneState::Persist(CBPersistMgr *persistMgr) {
+ persistMgr->transfer(TMEMBER(_filename));
+ _nodeStates.Persist(persistMgr);
return S_OK;
}
diff --git a/engines/wintermute/Ad/AdSentence.cpp b/engines/wintermute/Ad/AdSentence.cpp
index 468f8a49c1..dd6a8c9269 100644
--- a/engines/wintermute/Ad/AdSentence.cpp
+++ b/engines/wintermute/Ad/AdSentence.cpp
@@ -211,27 +211,27 @@ HRESULT CAdSentence::Finish() {
//////////////////////////////////////////////////////////////////////////
-HRESULT CAdSentence::Persist(CBPersistMgr *PersistMgr) {
-
- PersistMgr->Transfer(TMEMBER(Game));
-
- 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));
+HRESULT CAdSentence::Persist(CBPersistMgr *persistMgr) {
+
+ persistMgr->transfer(TMEMBER(Game));
+
+ 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 S_OK;
}
diff --git a/engines/wintermute/Ad/AdSpriteSet.cpp b/engines/wintermute/Ad/AdSpriteSet.cpp
index 4fc5a12c4c..86937dde8e 100644
--- a/engines/wintermute/Ad/AdSpriteSet.cpp
+++ b/engines/wintermute/Ad/AdSpriteSet.cpp
@@ -214,13 +214,13 @@ HRESULT CAdSpriteSet::LoadBuffer(byte *Buffer, bool Complete, int LifeTime, TSp
//////////////////////////////////////////////////////////////////////////
-HRESULT CAdSpriteSet::Persist(CBPersistMgr *PersistMgr) {
+HRESULT CAdSpriteSet::Persist(CBPersistMgr *persistMgr) {
- CBObject::Persist(PersistMgr);
+ CBObject::Persist(persistMgr);
- PersistMgr->Transfer(TMEMBER(_owner));
+ persistMgr->transfer(TMEMBER(_owner));
for (int i = 0; i < NUM_DIRECTIONS; i++) {
- PersistMgr->Transfer("", &_sprites[i]);
+ persistMgr->transfer("", &_sprites[i]);
}
return S_OK;
diff --git a/engines/wintermute/Ad/AdTalkDef.cpp b/engines/wintermute/Ad/AdTalkDef.cpp
index 67c7c74e42..283df609cb 100644
--- a/engines/wintermute/Ad/AdTalkDef.cpp
+++ b/engines/wintermute/Ad/AdTalkDef.cpp
@@ -194,16 +194,16 @@ HRESULT CAdTalkDef::LoadBuffer(byte *Buffer, bool Complete) {
//////////////////////////////////////////////////////////////////////////
-HRESULT CAdTalkDef::Persist(CBPersistMgr *PersistMgr) {
+HRESULT CAdTalkDef::Persist(CBPersistMgr *persistMgr) {
- CBObject::Persist(PersistMgr);
+ CBObject::Persist(persistMgr);
- PersistMgr->Transfer(TMEMBER(_defaultSprite));
- PersistMgr->Transfer(TMEMBER(_defaultSpriteFilename));
- PersistMgr->Transfer(TMEMBER(_defaultSpriteSet));
- PersistMgr->Transfer(TMEMBER(_defaultSpriteSetFilename));
+ persistMgr->transfer(TMEMBER(_defaultSprite));
+ persistMgr->transfer(TMEMBER(_defaultSpriteFilename));
+ persistMgr->transfer(TMEMBER(_defaultSpriteSet));
+ persistMgr->transfer(TMEMBER(_defaultSpriteSetFilename));
- _nodes.Persist(PersistMgr);
+ _nodes.Persist(persistMgr);
return S_OK;
}
diff --git a/engines/wintermute/Ad/AdTalkHolder.cpp b/engines/wintermute/Ad/AdTalkHolder.cpp
index a2af4223a3..e8b691b9fd 100644
--- a/engines/wintermute/Ad/AdTalkHolder.cpp
+++ b/engines/wintermute/Ad/AdTalkHolder.cpp
@@ -343,12 +343,12 @@ HRESULT CAdTalkHolder::SaveAsText(CBDynBuffer *Buffer, int Indent) {
//////////////////////////////////////////////////////////////////////////
-HRESULT CAdTalkHolder::Persist(CBPersistMgr *PersistMgr) {
- CAdObject::Persist(PersistMgr);
+HRESULT CAdTalkHolder::Persist(CBPersistMgr *persistMgr) {
+ CAdObject::Persist(persistMgr);
- PersistMgr->Transfer(TMEMBER(_sprite));
- _talkSprites.Persist(PersistMgr);
- _talkSpritesEx.Persist(PersistMgr);
+ persistMgr->transfer(TMEMBER(_sprite));
+ _talkSprites.Persist(persistMgr);
+ _talkSpritesEx.Persist(persistMgr);
return S_OK;
}
diff --git a/engines/wintermute/Ad/AdTalkNode.cpp b/engines/wintermute/Ad/AdTalkNode.cpp
index c8f2c2c971..0a3adc1632 100644
--- a/engines/wintermute/Ad/AdTalkNode.cpp
+++ b/engines/wintermute/Ad/AdTalkNode.cpp
@@ -183,15 +183,15 @@ HRESULT CAdTalkNode::LoadBuffer(byte *Buffer, bool Complete) {
//////////////////////////////////////////////////////////////////////////
-HRESULT CAdTalkNode::Persist(CBPersistMgr *PersistMgr) {
- PersistMgr->Transfer(TMEMBER(_comment));
- PersistMgr->Transfer(TMEMBER(_startTime));
- PersistMgr->Transfer(TMEMBER(_endTime));
- PersistMgr->Transfer(TMEMBER(_playToEnd));
- PersistMgr->Transfer(TMEMBER(_sprite));
- PersistMgr->Transfer(TMEMBER(_spriteFilename));
- PersistMgr->Transfer(TMEMBER(_spriteSet));
- PersistMgr->Transfer(TMEMBER(_spriteSetFilename));
+HRESULT CAdTalkNode::Persist(CBPersistMgr *persistMgr) {
+ persistMgr->transfer(TMEMBER(_comment));
+ persistMgr->transfer(TMEMBER(_startTime));
+ persistMgr->transfer(TMEMBER(_endTime));
+ persistMgr->transfer(TMEMBER(_playToEnd));
+ persistMgr->transfer(TMEMBER(_sprite));
+ persistMgr->transfer(TMEMBER(_spriteFilename));
+ persistMgr->transfer(TMEMBER(_spriteSet));
+ persistMgr->transfer(TMEMBER(_spriteSetFilename));
return S_OK;
}
diff --git a/engines/wintermute/Ad/AdWaypointGroup.cpp b/engines/wintermute/Ad/AdWaypointGroup.cpp
index 7748cdca02..77cec106dd 100644
--- a/engines/wintermute/Ad/AdWaypointGroup.cpp
+++ b/engines/wintermute/Ad/AdWaypointGroup.cpp
@@ -184,16 +184,16 @@ HRESULT CAdWaypointGroup::SaveAsText(CBDynBuffer *Buffer, int Indent) {
//////////////////////////////////////////////////////////////////////////
-HRESULT CAdWaypointGroup::Persist(CBPersistMgr *PersistMgr) {
+HRESULT CAdWaypointGroup::Persist(CBPersistMgr *persistMgr) {
- CBObject::Persist(PersistMgr);
+ CBObject::Persist(persistMgr);
- PersistMgr->Transfer(TMEMBER(_active));
- PersistMgr->Transfer(TMEMBER(_editorSelectedPoint));
- PersistMgr->Transfer(TMEMBER(_lastMimicScale));
- PersistMgr->Transfer(TMEMBER(_lastMimicX));
- PersistMgr->Transfer(TMEMBER(_lastMimicY));
- _points.Persist(PersistMgr);
+ persistMgr->transfer(TMEMBER(_active));
+ persistMgr->transfer(TMEMBER(_editorSelectedPoint));
+ persistMgr->transfer(TMEMBER(_lastMimicScale));
+ persistMgr->transfer(TMEMBER(_lastMimicX));
+ persistMgr->transfer(TMEMBER(_lastMimicY));
+ _points.Persist(persistMgr);
return S_OK;
}
diff --git a/engines/wintermute/Base/BEvent.cpp b/engines/wintermute/Base/BEvent.cpp
index c0cc5a2e4a..1272f85322 100644
--- a/engines/wintermute/Base/BEvent.cpp
+++ b/engines/wintermute/Base/BEvent.cpp
@@ -183,13 +183,13 @@ HRESULT CBEvent::LoadBuffer(byte *Buffer, bool Complete) {
//////////////////////////////////////////////////////////////////////////
-HRESULT CBEvent::Persist(CBPersistMgr *PersistMgr) {
+HRESULT CBEvent::Persist(CBPersistMgr *persistMgr) {
- PersistMgr->Transfer(TMEMBER(Game));
+ persistMgr->transfer(TMEMBER(Game));
- PersistMgr->Transfer(TMEMBER(_script));
- PersistMgr->Transfer(TMEMBER(_name));
- PersistMgr->Transfer(TMEMBER_INT(_type));
+ persistMgr->transfer(TMEMBER(_script));
+ persistMgr->transfer(TMEMBER(_name));
+ persistMgr->transfer(TMEMBER_INT(_type));
return S_OK;
}
diff --git a/engines/wintermute/Base/BFader.cpp b/engines/wintermute/Base/BFader.cpp
index 0769e8fd83..a00215158c 100644
--- a/engines/wintermute/Base/BFader.cpp
+++ b/engines/wintermute/Base/BFader.cpp
@@ -154,21 +154,21 @@ uint32 CBFader::GetCurrentColor() {
//////////////////////////////////////////////////////////////////////////
-HRESULT CBFader::Persist(CBPersistMgr *PersistMgr) {
- CBObject::Persist(PersistMgr);
-
- PersistMgr->Transfer(TMEMBER(_active));
- PersistMgr->Transfer(TMEMBER(_blue));
- PersistMgr->Transfer(TMEMBER(_currentAlpha));
- PersistMgr->Transfer(TMEMBER(_duration));
- PersistMgr->Transfer(TMEMBER(_green));
- PersistMgr->Transfer(TMEMBER(_red));
- PersistMgr->Transfer(TMEMBER(_sourceAlpha));
- PersistMgr->Transfer(TMEMBER(_startTime));
- PersistMgr->Transfer(TMEMBER(_targetAlpha));
- PersistMgr->Transfer(TMEMBER(_system));
-
- if (_system && !PersistMgr->_saving) _startTime = 0;
+HRESULT CBFader::Persist(CBPersistMgr *persistMgr) {
+ CBObject::Persist(persistMgr);
+
+ persistMgr->transfer(TMEMBER(_active));
+ persistMgr->transfer(TMEMBER(_blue));
+ persistMgr->transfer(TMEMBER(_currentAlpha));
+ persistMgr->transfer(TMEMBER(_duration));
+ persistMgr->transfer(TMEMBER(_green));
+ persistMgr->transfer(TMEMBER(_red));
+ persistMgr->transfer(TMEMBER(_sourceAlpha));
+ persistMgr->transfer(TMEMBER(_startTime));
+ persistMgr->transfer(TMEMBER(_targetAlpha));
+ persistMgr->transfer(TMEMBER(_system));
+
+ if (_system && !persistMgr->_saving) _startTime = 0;
return S_OK;
}
diff --git a/engines/wintermute/Base/BFont.cpp b/engines/wintermute/Base/BFont.cpp
index 0f2b248bee..302d4728d0 100644
--- a/engines/wintermute/Base/BFont.cpp
+++ b/engines/wintermute/Base/BFont.cpp
@@ -144,9 +144,9 @@ int CBFont::GetLetterHeight() {
//////////////////////////////////////////////////////////////////////////
-HRESULT CBFont::Persist(CBPersistMgr *PersistMgr) {
+HRESULT CBFont::Persist(CBPersistMgr *persistMgr) {
- CBObject::Persist(PersistMgr);
+ CBObject::Persist(persistMgr);
return S_OK;
}
diff --git a/engines/wintermute/Base/BFontBitmap.cpp b/engines/wintermute/Base/BFontBitmap.cpp
index 10df7fdf3a..94f723cef3 100644
--- a/engines/wintermute/Base/BFontBitmap.cpp
+++ b/engines/wintermute/Base/BFontBitmap.cpp
@@ -456,25 +456,25 @@ HRESULT CBFontBitmap::LoadBuffer(byte *Buffer) {
//////////////////////////////////////////////////////////////////////////
-HRESULT CBFontBitmap::Persist(CBPersistMgr *PersistMgr) {
+HRESULT CBFontBitmap::Persist(CBPersistMgr *persistMgr) {
- CBFont::Persist(PersistMgr);
- PersistMgr->Transfer(TMEMBER(_numColumns));
+ CBFont::Persist(persistMgr);
+ persistMgr->transfer(TMEMBER(_numColumns));
- PersistMgr->Transfer(TMEMBER(_subframe));
- PersistMgr->Transfer(TMEMBER(_tileHeight));
- PersistMgr->Transfer(TMEMBER(_tileWidth));
- PersistMgr->Transfer(TMEMBER(_sprite));
- PersistMgr->Transfer(TMEMBER(_widthsFrame));
+ persistMgr->transfer(TMEMBER(_subframe));
+ persistMgr->transfer(TMEMBER(_tileHeight));
+ persistMgr->transfer(TMEMBER(_tileWidth));
+ persistMgr->transfer(TMEMBER(_sprite));
+ persistMgr->transfer(TMEMBER(_widthsFrame));
- if (PersistMgr->_saving)
- PersistMgr->PutBytes(_widths, sizeof(_widths));
+ if (persistMgr->_saving)
+ persistMgr->putBytes(_widths, sizeof(_widths));
else
- PersistMgr->GetBytes(_widths, sizeof(_widths));
+ persistMgr->getBytes(_widths, sizeof(_widths));
- PersistMgr->Transfer(TMEMBER(_fontextFix));
- PersistMgr->Transfer(TMEMBER(_wholeCell));
+ persistMgr->transfer(TMEMBER(_fontextFix));
+ persistMgr->transfer(TMEMBER(_wholeCell));
return S_OK;
diff --git a/engines/wintermute/Base/BFontStorage.cpp b/engines/wintermute/Base/BFontStorage.cpp
index 0d00f89e60..a96809d194 100644
--- a/engines/wintermute/Base/BFontStorage.cpp
+++ b/engines/wintermute/Base/BFontStorage.cpp
@@ -142,14 +142,14 @@ HRESULT CBFontStorage::RemoveFont(CBFont *Font) {
//////////////////////////////////////////////////////////////////////////
-HRESULT CBFontStorage::Persist(CBPersistMgr *PersistMgr) {
+HRESULT CBFontStorage::Persist(CBPersistMgr *persistMgr) {
- if (!PersistMgr->_saving) Cleanup(false);
+ if (!persistMgr->_saving) Cleanup(false);
- PersistMgr->Transfer(TMEMBER(Game));
- _fonts.Persist(PersistMgr);
+ persistMgr->transfer(TMEMBER(Game));
+ _fonts.Persist(persistMgr);
- if (!PersistMgr->_saving) InitFreeType();
+ if (!persistMgr->_saving) InitFreeType();
return S_OK;
}
diff --git a/engines/wintermute/Base/BFontTT.cpp b/engines/wintermute/Base/BFontTT.cpp
index 91ef15cebf..7592eff3bf 100644
--- a/engines/wintermute/Base/BFontTT.cpp
+++ b/engines/wintermute/Base/BFontTT.cpp
@@ -596,34 +596,34 @@ HRESULT CBFontTT::ParseLayer(CBTTFontLayer *Layer, byte *Buffer) {
//////////////////////////////////////////////////////////////////////////
-HRESULT CBFontTT::Persist(CBPersistMgr *PersistMgr) {
- CBFont::Persist(PersistMgr);
+HRESULT CBFontTT::Persist(CBPersistMgr *persistMgr) {
+ CBFont::Persist(persistMgr);
- PersistMgr->Transfer(TMEMBER(_isBold));
- PersistMgr->Transfer(TMEMBER(_isItalic));
- PersistMgr->Transfer(TMEMBER(_isUnderline));
- PersistMgr->Transfer(TMEMBER(_isStriked));
- PersistMgr->Transfer(TMEMBER(_fontHeight));
- PersistMgr->Transfer(TMEMBER(_fontFile));
+ persistMgr->transfer(TMEMBER(_isBold));
+ persistMgr->transfer(TMEMBER(_isItalic));
+ persistMgr->transfer(TMEMBER(_isUnderline));
+ persistMgr->transfer(TMEMBER(_isStriked));
+ persistMgr->transfer(TMEMBER(_fontHeight));
+ persistMgr->transfer(TMEMBER(_fontFile));
// persist layers
int NumLayers;
- if (PersistMgr->_saving) {
+ if (persistMgr->_saving) {
NumLayers = _layers.GetSize();
- PersistMgr->Transfer(TMEMBER(NumLayers));
- for (int i = 0; i < NumLayers; i++) _layers[i]->Persist(PersistMgr);
+ persistMgr->transfer(TMEMBER(NumLayers));
+ for (int i = 0; i < NumLayers; i++) _layers[i]->Persist(persistMgr);
} else {
NumLayers = _layers.GetSize();
- PersistMgr->Transfer(TMEMBER(NumLayers));
+ persistMgr->transfer(TMEMBER(NumLayers));
for (int i = 0; i < NumLayers; i++) {
CBTTFontLayer *Layer = new CBTTFontLayer;
- Layer->Persist(PersistMgr);
+ Layer->Persist(persistMgr);
_layers.Add(Layer);
}
}
- if (!PersistMgr->_saving) {
+ if (!persistMgr->_saving) {
for (int i = 0; i < NUM_CACHED_TEXTS; i++) _cachedTexts[i] = NULL;
_glyphCache = NULL;
_fallbackFont = _font = _deletableFont = NULL;
diff --git a/engines/wintermute/Base/BFontTT.h b/engines/wintermute/Base/BFontTT.h
index 5658997d2e..127c727922 100644
--- a/engines/wintermute/Base/BFontTT.h
+++ b/engines/wintermute/Base/BFontTT.h
@@ -82,10 +82,10 @@ public:
_color = 0x00000000;
}
- HRESULT Persist(CBPersistMgr *PersistMgr) {
- PersistMgr->Transfer(TMEMBER(_offsetX));
- PersistMgr->Transfer(TMEMBER(_offsetY));
- PersistMgr->Transfer(TMEMBER(_color));
+ HRESULT Persist(CBPersistMgr *persistMgr) {
+ persistMgr->transfer(TMEMBER(_offsetX));
+ persistMgr->transfer(TMEMBER(_offsetY));
+ persistMgr->transfer(TMEMBER(_color));
return S_OK;
}
diff --git a/engines/wintermute/Base/BFrame.cpp b/engines/wintermute/Base/BFrame.cpp
index fa1ed5484e..9e07407f26 100644
--- a/engines/wintermute/Base/BFrame.cpp
+++ b/engines/wintermute/Base/BFrame.cpp
@@ -381,18 +381,18 @@ HRESULT CBFrame::SaveAsText(CBDynBuffer *Buffer, int Indent) {
//////////////////////////////////////////////////////////////////////////
-HRESULT CBFrame::Persist(CBPersistMgr *PersistMgr) {
- CBScriptable::Persist(PersistMgr);
-
- _applyEvent.Persist(PersistMgr);
- PersistMgr->Transfer(TMEMBER(_delay));
- PersistMgr->Transfer(TMEMBER(_editorExpanded));
- PersistMgr->Transfer(TMEMBER(_keyframe));
- PersistMgr->Transfer(TMEMBER(_killSound));
- PersistMgr->Transfer(TMEMBER(_moveX));
- PersistMgr->Transfer(TMEMBER(_moveY));
- PersistMgr->Transfer(TMEMBER(_sound));
- _subframes.Persist(PersistMgr);
+HRESULT CBFrame::Persist(CBPersistMgr *persistMgr) {
+ CBScriptable::Persist(persistMgr);
+
+ _applyEvent.Persist(persistMgr);
+ persistMgr->transfer(TMEMBER(_delay));
+ persistMgr->transfer(TMEMBER(_editorExpanded));
+ persistMgr->transfer(TMEMBER(_keyframe));
+ persistMgr->transfer(TMEMBER(_killSound));
+ persistMgr->transfer(TMEMBER(_moveX));
+ persistMgr->transfer(TMEMBER(_moveY));
+ persistMgr->transfer(TMEMBER(_sound));
+ _subframes.Persist(persistMgr);
return S_OK;
}
diff --git a/engines/wintermute/Base/BGame.cpp b/engines/wintermute/Base/BGame.cpp
index 13bfd9fc75..4c545b7a1c 100644
--- a/engines/wintermute/Base/BGame.cpp
+++ b/engines/wintermute/Base/BGame.cpp
@@ -3253,7 +3253,7 @@ HRESULT CBGame::SaveGame(int slot, const char *desc, bool quickSave) {
_indicatorDisplay = true;
_indicatorProgress = 0;
CBPersistMgr *pm = new CBPersistMgr(Game);
- if (FAILED(ret = pm->InitSave(desc))) goto save_finish;
+ if (FAILED(ret = pm->initSave(desc))) goto save_finish;
if (!quickSave) {
delete _saveLoadImage;
@@ -3270,7 +3270,7 @@ HRESULT CBGame::SaveGame(int slot, const char *desc, bool quickSave) {
if (FAILED(ret = CSysClassRegistry::GetInstance()->SaveTable(Game, pm, quickSave))) goto save_finish;
if (FAILED(ret = CSysClassRegistry::GetInstance()->SaveInstances(Game, pm, quickSave))) goto save_finish;
- if (FAILED(ret = pm->SaveFile(Filename))) goto save_finish;
+ if (FAILED(ret = pm->saveFile(Filename))) goto save_finish;
_registry->WriteInt("System", "MostRecentSaveSlot", slot);
@@ -3323,7 +3323,7 @@ HRESULT CBGame::LoadGame(const char *Filename) {
_indicatorProgress = 0;
CBPersistMgr *pm = new CBPersistMgr(Game);
_dEBUG_AbsolutePathWarning = false;
- if (FAILED(ret = pm->InitLoad(Filename))) goto load_finish;
+ if (FAILED(ret = pm->initLoad(Filename))) goto load_finish;
//if(FAILED(ret = Cleanup())) goto load_finish;
if (FAILED(ret = CSysClassRegistry::GetInstance()->LoadTable(Game, pm))) goto load_finish;
@@ -3631,96 +3631,96 @@ HRESULT CBGame::LoadSettings(const char *Filename) {
//////////////////////////////////////////////////////////////////////////
-HRESULT CBGame::Persist(CBPersistMgr *PersistMgr) {
- if (!PersistMgr->_saving) Cleanup();
-
- CBObject::Persist(PersistMgr);
-
- PersistMgr->Transfer(TMEMBER(_activeObject));
- PersistMgr->Transfer(TMEMBER(_capturedObject));
- PersistMgr->Transfer(TMEMBER(_cursorNoninteractive));
- PersistMgr->Transfer(TMEMBER(_doNotExpandStrings));
- PersistMgr->Transfer(TMEMBER(_editorMode));
- PersistMgr->Transfer(TMEMBER(_fader));
- PersistMgr->Transfer(TMEMBER(_freezeLevel));
- PersistMgr->Transfer(TMEMBER(_focusedWindow));
- PersistMgr->Transfer(TMEMBER(_fontStorage));
- PersistMgr->Transfer(TMEMBER(_interactive));
- PersistMgr->Transfer(TMEMBER(_keyboardState));
- PersistMgr->Transfer(TMEMBER(_lastTime));
- PersistMgr->Transfer(TMEMBER(_mainObject));
+HRESULT CBGame::Persist(CBPersistMgr *persistMgr) {
+ if (!persistMgr->_saving) Cleanup();
+
+ CBObject::Persist(persistMgr);
+
+ persistMgr->transfer(TMEMBER(_activeObject));
+ persistMgr->transfer(TMEMBER(_capturedObject));
+ persistMgr->transfer(TMEMBER(_cursorNoninteractive));
+ persistMgr->transfer(TMEMBER(_doNotExpandStrings));
+ persistMgr->transfer(TMEMBER(_editorMode));
+ persistMgr->transfer(TMEMBER(_fader));
+ persistMgr->transfer(TMEMBER(_freezeLevel));
+ persistMgr->transfer(TMEMBER(_focusedWindow));
+ persistMgr->transfer(TMEMBER(_fontStorage));
+ persistMgr->transfer(TMEMBER(_interactive));
+ persistMgr->transfer(TMEMBER(_keyboardState));
+ persistMgr->transfer(TMEMBER(_lastTime));
+ persistMgr->transfer(TMEMBER(_mainObject));
for (int i = 0; i < NUM_MUSIC_CHANNELS; i++) {
- PersistMgr->Transfer(TMEMBER(_music[i]));
- PersistMgr->Transfer(TMEMBER(_musicStartTime[i]));
+ persistMgr->transfer(TMEMBER(_music[i]));
+ persistMgr->transfer(TMEMBER(_musicStartTime[i]));
}
- PersistMgr->Transfer(TMEMBER(_offsetX));
- PersistMgr->Transfer(TMEMBER(_offsetY));
- PersistMgr->Transfer(TMEMBER(_offsetPercentX));
- PersistMgr->Transfer(TMEMBER(_offsetPercentY));
+ persistMgr->transfer(TMEMBER(_offsetX));
+ persistMgr->transfer(TMEMBER(_offsetY));
+ persistMgr->transfer(TMEMBER(_offsetPercentX));
+ persistMgr->transfer(TMEMBER(_offsetPercentY));
- PersistMgr->Transfer(TMEMBER(_origInteractive));
- PersistMgr->Transfer(TMEMBER_INT(_origState));
- PersistMgr->Transfer(TMEMBER(_personalizedSave));
- PersistMgr->Transfer(TMEMBER(_quitting));
+ persistMgr->transfer(TMEMBER(_origInteractive));
+ persistMgr->transfer(TMEMBER_INT(_origState));
+ persistMgr->transfer(TMEMBER(_personalizedSave));
+ persistMgr->transfer(TMEMBER(_quitting));
- _regObjects.Persist(PersistMgr);
+ _regObjects.Persist(persistMgr);
- PersistMgr->Transfer(TMEMBER(_scEngine));
- //PersistMgr->Transfer(TMEMBER(_soundMgr));
- PersistMgr->Transfer(TMEMBER_INT(_state));
- //PersistMgr->Transfer(TMEMBER(_surfaceStorage));
- PersistMgr->Transfer(TMEMBER(_subtitles));
- PersistMgr->Transfer(TMEMBER(_subtitlesSpeed));
- PersistMgr->Transfer(TMEMBER(_systemFont));
- PersistMgr->Transfer(TMEMBER(_videoFont));
- PersistMgr->Transfer(TMEMBER(_videoSubtitles));
+ persistMgr->transfer(TMEMBER(_scEngine));
+ //persistMgr->transfer(TMEMBER(_soundMgr));
+ persistMgr->transfer(TMEMBER_INT(_state));
+ //persistMgr->transfer(TMEMBER(_surfaceStorage));
+ persistMgr->transfer(TMEMBER(_subtitles));
+ persistMgr->transfer(TMEMBER(_subtitlesSpeed));
+ persistMgr->transfer(TMEMBER(_systemFont));
+ persistMgr->transfer(TMEMBER(_videoFont));
+ persistMgr->transfer(TMEMBER(_videoSubtitles));
- PersistMgr->Transfer(TMEMBER(_timer));
- PersistMgr->Transfer(TMEMBER(_timerDelta));
- PersistMgr->Transfer(TMEMBER(_timerLast));
+ persistMgr->transfer(TMEMBER(_timer));
+ persistMgr->transfer(TMEMBER(_timerDelta));
+ persistMgr->transfer(TMEMBER(_timerLast));
- PersistMgr->Transfer(TMEMBER(_liveTimer));
- PersistMgr->Transfer(TMEMBER(_liveTimerDelta));
- PersistMgr->Transfer(TMEMBER(_liveTimerLast));
+ persistMgr->transfer(TMEMBER(_liveTimer));
+ persistMgr->transfer(TMEMBER(_liveTimerDelta));
+ persistMgr->transfer(TMEMBER(_liveTimerLast));
- PersistMgr->Transfer(TMEMBER(_musicCrossfadeRunning));
- PersistMgr->Transfer(TMEMBER(_musicCrossfadeStartTime));
- PersistMgr->Transfer(TMEMBER(_musicCrossfadeLength));
- PersistMgr->Transfer(TMEMBER(_musicCrossfadeChannel1));
- PersistMgr->Transfer(TMEMBER(_musicCrossfadeChannel2));
- PersistMgr->Transfer(TMEMBER(_musicCrossfadeSwap));
+ persistMgr->transfer(TMEMBER(_musicCrossfadeRunning));
+ persistMgr->transfer(TMEMBER(_musicCrossfadeStartTime));
+ persistMgr->transfer(TMEMBER(_musicCrossfadeLength));
+ persistMgr->transfer(TMEMBER(_musicCrossfadeChannel1));
+ persistMgr->transfer(TMEMBER(_musicCrossfadeChannel2));
+ persistMgr->transfer(TMEMBER(_musicCrossfadeSwap));
- PersistMgr->Transfer(TMEMBER(_loadImageName));
- PersistMgr->Transfer(TMEMBER(_saveImageName));
- PersistMgr->Transfer(TMEMBER(_saveImageX));
- PersistMgr->Transfer(TMEMBER(_saveImageY));
- PersistMgr->Transfer(TMEMBER(_loadImageX));
- PersistMgr->Transfer(TMEMBER(_loadImageY));
+ persistMgr->transfer(TMEMBER(_loadImageName));
+ persistMgr->transfer(TMEMBER(_saveImageName));
+ persistMgr->transfer(TMEMBER(_saveImageX));
+ persistMgr->transfer(TMEMBER(_saveImageY));
+ persistMgr->transfer(TMEMBER(_loadImageX));
+ persistMgr->transfer(TMEMBER(_loadImageY));
- PersistMgr->Transfer(TMEMBER_INT(_textEncoding));
- PersistMgr->Transfer(TMEMBER(_textRTL));
+ persistMgr->transfer(TMEMBER_INT(_textEncoding));
+ persistMgr->transfer(TMEMBER(_textRTL));
- PersistMgr->Transfer(TMEMBER(_soundBufferSizeSec));
- PersistMgr->Transfer(TMEMBER(_suspendedRendering));
+ persistMgr->transfer(TMEMBER(_soundBufferSizeSec));
+ persistMgr->transfer(TMEMBER(_suspendedRendering));
- PersistMgr->Transfer(TMEMBER(_mouseLockRect));
+ persistMgr->transfer(TMEMBER(_mouseLockRect));
- _windows.Persist(PersistMgr);
+ _windows.Persist(persistMgr);
- PersistMgr->Transfer(TMEMBER(_suppressScriptErrors));
- PersistMgr->Transfer(TMEMBER(_autorunDisabled));
+ persistMgr->transfer(TMEMBER(_suppressScriptErrors));
+ persistMgr->transfer(TMEMBER(_autorunDisabled));
- PersistMgr->Transfer(TMEMBER(_autoSaveOnExit));
- PersistMgr->Transfer(TMEMBER(_autoSaveSlot));
- PersistMgr->Transfer(TMEMBER(_cursorHidden));
+ persistMgr->transfer(TMEMBER(_autoSaveOnExit));
+ persistMgr->transfer(TMEMBER(_autoSaveSlot));
+ persistMgr->transfer(TMEMBER(_cursorHidden));
- if (PersistMgr->CheckVersion(1, 0, 1))
- PersistMgr->Transfer(TMEMBER(_store));
+ if (persistMgr->checkVersion(1, 0, 1))
+ persistMgr->transfer(TMEMBER(_store));
else
_store = NULL;
- if (!PersistMgr->_saving) _quitting = false;
+ if (!persistMgr->_saving) _quitting = false;
return S_OK;
}
@@ -3933,7 +3933,7 @@ HRESULT CBGame::GetSaveSlotDescription(int Slot, char *Buffer) {
if (!pm) return E_FAIL;
_dEBUG_AbsolutePathWarning = false;
- if (FAILED(pm->InitLoad(Filename))) {
+ if (FAILED(pm->initLoad(Filename))) {
_dEBUG_AbsolutePathWarning = true;
delete pm;
return E_FAIL;
diff --git a/engines/wintermute/Base/BKeyboardState.cpp b/engines/wintermute/Base/BKeyboardState.cpp
index c91438dba9..cc25dd39a9 100644
--- a/engines/wintermute/Base/BKeyboardState.cpp
+++ b/engines/wintermute/Base/BKeyboardState.cpp
@@ -215,18 +215,18 @@ HRESULT CBKeyboardState::ReadKey(Common::Event *event) {
//////////////////////////////////////////////////////////////////////////
-HRESULT CBKeyboardState::Persist(CBPersistMgr *PersistMgr) {
- //if(!PersistMgr->_saving) Cleanup();
- CBScriptable::Persist(PersistMgr);
-
- PersistMgr->Transfer(TMEMBER(_currentAlt));
- PersistMgr->Transfer(TMEMBER(_currentCharCode));
- PersistMgr->Transfer(TMEMBER(_currentControl));
- PersistMgr->Transfer(TMEMBER(_currentKeyData));
- PersistMgr->Transfer(TMEMBER(_currentPrintable));
- PersistMgr->Transfer(TMEMBER(_currentShift));
+HRESULT CBKeyboardState::Persist(CBPersistMgr *persistMgr) {
+ //if(!persistMgr->_saving) Cleanup();
+ CBScriptable::Persist(persistMgr);
+
+ persistMgr->transfer(TMEMBER(_currentAlt));
+ persistMgr->transfer(TMEMBER(_currentCharCode));
+ persistMgr->transfer(TMEMBER(_currentControl));
+ persistMgr->transfer(TMEMBER(_currentKeyData));
+ persistMgr->transfer(TMEMBER(_currentPrintable));
+ persistMgr->transfer(TMEMBER(_currentShift));
- if (!PersistMgr->_saving) {
+ if (!persistMgr->_saving) {
_keyStates = new uint8[323]; // Hardcoded size for the common/keyboard.h enum
for (int i = 0; i < 323; i++) {
_keyStates[i] = false;
diff --git a/engines/wintermute/Base/BObject.cpp b/engines/wintermute/Base/BObject.cpp
index f947fdb1f5..f59978eb77 100644
--- a/engines/wintermute/Base/BObject.cpp
+++ b/engines/wintermute/Base/BObject.cpp
@@ -864,55 +864,55 @@ HRESULT CBObject::SaveAsText(CBDynBuffer *Buffer, int Indent) {
//////////////////////////////////////////////////////////////////////////
-HRESULT CBObject::Persist(CBPersistMgr *PersistMgr) {
- CBScriptHolder::Persist(PersistMgr);
-
- for (int i = 0; i < 7; i++) PersistMgr->Transfer(TMEMBER(_caption[i]));
- PersistMgr->Transfer(TMEMBER(_activeCursor));
- PersistMgr->Transfer(TMEMBER(_alphaColor));
- PersistMgr->Transfer(TMEMBER(_autoSoundPanning));
- PersistMgr->Transfer(TMEMBER(_cursor));
- PersistMgr->Transfer(TMEMBER(_sharedCursors));
- PersistMgr->Transfer(TMEMBER(_editorAlwaysRegister));
- PersistMgr->Transfer(TMEMBER(_editorOnly));
- PersistMgr->Transfer(TMEMBER(_editorSelected));
- PersistMgr->Transfer(TMEMBER(_iD));
- PersistMgr->Transfer(TMEMBER(_is3D));
- PersistMgr->Transfer(TMEMBER(_movable));
- PersistMgr->Transfer(TMEMBER(_posX));
- PersistMgr->Transfer(TMEMBER(_posY));
- PersistMgr->Transfer(TMEMBER(_relativeScale));
- PersistMgr->Transfer(TMEMBER(_rotatable));
- PersistMgr->Transfer(TMEMBER(_scale));
- PersistMgr->Transfer(TMEMBER(_sFX));
- PersistMgr->Transfer(TMEMBER(_sFXStart));
- PersistMgr->Transfer(TMEMBER(_sFXVolume));
- PersistMgr->Transfer(TMEMBER(_ready));
- PersistMgr->Transfer(TMEMBER(_rect));
- PersistMgr->Transfer(TMEMBER(_rectSet));
- PersistMgr->Transfer(TMEMBER(_registrable));
- PersistMgr->Transfer(TMEMBER(_shadowable));
- PersistMgr->Transfer(TMEMBER(_soundEvent));
- PersistMgr->Transfer(TMEMBER(_zoomable));
-
- PersistMgr->Transfer(TMEMBER(_scaleX));
- PersistMgr->Transfer(TMEMBER(_scaleY));
-
- PersistMgr->Transfer(TMEMBER(_rotate));
- PersistMgr->Transfer(TMEMBER(_rotateValid));
- PersistMgr->Transfer(TMEMBER(_relativeRotate));
-
- PersistMgr->Transfer(TMEMBER(_saveState));
- PersistMgr->Transfer(TMEMBER(_nonIntMouseEvents));
-
- PersistMgr->Transfer(TMEMBER_INT(_sFXType));
- PersistMgr->Transfer(TMEMBER(_sFXParam1));
- PersistMgr->Transfer(TMEMBER(_sFXParam2));
- PersistMgr->Transfer(TMEMBER(_sFXParam3));
- PersistMgr->Transfer(TMEMBER(_sFXParam4));
-
-
- PersistMgr->Transfer(TMEMBER_INT(_blendMode));
+HRESULT CBObject::Persist(CBPersistMgr *persistMgr) {
+ CBScriptHolder::Persist(persistMgr);
+
+ for (int i = 0; i < 7; i++) persistMgr->transfer(TMEMBER(_caption[i]));
+ persistMgr->transfer(TMEMBER(_activeCursor));
+ persistMgr->transfer(TMEMBER(_alphaColor));
+ persistMgr->transfer(TMEMBER(_autoSoundPanning));
+ persistMgr->transfer(TMEMBER(_cursor));
+ persistMgr->transfer(TMEMBER(_sharedCursors));
+ persistMgr->transfer(TMEMBER(_editorAlwaysRegister));
+ persistMgr->transfer(TMEMBER(_editorOnly));
+ persistMgr->transfer(TMEMBER(_editorSelected));
+ persistMgr->transfer(TMEMBER(_iD));
+ persistMgr->transfer(TMEMBER(_is3D));
+ persistMgr->transfer(TMEMBER(_movable));
+ persistMgr->transfer(TMEMBER(_posX));
+ persistMgr->transfer(TMEMBER(_posY));
+ persistMgr->transfer(TMEMBER(_relativeScale));
+ persistMgr->transfer(TMEMBER(_rotatable));
+ persistMgr->transfer(TMEMBER(_scale));
+ persistMgr->transfer(TMEMBER(_sFX));
+ persistMgr->transfer(TMEMBER(_sFXStart));
+ persistMgr->transfer(TMEMBER(_sFXVolume));
+ persistMgr->transfer(TMEMBER(_ready));
+ persistMgr->transfer(TMEMBER(_rect));
+ persistMgr->transfer(TMEMBER(_rectSet));
+ persistMgr->transfer(TMEMBER(_registrable));
+ persistMgr->transfer(TMEMBER(_shadowable));
+ persistMgr->transfer(TMEMBER(_soundEvent));
+ persistMgr->transfer(TMEMBER(_zoomable));
+
+ persistMgr->transfer(TMEMBER(_scaleX));
+ persistMgr->transfer(TMEMBER(_scaleY));
+
+ persistMgr->transfer(TMEMBER(_rotate));
+ persistMgr->transfer(TMEMBER(_rotateValid));
+ persistMgr->transfer(TMEMBER(_relativeRotate));
+
+ persistMgr->transfer(TMEMBER(_saveState));
+ persistMgr->transfer(TMEMBER(_nonIntMouseEvents));
+
+ persistMgr->transfer(TMEMBER_INT(_sFXType));
+ persistMgr->transfer(TMEMBER(_sFXParam1));
+ persistMgr->transfer(TMEMBER(_sFXParam2));
+ persistMgr->transfer(TMEMBER(_sFXParam3));
+ persistMgr->transfer(TMEMBER(_sFXParam4));
+
+
+ persistMgr->transfer(TMEMBER_INT(_blendMode));
return S_OK;
}
diff --git a/engines/wintermute/Base/BPersistMgr.cpp b/engines/wintermute/Base/BPersistMgr.cpp
index 938498dae8..c0cab7f865 100644
--- a/engines/wintermute/Base/BPersistMgr.cpp
+++ b/engines/wintermute/Base/BPersistMgr.cpp
@@ -74,19 +74,19 @@ CBPersistMgr::CBPersistMgr(CBGame *inGame): CBBase(inGame) {
//////////////////////////////////////////////////////////////////////////
CBPersistMgr::~CBPersistMgr() {
- Cleanup();
+ cleanup();
}
//////////////////////////////////////////////////////////////////////////
-void CBPersistMgr::Cleanup() {
-/* if (_buffer) {
- if (_saving) free(_buffer);
- else delete [] _buffer; // allocated by file manager
- }
- _buffer = NULL;
-
- _bufferSize = 0;*/
+void CBPersistMgr::cleanup() {
+ /* if (_buffer) {
+ if (_saving) free(_buffer);
+ else delete [] _buffer; // allocated by file manager
+ }
+ _buffer = NULL;
+
+ _bufferSize = 0;*/
_offset = 0;
delete[] _richBuffer;
@@ -103,26 +103,19 @@ void CBPersistMgr::Cleanup() {
delete [] _thumbnailData;
_thumbnailData = NULL;
}
-
+
delete _loadStream;
delete _saveStream;
_loadStream = NULL;
_saveStream = NULL;
}
-// TODO: This is not at all endian-safe
-uint32 makeUint32(byte first, byte second, byte third, byte fourth) {
- uint32 retVal = first;
- retVal = retVal & second << 8 & third << 16 & fourth << 24;
- return retVal;
-}
-
Common::String CBPersistMgr::getFilenameForSlot(int slot) {
// TODO: Temporary solution until I have the namespacing sorted out
return Common::String::format("save%03d.DirtySplitSav", slot);
}
-void CBPersistMgr::getSaveStateDesc(int slot, SaveStateDescriptor& desc) {
+void CBPersistMgr::getSaveStateDesc(int slot, SaveStateDescriptor &desc) {
Common::String filename = getFilenameForSlot(slot);
warning("Trying to list savegame %s in slot %d", filename.c_str(), slot);
if (FAILED(readHeader(filename))) {
@@ -133,7 +126,7 @@ void CBPersistMgr::getSaveStateDesc(int slot, SaveStateDescriptor& desc) {
desc.setDescription(_savedDescription);
desc.setDeletableFlag(true);
desc.setWriteProtectedFlag(false);
-
+
if (_thumbnailDataSize > 0) {
Common::MemoryReadStream thumbStream(_thumbnailData, _thumbnailDataSize);
Graphics::BitmapDecoder bmpDecoder;
@@ -176,19 +169,12 @@ bool CBPersistMgr::getSaveExists(int slot) {
}
//////////////////////////////////////////////////////////////////////////
-HRESULT CBPersistMgr::InitSave(const char *Desc) {
- if (!Desc) return E_FAIL;
-
- HRESULT res;
+HRESULT CBPersistMgr::initSave(const char *desc) {
+ if (!desc) return E_FAIL;
- Cleanup();
+ cleanup();
_saving = true;
-/* _buffer = (byte *)malloc(SAVE_BUFFER_INIT_SIZE);
- if (_buffer) {
- _bufferSize = SAVE_BUFFER_INIT_SIZE;
- res = S_OK;
- } else res = E_FAIL;*/
_saveStream = new Common::MemoryWriteStreamDynamic(DisposeAfterUse::YES);
if (_saveStream) {
@@ -201,12 +187,11 @@ HRESULT CBPersistMgr::InitSave(const char *Desc) {
}
}
-
uint32 magic = DCGF_MAGIC;
- PutDWORD(magic);
+ putDWORD(magic);
magic = SAVE_MAGIC_2;
- PutDWORD(magic);
+ putDWORD(magic);
byte VerMajor, VerMinor, ExtMajor, ExtMinor;
Game->GetVersion(&VerMajor, &VerMinor, &ExtMajor, &ExtMinor);
@@ -217,15 +202,14 @@ HRESULT CBPersistMgr::InitSave(const char *Desc) {
_saveStream->writeByte(ExtMinor);
// new in ver 2
- PutDWORD((uint32)DCGF_VER_BUILD);
- PutString(Game->_name);
+ putDWORD((uint32)DCGF_VER_BUILD);
+ putString(Game->_name);
// thumbnail data size
bool ThumbnailOK = false;
if (Game->_cachedThumbnail) {
if (Game->_cachedThumbnail->_thumbnail) {
- uint32 Size = 0;
Common::MemoryWriteStreamDynamic thumbStream(DisposeAfterUse::YES);
if (Game->_cachedThumbnail->_thumbnail->writeBMPToStream(&thumbStream)) {
_saveStream->writeUint32LE(thumbStream.size());
@@ -234,25 +218,22 @@ HRESULT CBPersistMgr::InitSave(const char *Desc) {
_saveStream->writeUint32LE(0);
}
-/* PutDWORD(Size);
- if (Size > 0) _saveStream->write(Buffer, Size);
- delete [] Buffer;*/
ThumbnailOK = true;
}
}
- if (!ThumbnailOK) PutDWORD(0);
+ if (!ThumbnailOK) putDWORD(0);
// in any case, destroy the cached thumbnail once used
delete Game->_cachedThumbnail;
Game->_cachedThumbnail = NULL;
- uint32 DataOffset = _offset +
+ uint32 dataOffset = _offset +
sizeof(uint32) + // data offset
- sizeof(uint32) + strlen(Desc) + 1 + // description
+ sizeof(uint32) + strlen(desc) + 1 + // description
sizeof(uint32); // timestamp
- PutDWORD(DataOffset);
- PutString(Desc);
+ putDWORD(dataOffset);
+ putString(desc);
g_system->getTimeAndDate(_savedTimestamp);
putTimeDate(_savedTimestamp);
@@ -261,117 +242,94 @@ HRESULT CBPersistMgr::InitSave(const char *Desc) {
}
return S_OK;
}
-// TODO: Do this properly, this is just a quickfix, that probably doesnt even work.
-// The main point of which is ditching BASS completely.
-byte getLowByte(uint16 word) {
- uint16 mask = 0xff;
- return word & mask;
-}
-
-byte getHighByte(uint16 word) {
- uint16 mask = 0xff << 8;
- word = word & mask;
- return word >> 8;
-}
-
-uint16 getLowWord(uint32 dword) {
- uint32 mask = 0xffff;
- return dword & mask;
-}
-
-uint16 getHighWord(uint32 dword) {
- uint32 mask = 0xffff << 16;
- dword = dword & mask;
- return dword >> 16;
-}
HRESULT CBPersistMgr::readHeader(const Common::String &filename) {
- Cleanup();
-
+ cleanup();
+
_saving = false;
-
+
_loadStream = g_system->getSavefileManager()->openForLoading(filename);
//_buffer = Game->_fileManager->ReadWholeFile(Filename, &_bufferSize);
if (_loadStream) {
uint32 Magic;
- Magic = GetDWORD();
+ Magic = getDWORD();
if (Magic != DCGF_MAGIC) {
- Cleanup();
+ cleanup();
return E_FAIL;
}
- Magic = GetDWORD();
+ Magic = getDWORD();
if (Magic == SAVE_MAGIC || Magic == SAVE_MAGIC_2) {
_savedVerMajor = _loadStream->readByte();
_savedVerMinor = _loadStream->readByte();
_savedExtMajor = _loadStream->readByte();
_savedExtMinor = _loadStream->readByte();
-
+
if (Magic == SAVE_MAGIC_2) {
- _savedVerBuild = (byte)GetDWORD();
- _savedName = GetString();
+ _savedVerBuild = (byte)getDWORD();
+ _savedName = getString();
// load thumbnail
- _thumbnailDataSize = GetDWORD();
+ _thumbnailDataSize = getDWORD();
if (_thumbnailDataSize > 0) {
_thumbnailData = new byte[_thumbnailDataSize];
if (_thumbnailData) {
- GetBytes(_thumbnailData, _thumbnailDataSize);
+ getBytes(_thumbnailData, _thumbnailDataSize);
} else _thumbnailDataSize = 0;
}
} else _savedVerBuild = 35; // last build with ver1 savegames
- uint32 DataOffset = GetDWORD();
+ uint32 DataOffset = getDWORD();
- _savedDescription = GetString();
+ _savedDescription = getString();
_savedTimestamp = getTimeDate();
_savedPlayTime = _loadStream->readUint32LE();
_offset = DataOffset;
-
+
return S_OK;
}
}
- Cleanup();
+ cleanup();
return E_FAIL;
}
//////////////////////////////////////////////////////////////////////////
-HRESULT CBPersistMgr::InitLoad(const char *Filename) {
+HRESULT CBPersistMgr::initLoad(const char *filename) {
- if (FAILED(readHeader(Filename))) {
- Cleanup();
+ if (FAILED(readHeader(filename))) {
+ cleanup();
return E_FAIL;
}
_saving = false;
if (_savedName == "" || scumm_stricmp(_savedName.c_str(), Game->_name) != 0) {
Game->LOG(0, "ERROR: Saved game name doesn't match current game");
- Cleanup();
+ cleanup();
return E_FAIL;
}
// if save is newer version than we are, fail
if (_savedVerMajor > DCGF_VER_MAJOR ||
- (_savedVerMajor == DCGF_VER_MAJOR && _savedVerMinor > DCGF_VER_MINOR) ||
- (_savedVerMajor == DCGF_VER_MAJOR && _savedVerMinor == DCGF_VER_MINOR && _savedVerBuild > DCGF_VER_BUILD)
- ) {
+ (_savedVerMajor == DCGF_VER_MAJOR && _savedVerMinor > DCGF_VER_MINOR) ||
+ (_savedVerMajor == DCGF_VER_MAJOR && _savedVerMinor == DCGF_VER_MINOR && _savedVerBuild > DCGF_VER_BUILD)
+ ) {
Game->LOG(0, "ERROR: Saved game version is newer than current game");
- Cleanup();
+ cleanup();
return E_FAIL;
}
// if save is older than the minimal version we support
if (_savedVerMajor < SAVEGAME_VER_MAJOR ||
- (_savedVerMajor == SAVEGAME_VER_MAJOR && _savedVerMinor < SAVEGAME_VER_MINOR) ||
- (_savedVerMajor == SAVEGAME_VER_MAJOR && _savedVerMinor == SAVEGAME_VER_MINOR && _savedVerBuild < SAVEGAME_VER_BUILD)
- ) {
+ (_savedVerMajor == SAVEGAME_VER_MAJOR && _savedVerMinor < SAVEGAME_VER_MINOR) ||
+ (_savedVerMajor == SAVEGAME_VER_MAJOR && _savedVerMinor == SAVEGAME_VER_MINOR && _savedVerBuild < SAVEGAME_VER_BUILD)
+ ) {
Game->LOG(0, "ERROR: Saved game is too old and cannot be used by this version of game engine");
- Cleanup();
+ cleanup();
return E_FAIL;
}
@@ -389,85 +347,58 @@ HRESULT CBPersistMgr::InitLoad(const char *Filename) {
//////////////////////////////////////////////////////////////////////////
-HRESULT CBPersistMgr::SaveFile(const char *Filename) {
- return Game->_fileManager->SaveFile(Filename, ((Common::MemoryWriteStreamDynamic*)_saveStream)->getData(), ((Common::MemoryWriteStreamDynamic*)_saveStream)->size(), Game->_compressedSavegames, _richBuffer, _richBufferSize);
+HRESULT CBPersistMgr::saveFile(const char *filename) {
+ return Game->_fileManager->SaveFile(filename, ((Common::MemoryWriteStreamDynamic *)_saveStream)->getData(), ((Common::MemoryWriteStreamDynamic *)_saveStream)->size(), Game->_compressedSavegames, _richBuffer, _richBufferSize);
}
//////////////////////////////////////////////////////////////////////////
-HRESULT CBPersistMgr::PutBytes(byte *buffer, uint32 size) {
+HRESULT CBPersistMgr::putBytes(byte *buffer, uint32 size) {
_saveStream->write(buffer, size);
if (_saveStream->err())
return E_FAIL;
return S_OK;
-/* while (_offset + Size > _bufferSize) {
- _bufferSize += SAVE_BUFFER_GROW_BY;
- _buffer = (byte *)realloc(_buffer, _bufferSize);
- if (!_buffer) {
- Game->LOG(0, "Error reallocating save buffer to %d bytes", _bufferSize);
- return E_FAIL;
- }
- }
-
- memcpy(_buffer + _offset, Buffer, Size);
- _offset += Size;
-
- return S_OK;*/
}
//////////////////////////////////////////////////////////////////////////
-HRESULT CBPersistMgr::GetBytes(byte *buffer, uint32 size) {
+HRESULT CBPersistMgr::getBytes(byte *buffer, uint32 size) {
_loadStream->read(buffer, size);
if (_loadStream->err())
return E_FAIL;
return S_OK;
-/* if (_offset + Size > _bufferSize) {
- Game->LOG(0, "Fatal: Save buffer underflow");
- return E_FAIL;
- }
-
- memcpy(Buffer, _buffer + _offset, Size);
- _offset += Size;
-
- return S_OK;*/
}
//////////////////////////////////////////////////////////////////////////
-void CBPersistMgr::PutDWORD(uint32 Val) {
- //PutBytes((byte *)&Val, sizeof(uint32));
- _saveStream->writeUint32LE(Val);
+void CBPersistMgr::putDWORD(uint32 val) {
+ _saveStream->writeUint32LE(val);
}
//////////////////////////////////////////////////////////////////////////
-uint32 CBPersistMgr::GetDWORD() {
+uint32 CBPersistMgr::getDWORD() {
uint32 ret = _loadStream->readUint32LE();
-// GetBytes((byte *)&ret, sizeof(uint32));
return ret;
}
//////////////////////////////////////////////////////////////////////////
-void CBPersistMgr::PutString(const Common::String &Val) {
- if (!Val.size()) PutString("(null)");
+void CBPersistMgr::putString(const Common::String &val) {
+ if (!val.size()) putString("(null)");
else {
- /* PutDWORD(strlen(Val) + 1);
- PutBytes((byte *)Val, strlen(Val) + 1);*/
- _saveStream->writeUint32LE(Val.size());
- _saveStream->writeString(Val);
+ _saveStream->writeUint32LE(val.size());
+ _saveStream->writeString(val);
}
}
//////////////////////////////////////////////////////////////////////////
-char *CBPersistMgr::GetString() {
+char *CBPersistMgr::getString() {
uint32 len = _loadStream->readUint32LE();
char *ret = new char[len + 1];
_loadStream->read(ret, len);
ret[len] = '\0';
-/* char *ret = (char *)(_buffer + _offset);
- _offset += len;*/
- if (!strcmp(ret, "(null)")) {
+
+ if (!strcmp(ret, "(null)")) {
delete[] ret;
return NULL;
} else return ret;
@@ -481,7 +412,7 @@ HRESULT CBPersistMgr::putTimeDate(const TimeDate &t) {
_saveStream->writeSint32LE(t.tm_mon);
_saveStream->writeSint32LE(t.tm_year);
// _saveStream->writeSint32LE(t.tm_wday); //TODO: Add this in when merging next
-
+
if (_saveStream->err()) {
return E_FAIL;
}
@@ -507,7 +438,7 @@ void CBPersistMgr::putFloat(float val) {
}
float CBPersistMgr::getFloat() {
- char *str = GetString();
+ char *str = getString();
float value = 0.0f;
int ret = sscanf(str, "F%f", &value);
if (ret != 1) {
@@ -525,7 +456,7 @@ void CBPersistMgr::putDouble(double val) {
}
double CBPersistMgr::getDouble() {
- char *str = GetString();
+ char *str = getString();
double value = 0.0f;
int ret = sscanf(str, "F%f", &value);
if (ret != 1) {
@@ -537,16 +468,14 @@ double CBPersistMgr::getDouble() {
//////////////////////////////////////////////////////////////////////////
// bool
-HRESULT CBPersistMgr::Transfer(const char *Name, bool *Val) {
- if (_saving) {
- //return PutBytes((byte *)Val, sizeof(bool));
- _saveStream->writeByte(*Val);
+HRESULT CBPersistMgr::transfer(const char *name, bool *val) {
+ if (_saving) {
+ _saveStream->writeByte(*val);
if (_saveStream->err())
return E_FAIL;
return S_OK;
} else {
- //return GetBytes((byte *)Val, sizeof(bool));
- *Val = _loadStream->readByte();
+ *val = _loadStream->readByte();
if (_loadStream->err())
return E_FAIL;
return S_OK;
@@ -556,16 +485,14 @@ HRESULT CBPersistMgr::Transfer(const char *Name, bool *Val) {
//////////////////////////////////////////////////////////////////////////
// int
-HRESULT CBPersistMgr::Transfer(const char *Name, int *Val) {
+HRESULT CBPersistMgr::transfer(const char *name, int *val) {
if (_saving) {
- //return PutBytes((byte *)Val, sizeof(int));
- _saveStream->writeSint32LE(*Val);
+ _saveStream->writeSint32LE(*val);
if (_saveStream->err())
return E_FAIL;
return S_OK;
} else {
- // return GetBytes((byte *)Val, sizeof(int));
- *Val = _loadStream->readSint32LE();
+ *val = _loadStream->readSint32LE();
if (_loadStream->err())
return E_FAIL;
return S_OK;
@@ -575,16 +502,14 @@ HRESULT CBPersistMgr::Transfer(const char *Name, int *Val) {
//////////////////////////////////////////////////////////////////////////
// DWORD
-HRESULT CBPersistMgr::Transfer(const char *Name, uint32 *Val) {
+HRESULT CBPersistMgr::transfer(const char *name, uint32 *val) {
if (_saving) {
- //return PutBytes((byte *)Val, sizeof(uint32));
- _saveStream->writeUint32LE(*Val);
+ _saveStream->writeUint32LE(*val);
if (_saveStream->err())
return E_FAIL;
return S_OK;
} else {
- // return GetBytes((byte *)Val, sizeof(uint32));
- *Val = _loadStream->readUint32LE();
+ *val = _loadStream->readUint32LE();
if (_loadStream->err())
return E_FAIL;
return S_OK;
@@ -594,16 +519,14 @@ HRESULT CBPersistMgr::Transfer(const char *Name, uint32 *Val) {
//////////////////////////////////////////////////////////////////////////
// float
-HRESULT CBPersistMgr::Transfer(const char *Name, float *Val) {
+HRESULT CBPersistMgr::transfer(const char *name, float *val) {
if (_saving) {
- //return PutBytes((byte *)Val, sizeof(float));
- putFloat(*Val);
+ putFloat(*val);
if (_saveStream->err())
return E_FAIL;
return S_OK;
} else {
- //return GetBytes((byte *)Val, sizeof(float));
- *Val = getFloat();
+ *val = getFloat();
if (_loadStream->err())
return E_FAIL;
return S_OK;
@@ -613,16 +536,14 @@ HRESULT CBPersistMgr::Transfer(const char *Name, float *Val) {
//////////////////////////////////////////////////////////////////////////
// double
-HRESULT CBPersistMgr::Transfer(const char *Name, double *Val) {
+HRESULT CBPersistMgr::transfer(const char *name, double *val) {
if (_saving) {
- //return PutBytes((byte *)Val, sizeof(double));
- putDouble(*Val);
+ putDouble(*val);
if (_saveStream->err())
return E_FAIL;
return S_OK;
} else {
- // return GetBytes((byte *)Val, sizeof(double));
- *Val = getDouble();
+ *val = getDouble();
if (_loadStream->err())
return E_FAIL;
return S_OK;
@@ -632,58 +553,46 @@ HRESULT CBPersistMgr::Transfer(const char *Name, double *Val) {
//////////////////////////////////////////////////////////////////////////
// char*
-HRESULT CBPersistMgr::Transfer(const char *Name, char **Val) {
+HRESULT CBPersistMgr::transfer(const char *name, char **val) {
if (_saving) {
- PutString(*Val);
+ putString(*val);
return S_OK;
} else {
- char *str = GetString();
+ char *str = getString();
if (_loadStream->err()) {
delete[] str;
return E_FAIL;
}
- *Val = str;
- /* if (str) {
-
- char *ret = new char[strlen(str) + 1];
- strcpy(ret, str);
- delete[] str;
- } else *Val = NULL;*/
+ *val = str;
return S_OK;
}
}
//////////////////////////////////////////////////////////////////////////
// const char*
-HRESULT CBPersistMgr::Transfer(const char *Name, const char **Val) {
+HRESULT CBPersistMgr::transfer(const char *name, const char **val) {
if (_saving) {
- PutString(*Val);
+ putString(*val);
return S_OK;
} else {
- char *str = GetString();
+ char *str = getString();
if (_loadStream->err()) {
delete[] str;
return E_FAIL;
}
- *Val = str;
-/* if (str) {
-
- char *ret = new char[strlen(str) + 1];
- strcpy(ret, str);
- delete[] str;
- } else *Val = NULL;*/
+ *val = str;
return S_OK;
}
}
//////////////////////////////////////////////////////////////////////////
// Common::String
-HRESULT CBPersistMgr::Transfer(const char *Name, Common::String *val) {
+HRESULT CBPersistMgr::transfer(const char *name, Common::String *val) {
if (_saving) {
- PutString(*val);
+ putString(*val);
return S_OK;
} else {
- char *str = GetString();
+ char *str = getString();
if (_loadStream->err()) {
delete[] str;
return E_FAIL;
@@ -694,40 +603,32 @@ HRESULT CBPersistMgr::Transfer(const char *Name, Common::String *val) {
} else {
*val = "";
}
- /* if (str) {
-
- char *ret = new char[strlen(str) + 1];
- strcpy(ret, str);
- delete[] str;
- } else *Val = NULL;*/
return S_OK;
}
}
//////////////////////////////////////////////////////////////////////////
-HRESULT CBPersistMgr::Transfer(const char *Name, AnsiStringArray &Val) {
+HRESULT CBPersistMgr::transfer(const char *name, AnsiStringArray &val) {
size_t size;
if (_saving) {
- size = Val.size();
+ size = val.size();
_saveStream->writeUint32LE(size);
- //PutBytes((byte *)&size, sizeof(size_t));
- for (AnsiStringArray::iterator it = Val.begin(); it != Val.end(); ++it) {
- PutString((*it).c_str());
+ for (AnsiStringArray::iterator it = val.begin(); it != val.end(); ++it) {
+ putString((*it).c_str());
}
} else {
- Val.clear();
+ val.clear();
size = _loadStream->readUint32LE();
- //GetBytes((byte *)&size, sizeof(size_t));
for (size_t i = 0; i < size; i++) {
- char *str = GetString();
+ char *str = getString();
if (_loadStream->err()) {
delete[] str;
return E_FAIL;
}
- if (str) Val.push_back(str);
+ if (str) val.push_back(str);
delete[] str;
}
}
@@ -737,16 +638,14 @@ HRESULT CBPersistMgr::Transfer(const char *Name, AnsiStringArray &Val) {
//////////////////////////////////////////////////////////////////////////
// BYTE
-HRESULT CBPersistMgr::Transfer(const char *Name, byte *Val) {
+HRESULT CBPersistMgr::transfer(const char *name, byte *val) {
if (_saving) {
- //return PutBytes((byte *)Val, sizeof(byte));
- _saveStream->writeByte(*Val);
+ _saveStream->writeByte(*val);
if (_saveStream->err())
return E_FAIL;
return S_OK;
- } else {
- //return GetBytes((byte *)Val, sizeof(byte));
- *Val = _loadStream->readByte();
+ } else {
+ *val = _loadStream->readByte();
if (_loadStream->err())
return E_FAIL;
return S_OK;
@@ -756,23 +655,20 @@ HRESULT CBPersistMgr::Transfer(const char *Name, byte *Val) {
//////////////////////////////////////////////////////////////////////////
// RECT
-HRESULT CBPersistMgr::Transfer(const char *Name, RECT *Val) {
+HRESULT CBPersistMgr::transfer(const char *name, RECT *val) {
if (_saving) {
- // return PutBytes((byte *)Val, sizeof(RECT));
- _saveStream->writeSint32LE(Val->left);
- _saveStream->writeSint32LE(Val->top);
- _saveStream->writeSint32LE(Val->right);
- _saveStream->writeSint32LE(Val->bottom);
+ _saveStream->writeSint32LE(val->left);
+ _saveStream->writeSint32LE(val->top);
+ _saveStream->writeSint32LE(val->right);
+ _saveStream->writeSint32LE(val->bottom);
if (_saveStream->err())
return E_FAIL;
return S_OK;
- }
- else {
- // return GetBytes((byte *)Val, sizeof(RECT));
- Val->left = _loadStream->readSint32LE();
- Val->top = _loadStream->readSint32LE();
- Val->right = _loadStream->readSint32LE();
- Val->bottom = _loadStream->readSint32LE();
+ } else {
+ val->left = _loadStream->readSint32LE();
+ val->top = _loadStream->readSint32LE();
+ val->right = _loadStream->readSint32LE();
+ val->bottom = _loadStream->readSint32LE();
if (_loadStream->err())
return E_FAIL;
return S_OK;
@@ -782,56 +678,48 @@ HRESULT CBPersistMgr::Transfer(const char *Name, RECT *Val) {
//////////////////////////////////////////////////////////////////////////
// POINT
-HRESULT CBPersistMgr::Transfer(const char *Name, POINT *Val) {
+HRESULT CBPersistMgr::transfer(const char *name, POINT *val) {
if (_saving) {
- //return PutBytes((byte *)Val, sizeof(POINT));
- _saveStream->writeSint32LE(Val->x);
- _saveStream->writeSint32LE(Val->y);
+ _saveStream->writeSint32LE(val->x);
+ _saveStream->writeSint32LE(val->y);
} else {
- // return GetBytes((byte *)Val, sizeof(POINT));
- Val->x = _loadStream->readSint32LE();
- Val->y = _loadStream->readSint32LE();
+ val->x = _loadStream->readSint32LE();
+ val->y = _loadStream->readSint32LE();
}
}
//////////////////////////////////////////////////////////////////////////
// Vector2
-HRESULT CBPersistMgr::Transfer(const char *Name, Vector2 *Val) {
+HRESULT CBPersistMgr::transfer(const char *name, Vector2 *val) {
if (_saving) {
- //return PutBytes((byte *)Val, sizeof(Vector2));
- putFloat(Val->x);
- putFloat(Val->y);
+ putFloat(val->x);
+ putFloat(val->y);
} else {
- // return GetBytes((byte *)Val, sizeof(Vector2));
- Val->x = getFloat();
- Val->y = getFloat();
+ val->x = getFloat();
+ val->y = getFloat();
}
}
//////////////////////////////////////////////////////////////////////////
// generic pointer
-HRESULT CBPersistMgr::Transfer(const char *Name, void *Val) {
+HRESULT CBPersistMgr::transfer(const char *name, void *val) {
int ClassID = -1, InstanceID = -1;
if (_saving) {
- CSysClassRegistry::GetInstance()->GetPointerID(*(void **)Val, &ClassID, &InstanceID);
- if (*(void **)Val != NULL && (ClassID == -1 || InstanceID == -1)) {
- Game->LOG(0, "Warning: invalid instance '%s'", Name);
+ CSysClassRegistry::GetInstance()->GetPointerID(*(void **)val, &ClassID, &InstanceID);
+ if (*(void **)val != NULL && (ClassID == -1 || InstanceID == -1)) {
+ Game->LOG(0, "Warning: invalid instance '%s'", name);
}
_saveStream->writeUint32LE(ClassID);
_saveStream->writeUint32LE(InstanceID);
- // PutDWORD(ClassID);
- // PutDWORD(InstanceID);
} else {
ClassID = _loadStream->readUint32LE();
InstanceID = _loadStream->readUint32LE();
-/* ClassID = GetDWORD();
- InstanceID = GetDWORD();*/
- *(void **)Val = CSysClassRegistry::GetInstance()->IDToPointer(ClassID, InstanceID);
+ *(void **)val = CSysClassRegistry::GetInstance()->IDToPointer(ClassID, InstanceID);
}
return S_OK;
@@ -839,13 +727,13 @@ HRESULT CBPersistMgr::Transfer(const char *Name, void *Val) {
//////////////////////////////////////////////////////////////////////////
-bool CBPersistMgr::CheckVersion(byte VerMajor, byte VerMinor, byte VerBuild) {
+bool CBPersistMgr::checkVersion(byte verMajor, byte verMinor, byte verBuild) {
if (_saving) return true;
// it's ok if we are same or newer than the saved game
- if (VerMajor > _savedVerMajor ||
- (VerMajor == _savedVerMajor && VerMinor > _savedVerMinor) ||
- (VerMajor == _savedVerMajor && VerMinor == _savedVerMinor && VerBuild > _savedVerBuild)
+ if (verMajor > _savedVerMajor ||
+ (verMajor == _savedVerMajor && verMinor > _savedVerMinor) ||
+ (verMajor == _savedVerMajor && verMinor == _savedVerMinor && verBuild > _savedVerBuild)
) return false;
return true;
diff --git a/engines/wintermute/Base/BPersistMgr.h b/engines/wintermute/Base/BPersistMgr.h
index 12760bf6ca..79ec12214a 100644
--- a/engines/wintermute/Base/BPersistMgr.h
+++ b/engines/wintermute/Base/BPersistMgr.h
@@ -51,49 +51,48 @@ public:
byte _savedExtMajor;
byte _savedExtMinor;
Common::String _savedName;
- HRESULT SaveFile(const char *Filename);
- uint32 GetDWORD();
- void PutDWORD(uint32 Val);
- char *GetString();
- void PutString(const Common::String &Val);
+ HRESULT saveFile(const char *filename);
+ uint32 getDWORD();
+ void putDWORD(uint32 val);
+ char *getString();
+ void putString(const Common::String &val);
float getFloat();
void putFloat(float val);
double getDouble();
void putDouble(double val);
- void Cleanup();
- void getSaveStateDesc(int slot, SaveStateDescriptor& desc);
+ void cleanup();
+ void getSaveStateDesc(int slot, SaveStateDescriptor &desc);
void deleteSaveSlot(int slot);
uint32 getMaxUsedSlot();
bool getSaveExists(int slot);
- HRESULT InitLoad(const char *Filename);
- HRESULT InitSave(const char *Desc);
- HRESULT GetBytes(byte *Buffer, uint32 Size);
- HRESULT PutBytes(byte *Buffer, uint32 Size);
+ HRESULT initLoad(const char *filename);
+ HRESULT initSave(const char *desc);
+ HRESULT getBytes(byte *buffer, uint32 size);
+ HRESULT putBytes(byte *buffer, uint32 size);
uint32 _offset;
- //uint32 _bufferSize;
- //byte *_buffer;
+
bool _saving;
uint32 _richBufferSize;
byte *_richBuffer;
- HRESULT Transfer(const char *Name, void *Val);
- HRESULT Transfer(const char *Name, int *Val);
- HRESULT Transfer(const char *Name, uint32 *Val);
- HRESULT Transfer(const char *Name, float *Val);
- HRESULT Transfer(const char *Name, double *Val);
- HRESULT Transfer(const char *Name, bool *Val);
- HRESULT Transfer(const char *Name, byte *Val);
- HRESULT Transfer(const char *Name, RECT *Val);
- HRESULT Transfer(const char *Name, POINT *Val);
- HRESULT Transfer(const char *Name, const char **Val);
- HRESULT Transfer(const char *Name, char **Val);
- HRESULT Transfer(const char *Name, Common::String *val);
- HRESULT Transfer(const char *Name, Vector2 *Val);
- HRESULT Transfer(const char *Name, AnsiStringArray &Val);
+ HRESULT transfer(const char *name, void *val);
+ HRESULT transfer(const char *name, int *val);
+ HRESULT transfer(const char *name, uint32 *val);
+ HRESULT transfer(const char *name, float *val);
+ HRESULT transfer(const char *name, double *val);
+ HRESULT transfer(const char *name, bool *val);
+ HRESULT transfer(const char *name, byte *val);
+ HRESULT transfer(const char *name, RECT *val);
+ HRESULT transfer(const char *name, POINT *val);
+ HRESULT transfer(const char *name, const char **val);
+ HRESULT transfer(const char *name, char **val);
+ HRESULT transfer(const char *name, Common::String *val);
+ HRESULT transfer(const char *name, Vector2 *val);
+ HRESULT transfer(const char *name, AnsiStringArray &Val);
CBPersistMgr(CBGame *inGame = NULL);
virtual ~CBPersistMgr();
- bool CheckVersion(byte VerMajor, byte VerMinor, byte VerBuild);
+ bool checkVersion(byte verMajor, byte verMinor, byte verBuild);
uint32 _thumbnailDataSize;
byte *_thumbnailData;
diff --git a/engines/wintermute/Base/BPoint.cpp b/engines/wintermute/Base/BPoint.cpp
index 943e6d7843..105159cb6c 100644
--- a/engines/wintermute/Base/BPoint.cpp
+++ b/engines/wintermute/Base/BPoint.cpp
@@ -53,10 +53,10 @@ CBPoint::CBPoint(int initX, int initY) {
}
//////////////////////////////////////////////////////////////////////////
-HRESULT CBPoint::Persist(CBPersistMgr *PersistMgr) {
+HRESULT CBPoint::Persist(CBPersistMgr *persistMgr) {
- PersistMgr->Transfer(TMEMBER(x));
- PersistMgr->Transfer(TMEMBER(y));
+ persistMgr->transfer(TMEMBER(x));
+ persistMgr->transfer(TMEMBER(y));
return S_OK;
}
diff --git a/engines/wintermute/Base/BRegion.cpp b/engines/wintermute/Base/BRegion.cpp
index dd3c8db881..f7d3f5b2ef 100644
--- a/engines/wintermute/Base/BRegion.cpp
+++ b/engines/wintermute/Base/BRegion.cpp
@@ -406,16 +406,16 @@ HRESULT CBRegion::SaveAsText(CBDynBuffer *Buffer, int Indent, const char *NameOv
//////////////////////////////////////////////////////////////////////////
-HRESULT CBRegion::Persist(CBPersistMgr *PersistMgr) {
+HRESULT CBRegion::Persist(CBPersistMgr *persistMgr) {
- CBObject::Persist(PersistMgr);
+ CBObject::Persist(persistMgr);
- PersistMgr->Transfer(TMEMBER(_active));
- PersistMgr->Transfer(TMEMBER(_editorSelectedPoint));
- PersistMgr->Transfer(TMEMBER(_lastMimicScale));
- PersistMgr->Transfer(TMEMBER(_lastMimicX));
- PersistMgr->Transfer(TMEMBER(_lastMimicY));
- _points.Persist(PersistMgr);
+ persistMgr->transfer(TMEMBER(_active));
+ persistMgr->transfer(TMEMBER(_editorSelectedPoint));
+ persistMgr->transfer(TMEMBER(_lastMimicScale));
+ persistMgr->transfer(TMEMBER(_lastMimicX));
+ persistMgr->transfer(TMEMBER(_lastMimicY));
+ _points.Persist(persistMgr);
return S_OK;
}
diff --git a/engines/wintermute/Base/BScriptHolder.cpp b/engines/wintermute/Base/BScriptHolder.cpp
index 2b575befa5..50a704421c 100644
--- a/engines/wintermute/Base/BScriptHolder.cpp
+++ b/engines/wintermute/Base/BScriptHolder.cpp
@@ -263,13 +263,13 @@ HRESULT CBScriptHolder::SaveAsText(CBDynBuffer *Buffer, int Indent) {
//////////////////////////////////////////////////////////////////////////
-HRESULT CBScriptHolder::Persist(CBPersistMgr *PersistMgr) {
- CBScriptable::Persist(PersistMgr);
+HRESULT CBScriptHolder::Persist(CBPersistMgr *persistMgr) {
+ CBScriptable::Persist(persistMgr);
- PersistMgr->Transfer(TMEMBER(_filename));
- PersistMgr->Transfer(TMEMBER(_freezable));
- PersistMgr->Transfer(TMEMBER(_name));
- _scripts.Persist(PersistMgr);
+ persistMgr->transfer(TMEMBER(_filename));
+ persistMgr->transfer(TMEMBER(_freezable));
+ persistMgr->transfer(TMEMBER(_name));
+ _scripts.Persist(persistMgr);
return S_OK;
}
diff --git a/engines/wintermute/Base/BScriptable.cpp b/engines/wintermute/Base/BScriptable.cpp
index ef378500e2..715a1fef8c 100644
--- a/engines/wintermute/Base/BScriptable.cpp
+++ b/engines/wintermute/Base/BScriptable.cpp
@@ -139,11 +139,11 @@ void CBScriptable::ScSetBool(bool Val) {
//////////////////////////////////////////////////////////////////////////
-HRESULT CBScriptable::Persist(CBPersistMgr *PersistMgr) {
- PersistMgr->Transfer(TMEMBER(Game));
- PersistMgr->Transfer(TMEMBER(_refCount));
- PersistMgr->Transfer(TMEMBER(_scProp));
- PersistMgr->Transfer(TMEMBER(_scValue));
+HRESULT CBScriptable::Persist(CBPersistMgr *persistMgr) {
+ persistMgr->transfer(TMEMBER(Game));
+ persistMgr->transfer(TMEMBER(_refCount));
+ persistMgr->transfer(TMEMBER(_scProp));
+ persistMgr->transfer(TMEMBER(_scValue));
return S_OK;
}
diff --git a/engines/wintermute/Base/BSound.cpp b/engines/wintermute/Base/BSound.cpp
index 5df469934f..9a48484bfe 100644
--- a/engines/wintermute/Base/BSound.cpp
+++ b/engines/wintermute/Base/BSound.cpp
@@ -147,8 +147,8 @@ HRESULT CBSound::Resume() {
//////////////////////////////////////////////////////////////////////////
-HRESULT CBSound::Persist(CBPersistMgr *PersistMgr) {
- if (PersistMgr->_saving && _sound) {
+HRESULT CBSound::Persist(CBPersistMgr *persistMgr) {
+ if (persistMgr->_saving && _sound) {
_soundPlaying = _sound->IsPlaying();
_soundLooping = _sound->_looping;
_soundPrivateVolume = _sound->_privateVolume;
@@ -157,23 +157,23 @@ HRESULT CBSound::Persist(CBPersistMgr *PersistMgr) {
_soundFreezePaused = _sound->_freezePaused;
}
- if (PersistMgr->_saving) {
+ if (persistMgr->_saving) {
_sFXType = SFX_NONE;
_sFXParam1 = _sFXParam2 = _sFXParam3 = _sFXParam4 = 0;
}
- PersistMgr->Transfer(TMEMBER(Game));
-
- PersistMgr->Transfer(TMEMBER(_soundFilename));
- PersistMgr->Transfer(TMEMBER(_soundLooping));
- PersistMgr->Transfer(TMEMBER(_soundPaused));
- PersistMgr->Transfer(TMEMBER(_soundFreezePaused));
- PersistMgr->Transfer(TMEMBER(_soundPlaying));
- PersistMgr->Transfer(TMEMBER(_soundPosition));
- PersistMgr->Transfer(TMEMBER(_soundPrivateVolume));
- PersistMgr->Transfer(TMEMBER(_soundStreamed));
- PersistMgr->Transfer(TMEMBER_INT(_soundType));
- PersistMgr->Transfer(TMEMBER(_soundLoopStart));
+ persistMgr->transfer(TMEMBER(Game));
+
+ persistMgr->transfer(TMEMBER(_soundFilename));
+ persistMgr->transfer(TMEMBER(_soundLooping));
+ persistMgr->transfer(TMEMBER(_soundPaused));
+ persistMgr->transfer(TMEMBER(_soundFreezePaused));
+ persistMgr->transfer(TMEMBER(_soundPlaying));
+ persistMgr->transfer(TMEMBER(_soundPosition));
+ persistMgr->transfer(TMEMBER(_soundPrivateVolume));
+ persistMgr->transfer(TMEMBER(_soundStreamed));
+ persistMgr->transfer(TMEMBER_INT(_soundType));
+ persistMgr->transfer(TMEMBER(_soundLoopStart));
return S_OK;
}
diff --git a/engines/wintermute/Base/BSprite.cpp b/engines/wintermute/Base/BSprite.cpp
index bd3e2711d9..6ebaa0fa7b 100644
--- a/engines/wintermute/Base/BSprite.cpp
+++ b/engines/wintermute/Base/BSprite.cpp
@@ -472,32 +472,32 @@ HRESULT CBSprite::SaveAsText(CBDynBuffer *Buffer, int Indent) {
//////////////////////////////////////////////////////////////////////////
-HRESULT CBSprite::Persist(CBPersistMgr *PersistMgr) {
- CBScriptHolder::Persist(PersistMgr);
-
- PersistMgr->Transfer(TMEMBER(_canBreak));
- PersistMgr->Transfer(TMEMBER(_changed));
- PersistMgr->Transfer(TMEMBER(_paused));
- PersistMgr->Transfer(TMEMBER(_continuous));
- PersistMgr->Transfer(TMEMBER(_currentFrame));
- PersistMgr->Transfer(TMEMBER(_editorAllFrames));
- PersistMgr->Transfer(TMEMBER(_editorBgAlpha));
- PersistMgr->Transfer(TMEMBER(_editorBgFile));
- PersistMgr->Transfer(TMEMBER(_editorBgOffsetX));
- PersistMgr->Transfer(TMEMBER(_editorBgOffsetY));
- PersistMgr->Transfer(TMEMBER(_editorMuted));
- PersistMgr->Transfer(TMEMBER(_finished));
-
- _frames.Persist(PersistMgr);
-
- PersistMgr->Transfer(TMEMBER(_lastFrameTime));
- PersistMgr->Transfer(TMEMBER(_looping));
- PersistMgr->Transfer(TMEMBER(_moveX));
- PersistMgr->Transfer(TMEMBER(_moveY));
- PersistMgr->Transfer(TMEMBER(_owner));
- PersistMgr->Transfer(TMEMBER(_precise));
- PersistMgr->Transfer(TMEMBER(_streamed));
- PersistMgr->Transfer(TMEMBER(_streamedKeepLoaded));
+HRESULT CBSprite::Persist(CBPersistMgr *persistMgr) {
+ CBScriptHolder::Persist(persistMgr);
+
+ persistMgr->transfer(TMEMBER(_canBreak));
+ persistMgr->transfer(TMEMBER(_changed));
+ persistMgr->transfer(TMEMBER(_paused));
+ persistMgr->transfer(TMEMBER(_continuous));
+ persistMgr->transfer(TMEMBER(_currentFrame));
+ persistMgr->transfer(TMEMBER(_editorAllFrames));
+ persistMgr->transfer(TMEMBER(_editorBgAlpha));
+ persistMgr->transfer(TMEMBER(_editorBgFile));
+ persistMgr->transfer(TMEMBER(_editorBgOffsetX));
+ persistMgr->transfer(TMEMBER(_editorBgOffsetY));
+ persistMgr->transfer(TMEMBER(_editorMuted));
+ persistMgr->transfer(TMEMBER(_finished));
+
+ _frames.Persist(persistMgr);
+
+ persistMgr->transfer(TMEMBER(_lastFrameTime));
+ persistMgr->transfer(TMEMBER(_looping));
+ persistMgr->transfer(TMEMBER(_moveX));
+ persistMgr->transfer(TMEMBER(_moveY));
+ persistMgr->transfer(TMEMBER(_owner));
+ persistMgr->transfer(TMEMBER(_precise));
+ persistMgr->transfer(TMEMBER(_streamed));
+ persistMgr->transfer(TMEMBER(_streamedKeepLoaded));
return S_OK;
diff --git a/engines/wintermute/Base/BSubFrame.cpp b/engines/wintermute/Base/BSubFrame.cpp
index 392d65dc0d..ce7ffa3e9a 100644
--- a/engines/wintermute/Base/BSubFrame.cpp
+++ b/engines/wintermute/Base/BSubFrame.cpp
@@ -310,30 +310,30 @@ void CBSubFrame::SetDefaultRect() {
//////////////////////////////////////////////////////////////////////////
-HRESULT CBSubFrame::Persist(CBPersistMgr *PersistMgr) {
-
- CBScriptable::Persist(PersistMgr);
-
- PersistMgr->Transfer(TMEMBER(_2DOnly));
- PersistMgr->Transfer(TMEMBER(_3DOnly));
- PersistMgr->Transfer(TMEMBER(_alpha));
- PersistMgr->Transfer(TMEMBER(_decoration));
- PersistMgr->Transfer(TMEMBER(_editorSelected));
- PersistMgr->Transfer(TMEMBER(_hotspotX));
- PersistMgr->Transfer(TMEMBER(_hotspotY));
- PersistMgr->Transfer(TMEMBER(_rect));
-
- PersistMgr->Transfer(TMEMBER(_surfaceFilename));
- PersistMgr->Transfer(TMEMBER(_cKDefault));
- PersistMgr->Transfer(TMEMBER(_cKRed));
- PersistMgr->Transfer(TMEMBER(_cKGreen));
- PersistMgr->Transfer(TMEMBER(_cKBlue));
- PersistMgr->Transfer(TMEMBER(_lifeTime));
-
- PersistMgr->Transfer(TMEMBER(_keepLoaded));
- PersistMgr->Transfer(TMEMBER(_mirrorX));
- PersistMgr->Transfer(TMEMBER(_mirrorY));
- PersistMgr->Transfer(TMEMBER(_transparent));
+HRESULT CBSubFrame::Persist(CBPersistMgr *persistMgr) {
+
+ CBScriptable::Persist(persistMgr);
+
+ persistMgr->transfer(TMEMBER(_2DOnly));
+ persistMgr->transfer(TMEMBER(_3DOnly));
+ persistMgr->transfer(TMEMBER(_alpha));
+ persistMgr->transfer(TMEMBER(_decoration));
+ persistMgr->transfer(TMEMBER(_editorSelected));
+ persistMgr->transfer(TMEMBER(_hotspotX));
+ persistMgr->transfer(TMEMBER(_hotspotY));
+ persistMgr->transfer(TMEMBER(_rect));
+
+ persistMgr->transfer(TMEMBER(_surfaceFilename));
+ persistMgr->transfer(TMEMBER(_cKDefault));
+ persistMgr->transfer(TMEMBER(_cKRed));
+ persistMgr->transfer(TMEMBER(_cKGreen));
+ persistMgr->transfer(TMEMBER(_cKBlue));
+ persistMgr->transfer(TMEMBER(_lifeTime));
+
+ persistMgr->transfer(TMEMBER(_keepLoaded));
+ persistMgr->transfer(TMEMBER(_mirrorX));
+ persistMgr->transfer(TMEMBER(_mirrorY));
+ persistMgr->transfer(TMEMBER(_transparent));
return S_OK;
}
diff --git a/engines/wintermute/Base/BSurfaceStorage.cpp b/engines/wintermute/Base/BSurfaceStorage.cpp
index 5facd1682c..c5980719d7 100644
--- a/engines/wintermute/Base/BSurfaceStorage.cpp
+++ b/engines/wintermute/Base/BSurfaceStorage.cpp
@@ -148,14 +148,14 @@ HRESULT CBSurfaceStorage::RestoreAll() {
/*
//////////////////////////////////////////////////////////////////////////
-HRESULT CBSurfaceStorage::Persist(CBPersistMgr *PersistMgr)
+HRESULT CBSurfaceStorage::Persist(CBPersistMgr *persistMgr)
{
- if(!PersistMgr->_saving) Cleanup(false);
+ if(!persistMgr->_saving) Cleanup(false);
- PersistMgr->Transfer(TMEMBER(Game));
+ persistMgr->transfer(TMEMBER(Game));
- //_surfaces.Persist(PersistMgr);
+ //_surfaces.Persist(persistMgr);
return S_OK;
}
diff --git a/engines/wintermute/Base/BViewport.cpp b/engines/wintermute/Base/BViewport.cpp
index c8cff8f376..eef044bb50 100644
--- a/engines/wintermute/Base/BViewport.cpp
+++ b/engines/wintermute/Base/BViewport.cpp
@@ -49,14 +49,14 @@ CBViewport::~CBViewport() {
//////////////////////////////////////////////////////////////////////////
-HRESULT CBViewport::Persist(CBPersistMgr *PersistMgr) {
+HRESULT CBViewport::Persist(CBPersistMgr *persistMgr) {
- PersistMgr->Transfer(TMEMBER(Game));
+ persistMgr->transfer(TMEMBER(Game));
- PersistMgr->Transfer(TMEMBER(_mainObject));
- PersistMgr->Transfer(TMEMBER(_offsetX));
- PersistMgr->Transfer(TMEMBER(_offsetY));
- PersistMgr->Transfer(TMEMBER(_rect));
+ persistMgr->transfer(TMEMBER(_mainObject));
+ persistMgr->transfer(TMEMBER(_offsetX));
+ persistMgr->transfer(TMEMBER(_offsetY));
+ persistMgr->transfer(TMEMBER(_rect));
return S_OK;
}
diff --git a/engines/wintermute/Base/PartEmitter.cpp b/engines/wintermute/Base/PartEmitter.cpp
index 4bf6b8ece0..c7a9259a51 100644
--- a/engines/wintermute/Base/PartEmitter.cpp
+++ b/engines/wintermute/Base/PartEmitter.cpp
@@ -1098,97 +1098,97 @@ const char *CPartEmitter::ScToString() {
//////////////////////////////////////////////////////////////////////////
-HRESULT CPartEmitter::Persist(CBPersistMgr *PersistMgr) {
- CBObject::Persist(PersistMgr);
+HRESULT CPartEmitter::Persist(CBPersistMgr *persistMgr) {
+ CBObject::Persist(persistMgr);
- PersistMgr->Transfer(TMEMBER(_width));
- PersistMgr->Transfer(TMEMBER(_height));
+ persistMgr->transfer(TMEMBER(_width));
+ persistMgr->transfer(TMEMBER(_height));
- PersistMgr->Transfer(TMEMBER(_angle1));
- PersistMgr->Transfer(TMEMBER(_angle2));
+ persistMgr->transfer(TMEMBER(_angle1));
+ persistMgr->transfer(TMEMBER(_angle2));
- PersistMgr->Transfer(TMEMBER(_velocity1));
- PersistMgr->Transfer(TMEMBER(_velocity2));
- PersistMgr->Transfer(TMEMBER(_velocityZBased));
+ persistMgr->transfer(TMEMBER(_velocity1));
+ persistMgr->transfer(TMEMBER(_velocity2));
+ persistMgr->transfer(TMEMBER(_velocityZBased));
- PersistMgr->Transfer(TMEMBER(_scale1));
- PersistMgr->Transfer(TMEMBER(_scale2));
- PersistMgr->Transfer(TMEMBER(_scaleZBased));
+ persistMgr->transfer(TMEMBER(_scale1));
+ persistMgr->transfer(TMEMBER(_scale2));
+ persistMgr->transfer(TMEMBER(_scaleZBased));
- PersistMgr->Transfer(TMEMBER(_maxParticles));
+ persistMgr->transfer(TMEMBER(_maxParticles));
- PersistMgr->Transfer(TMEMBER(_lifeTime1));
- PersistMgr->Transfer(TMEMBER(_lifeTime2));
- PersistMgr->Transfer(TMEMBER(_lifeTimeZBased));
+ persistMgr->transfer(TMEMBER(_lifeTime1));
+ persistMgr->transfer(TMEMBER(_lifeTime2));
+ persistMgr->transfer(TMEMBER(_lifeTimeZBased));
- PersistMgr->Transfer(TMEMBER(_genInterval));
- PersistMgr->Transfer(TMEMBER(_genAmount));
+ persistMgr->transfer(TMEMBER(_genInterval));
+ persistMgr->transfer(TMEMBER(_genAmount));
- PersistMgr->Transfer(TMEMBER(_running));
- PersistMgr->Transfer(TMEMBER(_overheadTime));
+ persistMgr->transfer(TMEMBER(_running));
+ persistMgr->transfer(TMEMBER(_overheadTime));
- PersistMgr->Transfer(TMEMBER(_border));
- PersistMgr->Transfer(TMEMBER(_borderThicknessLeft));
- PersistMgr->Transfer(TMEMBER(_borderThicknessRight));
- PersistMgr->Transfer(TMEMBER(_borderThicknessTop));
- PersistMgr->Transfer(TMEMBER(_borderThicknessBottom));
+ persistMgr->transfer(TMEMBER(_border));
+ persistMgr->transfer(TMEMBER(_borderThicknessLeft));
+ persistMgr->transfer(TMEMBER(_borderThicknessRight));
+ persistMgr->transfer(TMEMBER(_borderThicknessTop));
+ persistMgr->transfer(TMEMBER(_borderThicknessBottom));
- PersistMgr->Transfer(TMEMBER(_fadeInTime));
- PersistMgr->Transfer(TMEMBER(_fadeOutTime));
+ persistMgr->transfer(TMEMBER(_fadeInTime));
+ persistMgr->transfer(TMEMBER(_fadeOutTime));
- PersistMgr->Transfer(TMEMBER(_alpha1));
- PersistMgr->Transfer(TMEMBER(_alpha2));
- PersistMgr->Transfer(TMEMBER(_alphaTimeBased));
+ persistMgr->transfer(TMEMBER(_alpha1));
+ persistMgr->transfer(TMEMBER(_alpha2));
+ persistMgr->transfer(TMEMBER(_alphaTimeBased));
- PersistMgr->Transfer(TMEMBER(_angVelocity1));
- PersistMgr->Transfer(TMEMBER(_angVelocity2));
+ persistMgr->transfer(TMEMBER(_angVelocity1));
+ persistMgr->transfer(TMEMBER(_angVelocity2));
- PersistMgr->Transfer(TMEMBER(_rotation1));
- PersistMgr->Transfer(TMEMBER(_rotation2));
+ persistMgr->transfer(TMEMBER(_rotation1));
+ persistMgr->transfer(TMEMBER(_rotation2));
- PersistMgr->Transfer(TMEMBER(_growthRate1));
- PersistMgr->Transfer(TMEMBER(_growthRate2));
- PersistMgr->Transfer(TMEMBER(_exponentialGrowth));
+ persistMgr->transfer(TMEMBER(_growthRate1));
+ persistMgr->transfer(TMEMBER(_growthRate2));
+ persistMgr->transfer(TMEMBER(_exponentialGrowth));
- PersistMgr->Transfer(TMEMBER(_useRegion));
+ persistMgr->transfer(TMEMBER(_useRegion));
- PersistMgr->Transfer(TMEMBER_INT(_maxBatches));
- PersistMgr->Transfer(TMEMBER_INT(_batchesGenerated));
+ persistMgr->transfer(TMEMBER_INT(_maxBatches));
+ persistMgr->transfer(TMEMBER_INT(_batchesGenerated));
- PersistMgr->Transfer(TMEMBER(_emitEvent));
- PersistMgr->Transfer(TMEMBER(_owner));
+ persistMgr->transfer(TMEMBER(_emitEvent));
+ persistMgr->transfer(TMEMBER(_owner));
- _sprites.Persist(PersistMgr);
+ _sprites.Persist(persistMgr);
int NumForces;
- if (PersistMgr->_saving) {
+ if (persistMgr->_saving) {
NumForces = _forces.GetSize();
- PersistMgr->Transfer(TMEMBER(NumForces));
+ persistMgr->transfer(TMEMBER(NumForces));
for (int i = 0; i < _forces.GetSize(); i++) {
- _forces[i]->Persist(PersistMgr);
+ _forces[i]->Persist(persistMgr);
}
} else {
- PersistMgr->Transfer(TMEMBER(NumForces));
+ persistMgr->transfer(TMEMBER(NumForces));
for (int i = 0; i < NumForces; i++) {
CPartForce *Force = new CPartForce(Game);
- Force->Persist(PersistMgr);
+ Force->Persist(persistMgr);
_forces.Add(Force);
}
}
int NumParticles;
- if (PersistMgr->_saving) {
+ if (persistMgr->_saving) {
NumParticles = _particles.GetSize();
- PersistMgr->Transfer(TMEMBER(NumParticles));
+ persistMgr->transfer(TMEMBER(NumParticles));
for (int i = 0; i < _particles.GetSize(); i++) {
- _particles[i]->Persist(PersistMgr);
+ _particles[i]->Persist(persistMgr);
}
} else {
- PersistMgr->Transfer(TMEMBER(NumParticles));
+ persistMgr->transfer(TMEMBER(NumParticles));
for (int i = 0; i < NumParticles; i++) {
CPartParticle *Particle = new CPartParticle(Game);
- Particle->Persist(PersistMgr);
+ Particle->Persist(persistMgr);
_particles.Add(Particle);
}
}
diff --git a/engines/wintermute/Base/PartForce.cpp b/engines/wintermute/Base/PartForce.cpp
index 6389e38662..eb76a25469 100644
--- a/engines/wintermute/Base/PartForce.cpp
+++ b/engines/wintermute/Base/PartForce.cpp
@@ -47,11 +47,11 @@ CPartForce::~CPartForce(void) {
//////////////////////////////////////////////////////////////////////////
-HRESULT CPartForce::Persist(CBPersistMgr *PersistMgr) {
- PersistMgr->Transfer(TMEMBER(_name));
- PersistMgr->Transfer(TMEMBER(_pos));
- PersistMgr->Transfer(TMEMBER(_direction));
- PersistMgr->Transfer(TMEMBER_INT(_type));
+HRESULT CPartForce::Persist(CBPersistMgr *persistMgr) {
+ persistMgr->transfer(TMEMBER(_name));
+ persistMgr->transfer(TMEMBER(_pos));
+ persistMgr->transfer(TMEMBER(_direction));
+ persistMgr->transfer(TMEMBER_INT(_type));
return S_OK;
}
diff --git a/engines/wintermute/Base/PartParticle.cpp b/engines/wintermute/Base/PartParticle.cpp
index cb276242c0..d6682e309b 100644
--- a/engines/wintermute/Base/PartParticle.cpp
+++ b/engines/wintermute/Base/PartParticle.cpp
@@ -216,32 +216,32 @@ HRESULT CPartParticle::FadeOut(uint32 CurrentTime, int FadeTime) {
}
//////////////////////////////////////////////////////////////////////////
-HRESULT CPartParticle::Persist(CBPersistMgr *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->_saving) {
- PersistMgr->Transfer(TMEMBER(_sprite->_filename));
+HRESULT CPartParticle::Persist(CBPersistMgr *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->_saving) {
+ persistMgr->transfer(TMEMBER(_sprite->_filename));
} else {
char *Filename;
- PersistMgr->Transfer(TMEMBER(Filename));
+ persistMgr->transfer(TMEMBER(Filename));
CSysClassRegistry::GetInstance()->_disabled = true;
SetSprite(Filename);
CSysClassRegistry::GetInstance()->_disabled = false;
diff --git a/engines/wintermute/Base/file/BSaveThumbFile.cpp b/engines/wintermute/Base/file/BSaveThumbFile.cpp
index f976b4a00c..062cda4b83 100644
--- a/engines/wintermute/Base/file/BSaveThumbFile.cpp
+++ b/engines/wintermute/Base/file/BSaveThumbFile.cpp
@@ -75,7 +75,7 @@ HRESULT CBSaveThumbFile::Open(const Common::String &filename) {
if (!pm) return E_FAIL;
Game->_dEBUG_AbsolutePathWarning = false;
- if (FAILED(pm->InitLoad(slotFilename))) {
+ if (FAILED(pm->initLoad(slotFilename))) {
Game->_dEBUG_AbsolutePathWarning = true;
delete pm;
return E_FAIL;
diff --git a/engines/wintermute/Base/scriptables/SXArray.cpp b/engines/wintermute/Base/scriptables/SXArray.cpp
index d9b3dfe455..f427a351af 100644
--- a/engines/wintermute/Base/scriptables/SXArray.cpp
+++ b/engines/wintermute/Base/scriptables/SXArray.cpp
@@ -199,11 +199,11 @@ HRESULT CSXArray::ScSetProperty(const char *Name, CScValue *Value) {
//////////////////////////////////////////////////////////////////////////
-HRESULT CSXArray::Persist(CBPersistMgr *PersistMgr) {
- CBScriptable::Persist(PersistMgr);
+HRESULT CSXArray::Persist(CBPersistMgr *persistMgr) {
+ CBScriptable::Persist(persistMgr);
- PersistMgr->Transfer(TMEMBER(_length));
- PersistMgr->Transfer(TMEMBER(_values));
+ persistMgr->transfer(TMEMBER(_length));
+ persistMgr->transfer(TMEMBER(_values));
return S_OK;
}
diff --git a/engines/wintermute/Base/scriptables/SXDate.cpp b/engines/wintermute/Base/scriptables/SXDate.cpp
index 069e31b06b..d046d88294 100644
--- a/engines/wintermute/Base/scriptables/SXDate.cpp
+++ b/engines/wintermute/Base/scriptables/SXDate.cpp
@@ -238,15 +238,15 @@ HRESULT CSXDate::ScSetProperty(const char *Name, CScValue *Value) {
//////////////////////////////////////////////////////////////////////////
-HRESULT CSXDate::Persist(CBPersistMgr *PersistMgr) {
-
- CBScriptable::Persist(PersistMgr);
- PersistMgr->Transfer(TMEMBER(_tm.tm_year));
- PersistMgr->Transfer(TMEMBER(_tm.tm_mon));
- PersistMgr->Transfer(TMEMBER(_tm.tm_mday));
- PersistMgr->Transfer(TMEMBER(_tm.tm_hour));
- PersistMgr->Transfer(TMEMBER(_tm.tm_min));
- PersistMgr->Transfer(TMEMBER(_tm.tm_sec));
+HRESULT CSXDate::Persist(CBPersistMgr *persistMgr) {
+
+ CBScriptable::Persist(persistMgr);
+ persistMgr->transfer(TMEMBER(_tm.tm_year));
+ persistMgr->transfer(TMEMBER(_tm.tm_mon));
+ persistMgr->transfer(TMEMBER(_tm.tm_mday));
+ persistMgr->transfer(TMEMBER(_tm.tm_hour));
+ persistMgr->transfer(TMEMBER(_tm.tm_min));
+ persistMgr->transfer(TMEMBER(_tm.tm_sec));
return S_OK;
}
diff --git a/engines/wintermute/Base/scriptables/SXFile.cpp b/engines/wintermute/Base/scriptables/SXFile.cpp
index e7ac75c58b..7ebbf9fc50 100644
--- a/engines/wintermute/Base/scriptables/SXFile.cpp
+++ b/engines/wintermute/Base/scriptables/SXFile.cpp
@@ -689,20 +689,20 @@ uint32 CSXFile::GetLength() {
}
//////////////////////////////////////////////////////////////////////////
-HRESULT CSXFile::Persist(CBPersistMgr *PersistMgr) {
+HRESULT CSXFile::Persist(CBPersistMgr *persistMgr) {
- CBScriptable::Persist(PersistMgr);
+ CBScriptable::Persist(persistMgr);
- PersistMgr->Transfer(TMEMBER(_filename));
- PersistMgr->Transfer(TMEMBER(_mode));
- PersistMgr->Transfer(TMEMBER(_textMode));
+ persistMgr->transfer(TMEMBER(_filename));
+ persistMgr->transfer(TMEMBER(_mode));
+ persistMgr->transfer(TMEMBER(_textMode));
uint32 Pos = 0;
- if (PersistMgr->_saving) {
+ if (persistMgr->_saving) {
Pos = GetPos();
- PersistMgr->Transfer(TMEMBER(Pos));
+ persistMgr->transfer(TMEMBER(Pos));
} else {
- PersistMgr->Transfer(TMEMBER(Pos));
+ persistMgr->transfer(TMEMBER(Pos));
// try to re-open file if needed
_writeFile = NULL;
diff --git a/engines/wintermute/Base/scriptables/SXMath.cpp b/engines/wintermute/Base/scriptables/SXMath.cpp
index 5005b885b8..68bad8c7d9 100644
--- a/engines/wintermute/Base/scriptables/SXMath.cpp
+++ b/engines/wintermute/Base/scriptables/SXMath.cpp
@@ -285,9 +285,9 @@ double CSXMath::RadianToDegree(double Value) {
//////////////////////////////////////////////////////////////////////////
-HRESULT CSXMath::Persist(CBPersistMgr *PersistMgr) {
+HRESULT CSXMath::Persist(CBPersistMgr *persistMgr) {
- CBScriptable::Persist(PersistMgr);
+ CBScriptable::Persist(persistMgr);
return S_OK;
}
diff --git a/engines/wintermute/Base/scriptables/SXMemBuffer.cpp b/engines/wintermute/Base/scriptables/SXMemBuffer.cpp
index 3a661b502c..4fd543663b 100644
--- a/engines/wintermute/Base/scriptables/SXMemBuffer.cpp
+++ b/engines/wintermute/Base/scriptables/SXMemBuffer.cpp
@@ -454,18 +454,18 @@ HRESULT CSXMemBuffer::ScSetProperty(const char *Name, CScValue *Value) {
//////////////////////////////////////////////////////////////////////////
-HRESULT CSXMemBuffer::Persist(CBPersistMgr *PersistMgr) {
+HRESULT CSXMemBuffer::Persist(CBPersistMgr *persistMgr) {
- CBScriptable::Persist(PersistMgr);
+ CBScriptable::Persist(persistMgr);
- PersistMgr->Transfer(TMEMBER(_size));
+ persistMgr->transfer(TMEMBER(_size));
- if (PersistMgr->_saving) {
- if (_size > 0) PersistMgr->PutBytes((byte *)_buffer, _size);
+ if (persistMgr->_saving) {
+ if (_size > 0) persistMgr->putBytes((byte *)_buffer, _size);
} else {
if (_size > 0) {
_buffer = malloc(_size);
- PersistMgr->GetBytes((byte *)_buffer, _size);
+ persistMgr->getBytes((byte *)_buffer, _size);
} else _buffer = NULL;
}
diff --git a/engines/wintermute/Base/scriptables/SXStore.cpp b/engines/wintermute/Base/scriptables/SXStore.cpp
index 54280e8b29..4192e2f8d4 100644
--- a/engines/wintermute/Base/scriptables/SXStore.cpp
+++ b/engines/wintermute/Base/scriptables/SXStore.cpp
@@ -278,29 +278,29 @@ CScValue *CSXStore::ScGetProperty(const char *name) {
//////////////////////////////////////////////////////////////////////////
-HRESULT CSXStore::Persist(CBPersistMgr *PersistMgr) {
- if (!PersistMgr->_saving) Cleanup();
+HRESULT CSXStore::Persist(CBPersistMgr *persistMgr) {
+ if (!persistMgr->_saving) Cleanup();
- CBObject::Persist(PersistMgr);
+ CBObject::Persist(persistMgr);
- PersistMgr->Transfer(TMEMBER(_eventsEnabled));
- PersistMgr->Transfer(TMEMBER(_lastProductRequestOwner));
- PersistMgr->Transfer(TMEMBER(_lastPurchaseOwner));
- PersistMgr->Transfer(TMEMBER(_lastRestoreOwner));
- PersistMgr->Transfer(TMEMBER(_invalidProducts));
+ persistMgr->transfer(TMEMBER(_eventsEnabled));
+ persistMgr->transfer(TMEMBER(_lastProductRequestOwner));
+ persistMgr->transfer(TMEMBER(_lastPurchaseOwner));
+ persistMgr->transfer(TMEMBER(_lastRestoreOwner));
+ persistMgr->transfer(TMEMBER(_invalidProducts));
// persist valid products
int numProducts;
- if (PersistMgr->_saving) {
+ if (persistMgr->_saving) {
numProducts = _validProducts.GetSize();
- PersistMgr->Transfer(TMEMBER(numProducts));
- for (int i = 0; i < numProducts; i++) _validProducts[i]->Persist(PersistMgr);
+ persistMgr->transfer(TMEMBER(numProducts));
+ for (int i = 0; i < numProducts; i++) _validProducts[i]->Persist(persistMgr);
} else {
numProducts = _validProducts.GetSize();
- PersistMgr->Transfer(TMEMBER(numProducts));
+ persistMgr->transfer(TMEMBER(numProducts));
for (int i = 0; i < numProducts; i++) {
CBStoreProduct *prod = new CBStoreProduct;
- prod->Persist(PersistMgr);
+ prod->Persist(persistMgr);
_validProducts.Add(prod);
}
}
diff --git a/engines/wintermute/Base/scriptables/SXStore.h b/engines/wintermute/Base/scriptables/SXStore.h
index 0d73bb9c11..f4ccaa3bb7 100644
--- a/engines/wintermute/Base/scriptables/SXStore.h
+++ b/engines/wintermute/Base/scriptables/SXStore.h
@@ -60,11 +60,11 @@ public:
delete [] _price;
}
- HRESULT Persist(CBPersistMgr *PersistMgr) {
- PersistMgr->Transfer(TMEMBER(_id));
- PersistMgr->Transfer(TMEMBER(_name));
- PersistMgr->Transfer(TMEMBER(_desc));
- PersistMgr->Transfer(TMEMBER(_price));
+ HRESULT Persist(CBPersistMgr *persistMgr) {
+ persistMgr->transfer(TMEMBER(_id));
+ persistMgr->transfer(TMEMBER(_name));
+ persistMgr->transfer(TMEMBER(_desc));
+ persistMgr->transfer(TMEMBER(_price));
return S_OK;
}
diff --git a/engines/wintermute/Base/scriptables/SXString.cpp b/engines/wintermute/Base/scriptables/SXString.cpp
index 16cb198671..7c0f11813a 100644
--- a/engines/wintermute/Base/scriptables/SXString.cpp
+++ b/engines/wintermute/Base/scriptables/SXString.cpp
@@ -377,18 +377,18 @@ HRESULT CSXString::ScSetProperty(const char *Name, CScValue *Value) {
//////////////////////////////////////////////////////////////////////////
-HRESULT CSXString::Persist(CBPersistMgr *PersistMgr) {
+HRESULT CSXString::Persist(CBPersistMgr *persistMgr) {
- CBScriptable::Persist(PersistMgr);
+ CBScriptable::Persist(persistMgr);
- PersistMgr->Transfer(TMEMBER(_capacity));
+ persistMgr->transfer(TMEMBER(_capacity));
- if (PersistMgr->_saving) {
- if (_capacity > 0) PersistMgr->PutBytes((byte *)_string, _capacity);
+ if (persistMgr->_saving) {
+ if (_capacity > 0) persistMgr->putBytes((byte *)_string, _capacity);
} else {
if (_capacity > 0) {
_string = new char[_capacity];
- PersistMgr->GetBytes((byte *)_string, _capacity);
+ persistMgr->getBytes((byte *)_string, _capacity);
} else _string = NULL;
}
diff --git a/engines/wintermute/Base/scriptables/ScEngine.cpp b/engines/wintermute/Base/scriptables/ScEngine.cpp
index e8560bca6f..a4bb951dc2 100644
--- a/engines/wintermute/Base/scriptables/ScEngine.cpp
+++ b/engines/wintermute/Base/scriptables/ScEngine.cpp
@@ -564,14 +564,14 @@ HRESULT CScEngine::ResetScript(CScScript *Script) {
}
//////////////////////////////////////////////////////////////////////////
-HRESULT CScEngine::Persist(CBPersistMgr *PersistMgr) {
- if (!PersistMgr->_saving) Cleanup();
-
- PersistMgr->Transfer(TMEMBER(Game));
- PersistMgr->Transfer(TMEMBER(_currentScript));
- PersistMgr->Transfer(TMEMBER(_fileToCompile));
- PersistMgr->Transfer(TMEMBER(_globals));
- _scripts.Persist(PersistMgr);
+HRESULT CScEngine::Persist(CBPersistMgr *persistMgr) {
+ if (!persistMgr->_saving) Cleanup();
+
+ persistMgr->transfer(TMEMBER(Game));
+ persistMgr->transfer(TMEMBER(_currentScript));
+ persistMgr->transfer(TMEMBER(_fileToCompile));
+ persistMgr->transfer(TMEMBER(_globals));
+ _scripts.Persist(persistMgr);
return S_OK;
}
diff --git a/engines/wintermute/Base/scriptables/ScScript.cpp b/engines/wintermute/Base/scriptables/ScScript.cpp
index 49e3417946..20dd8fb156 100644
--- a/engines/wintermute/Base/scriptables/ScScript.cpp
+++ b/engines/wintermute/Base/scriptables/ScScript.cpp
@@ -1153,58 +1153,58 @@ void CScScript::RuntimeError(LPCSTR fmt, ...) {
//////////////////////////////////////////////////////////////////////////
-HRESULT CScScript::Persist(CBPersistMgr *PersistMgr) {
+HRESULT CScScript::Persist(CBPersistMgr *persistMgr) {
- PersistMgr->Transfer(TMEMBER(Game));
+ persistMgr->transfer(TMEMBER(Game));
// buffer
- if (PersistMgr->_saving) {
+ if (persistMgr->_saving) {
if (_state != SCRIPT_PERSISTENT && _state != SCRIPT_FINISHED && _state != SCRIPT_THREAD_FINISHED) {
- PersistMgr->Transfer(TMEMBER(_bufferSize));
- PersistMgr->PutBytes(_buffer, _bufferSize);
+ persistMgr->transfer(TMEMBER(_bufferSize));
+ persistMgr->putBytes(_buffer, _bufferSize);
} else {
// don't save idle/finished scripts
int bufferSize = 0;
- PersistMgr->Transfer(TMEMBER(bufferSize));
+ persistMgr->transfer(TMEMBER(bufferSize));
}
} else {
- PersistMgr->Transfer(TMEMBER(_bufferSize));
+ persistMgr->transfer(TMEMBER(_bufferSize));
if (_bufferSize > 0) {
_buffer = new byte[_bufferSize];
- PersistMgr->GetBytes(_buffer, _bufferSize);
+ persistMgr->getBytes(_buffer, _bufferSize);
InitTables();
} else _buffer = 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->_saving) _tracingMode = false;
+ 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->_saving) _tracingMode = false;
return S_OK;
}
diff --git a/engines/wintermute/Base/scriptables/ScStack.cpp b/engines/wintermute/Base/scriptables/ScStack.cpp
index 26e8aa118b..100424bc2d 100644
--- a/engines/wintermute/Base/scriptables/ScStack.cpp
+++ b/engines/wintermute/Base/scriptables/ScStack.cpp
@@ -213,12 +213,12 @@ void CScStack::PushNative(CBScriptable *Val, bool Persistent) {
//////////////////////////////////////////////////////////////////////////
-HRESULT CScStack::Persist(CBPersistMgr *PersistMgr) {
+HRESULT CScStack::Persist(CBPersistMgr *persistMgr) {
- PersistMgr->Transfer(TMEMBER(Game));
+ persistMgr->transfer(TMEMBER(Game));
- PersistMgr->Transfer(TMEMBER(_sP));
- _values.Persist(PersistMgr);
+ persistMgr->transfer(TMEMBER(_sP));
+ _values.Persist(persistMgr);
return S_OK;
}
diff --git a/engines/wintermute/Base/scriptables/ScValue.cpp b/engines/wintermute/Base/scriptables/ScValue.cpp
index 517c1516ba..81828e3580 100644
--- a/engines/wintermute/Base/scriptables/ScValue.cpp
+++ b/engines/wintermute/Base/scriptables/ScValue.cpp
@@ -715,44 +715,44 @@ void CScValue::SetValue(CScValue *Val) {
//////////////////////////////////////////////////////////////////////////
-HRESULT CScValue::Persist(CBPersistMgr *PersistMgr) {
- PersistMgr->Transfer(TMEMBER(Game));
+HRESULT CScValue::Persist(CBPersistMgr *persistMgr) {
+ persistMgr->transfer(TMEMBER(Game));
- 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->Transfer(TMEMBER(_valNative));
+ 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->transfer(TMEMBER(_valNative));
int size;
const char *str;
- if (PersistMgr->_saving) {
+ if (persistMgr->_saving) {
size = _valObject.size();
- PersistMgr->Transfer("", &size);
+ persistMgr->transfer("", &size);
_valIter = _valObject.begin();
while (_valIter != _valObject.end()) {
str = _valIter->_key.c_str();
- PersistMgr->Transfer("", &str);
- PersistMgr->Transfer("", &_valIter->_value);
+ persistMgr->transfer("", &str);
+ persistMgr->transfer("", &_valIter->_value);
_valIter++;
}
} else {
CScValue *val;
- PersistMgr->Transfer("", &size);
+ persistMgr->transfer("", &size);
for (int i = 0; i < size; i++) {
- PersistMgr->Transfer("", &str);
- PersistMgr->Transfer("", &val);
+ persistMgr->transfer("", &str);
+ persistMgr->transfer("", &val);
_valObject[str] = val;
delete [] str;
}
}
- PersistMgr->Transfer(TMEMBER(_valRef));
- PersistMgr->Transfer(TMEMBER(_valString));
+ persistMgr->transfer(TMEMBER(_valRef));
+ persistMgr->transfer(TMEMBER(_valString));
/*
FILE* f = fopen("c:\\val.log", "a+");
diff --git a/engines/wintermute/Base/scriptables/SxObject.cpp b/engines/wintermute/Base/scriptables/SxObject.cpp
index 2785606338..a1760eeaa5 100644
--- a/engines/wintermute/Base/scriptables/SxObject.cpp
+++ b/engines/wintermute/Base/scriptables/SxObject.cpp
@@ -58,8 +58,8 @@ CSXObject::~CSXObject() {
//////////////////////////////////////////////////////////////////////////
-HRESULT CSXObject::Persist(CBPersistMgr *PersistMgr) {
- CBObject::Persist(PersistMgr);
+HRESULT CSXObject::Persist(CBPersistMgr *persistMgr) {
+ CBObject::Persist(persistMgr);
return S_OK;
}
diff --git a/engines/wintermute/Sys/SysClass.cpp b/engines/wintermute/Sys/SysClass.cpp
index 730753cf18..f7be3d2449 100644
--- a/engines/wintermute/Sys/SysClass.cpp
+++ b/engines/wintermute/Sys/SysClass.cpp
@@ -128,24 +128,24 @@ void CSysClass::Dump(Common::WriteStream *stream) {
}
//////////////////////////////////////////////////////////////////////////
-void CSysClass::SaveTable(CBGame *Game, CBPersistMgr *PersistMgr) {
- PersistMgr->PutString(_name.c_str());
- PersistMgr->PutDWORD(_iD);
- PersistMgr->PutDWORD(_instances.size());
+void CSysClass::SaveTable(CBGame *Game, CBPersistMgr *persistMgr) {
+ persistMgr->putString(_name.c_str());
+ persistMgr->putDWORD(_iD);
+ persistMgr->putDWORD(_instances.size());
Instances::iterator it;
for (it = _instances.begin(); it != _instances.end(); ++it) {
- PersistMgr->PutDWORD((it->_value)->GetID());
+ persistMgr->putDWORD((it->_value)->GetID());
}
}
//////////////////////////////////////////////////////////////////////////
-void CSysClass::LoadTable(CBGame *Game, CBPersistMgr *PersistMgr) {
- _savedID = PersistMgr->GetDWORD();
- int numInstances = PersistMgr->GetDWORD();
+void CSysClass::LoadTable(CBGame *Game, CBPersistMgr *persistMgr) {
+ _savedID = persistMgr->getDWORD();
+ int numInstances = persistMgr->getDWORD();
for (int i = 0; i < numInstances; i++) {
- int instID = PersistMgr->GetDWORD();
+ int instID = persistMgr->getDWORD();
if (_persistent) {
if (i > 0) {
@@ -173,22 +173,22 @@ void CSysClass::LoadTable(CBGame *Game, CBPersistMgr *PersistMgr) {
}
//////////////////////////////////////////////////////////////////////////
-void CSysClass::SaveInstances(CBGame *Game, CBPersistMgr *PersistMgr) {
+void CSysClass::SaveInstances(CBGame *Game, CBPersistMgr *persistMgr) {
Instances::iterator it;
for (it = _instances.begin(); it != _instances.end(); ++it) {
// write instace header
- PersistMgr->PutString("<INSTANCE_HEAD>");
- PersistMgr->PutDWORD(_iD);
- PersistMgr->PutDWORD((it->_value)->GetID());
- PersistMgr->PutString("</INSTANCE_HEAD>");
- _load((it->_value)->GetInstance(), PersistMgr);
- PersistMgr->PutString("</INSTANCE>");
+ persistMgr->putString("<INSTANCE_HEAD>");
+ persistMgr->putDWORD(_iD);
+ persistMgr->putDWORD((it->_value)->GetID());
+ persistMgr->putString("</INSTANCE_HEAD>");
+ _load((it->_value)->GetInstance(), persistMgr);
+ persistMgr->putString("</INSTANCE>");
}
}
//////////////////////////////////////////////////////////////////////////
-void CSysClass::LoadInstance(void *instance, CBPersistMgr *PersistMgr) {
- _load(instance, PersistMgr);
+void CSysClass::LoadInstance(void *instance, CBPersistMgr *persistMgr) {
+ _load(instance, persistMgr);
}
diff --git a/engines/wintermute/Sys/SysClass.h b/engines/wintermute/Sys/SysClass.h
index a2575c262c..2fdf3a31da 100644
--- a/engines/wintermute/Sys/SysClass.h
+++ b/engines/wintermute/Sys/SysClass.h
@@ -52,8 +52,8 @@ template<> struct Hash<void *> : public UnaryFunction<void *, uint> {
}
};
-template<> struct Hash<WinterMute::CSysInstance*> : public UnaryFunction<WinterMute::CSysInstance*, uint> {
- uint operator()(WinterMute::CSysInstance* val) const {
+template<> struct Hash<WinterMute::CSysInstance *> : public UnaryFunction<WinterMute::CSysInstance *, uint> {
+ uint operator()(WinterMute::CSysInstance *val) const {
return (uint)((size_t)val);
}
};
diff --git a/engines/wintermute/Sys/SysClassRegistry.cpp b/engines/wintermute/Sys/SysClassRegistry.cpp
index a7d401c5bb..05412ae0e9 100644
--- a/engines/wintermute/Sys/SysClassRegistry.cpp
+++ b/engines/wintermute/Sys/SysClassRegistry.cpp
@@ -148,8 +148,8 @@ void *CSysClassRegistry::IDToPointer(int classID, int instanceID) {
else return (*it)._value->GetInstance();
}
-bool checkHeader(const char* tag, CBPersistMgr *pm) {
- char *test = pm->GetString();
+bool checkHeader(const char *tag, CBPersistMgr *pm) {
+ char *test = pm->getString();
Common::String verify = test;
delete[] test;
bool retVal = (verify == tag);
@@ -160,9 +160,9 @@ bool checkHeader(const char* tag, CBPersistMgr *pm) {
}
//////////////////////////////////////////////////////////////////////////
-HRESULT CSysClassRegistry::SaveTable(CBGame *Game, CBPersistMgr *PersistMgr, bool quickSave) {
- PersistMgr->PutString("<CLASS_REGISTRY_TABLE>");
- PersistMgr->PutDWORD(_classes.size());
+HRESULT CSysClassRegistry::SaveTable(CBGame *Game, CBPersistMgr *persistMgr, bool quickSave) {
+ persistMgr->putString("<CLASS_REGISTRY_TABLE>");
+ persistMgr->putDWORD(_classes.size());
int counter = 0;
@@ -176,16 +176,16 @@ HRESULT CSysClassRegistry::SaveTable(CBGame *Game, CBPersistMgr *PersistMgr, boo
Game->_renderer->Flip();
}
- (it->_value)->SaveTable(Game, PersistMgr);
+ (it->_value)->SaveTable(Game, persistMgr);
}
- PersistMgr->PutString("</CLASS_REGISTRY_TABLE>");
+ persistMgr->putString("</CLASS_REGISTRY_TABLE>");
return S_OK;
}
//////////////////////////////////////////////////////////////////////////
-HRESULT CSysClassRegistry::LoadTable(CBGame *Game, CBPersistMgr *PersistMgr) {
- checkHeader("<CLASS_REGISTRY_TABLE>", PersistMgr);
+HRESULT CSysClassRegistry::LoadTable(CBGame *Game, CBPersistMgr *persistMgr) {
+ checkHeader("<CLASS_REGISTRY_TABLE>", persistMgr);
// reset SavedID of current instances
Classes::iterator it;
@@ -200,26 +200,26 @@ HRESULT CSysClassRegistry::LoadTable(CBGame *Game, CBPersistMgr *PersistMgr) {
_instanceMap.clear();
- int numClasses = PersistMgr->GetDWORD();
+ int numClasses = persistMgr->getDWORD();
for (int i = 0; i < numClasses; i++) {
Game->_indicatorProgress = 50.0f / (float)((float)numClasses / (float)i);
Game->DisplayContentSimple();
Game->_renderer->Flip();
- char *className = PersistMgr->GetString();
+ char *className = persistMgr->getString();
NameMap::iterator mapIt = _nameMap.find(className);
- if (mapIt != _nameMap.end())(*mapIt)._value->LoadTable(Game, PersistMgr);
+ if (mapIt != _nameMap.end())(*mapIt)._value->LoadTable(Game, persistMgr);
}
- checkHeader("</CLASS_REGISTRY_TABLE>", PersistMgr);
+ checkHeader("</CLASS_REGISTRY_TABLE>", persistMgr);
return S_OK;
}
//////////////////////////////////////////////////////////////////////////
-HRESULT CSysClassRegistry::SaveInstances(CBGame *Game, CBPersistMgr *PersistMgr, bool quickSave) {
+HRESULT CSysClassRegistry::SaveInstances(CBGame *Game, CBPersistMgr *persistMgr, bool quickSave) {
Classes::iterator it;
@@ -229,7 +229,7 @@ HRESULT CSysClassRegistry::SaveInstances(CBGame *Game, CBPersistMgr *PersistMgr,
numInstances += (it->_value)->GetNumInstances();
}
- PersistMgr->PutDWORD(numInstances);
+ persistMgr->putDWORD(numInstances);
int counter = 0;
for (it = _classes.begin(); it != _classes.end(); ++it) {
@@ -244,16 +244,16 @@ HRESULT CSysClassRegistry::SaveInstances(CBGame *Game, CBPersistMgr *PersistMgr,
}
Game->MiniUpdate();
- (it->_value)->SaveInstances(Game, PersistMgr);
+ (it->_value)->SaveInstances(Game, persistMgr);
}
return S_OK;
}
//////////////////////////////////////////////////////////////////////////
-HRESULT CSysClassRegistry::LoadInstances(CBGame *Game, CBPersistMgr *PersistMgr) {
+HRESULT CSysClassRegistry::LoadInstances(CBGame *Game, CBPersistMgr *persistMgr) {
// get total instances
- int numInstances = PersistMgr->GetDWORD();
+ int numInstances = persistMgr->getDWORD();
for (int i = 0; i < numInstances; i++) {
if (i % 20 == 0) {
@@ -262,22 +262,22 @@ HRESULT CSysClassRegistry::LoadInstances(CBGame *Game, CBPersistMgr *PersistMgr)
Game->_renderer->Flip();
}
- checkHeader("<INSTANCE_HEAD>", PersistMgr);
+ checkHeader("<INSTANCE_HEAD>", persistMgr);
- int classID = PersistMgr->GetDWORD();
- int instanceID = PersistMgr->GetDWORD();
+ int classID = persistMgr->getDWORD();
+ int instanceID = persistMgr->getDWORD();
void *instance = IDToPointer(classID, instanceID);
- checkHeader("</INSTANCE_HEAD>", PersistMgr);
+ checkHeader("</INSTANCE_HEAD>", persistMgr);
Classes::iterator it;
for (it = _classes.begin(); it != _classes.end(); ++it) {
if ((it->_value)->GetSavedID() == classID) {
- (it->_value)->LoadInstance(instance, PersistMgr);
+ (it->_value)->LoadInstance(instance, persistMgr);
break;
}
}
- checkHeader("</INSTANCE>", PersistMgr);
+ checkHeader("</INSTANCE>", persistMgr);
}
_savedInstanceMap.clear();
diff --git a/engines/wintermute/UI/UIButton.cpp b/engines/wintermute/UI/UIButton.cpp
index 75cc3d5689..9decb4ea2a 100644
--- a/engines/wintermute/UI/UIButton.cpp
+++ b/engines/wintermute/UI/UIButton.cpp
@@ -1008,31 +1008,31 @@ const char *CUIButton::ScToString() {
//////////////////////////////////////////////////////////////////////////
-HRESULT CUIButton::Persist(CBPersistMgr *PersistMgr) {
-
- CUIObject::Persist(PersistMgr);
-
- PersistMgr->Transfer(TMEMBER_INT(_align));
- PersistMgr->Transfer(TMEMBER(_backDisable));
- PersistMgr->Transfer(TMEMBER(_backFocus));
- PersistMgr->Transfer(TMEMBER(_backHover));
- PersistMgr->Transfer(TMEMBER(_backPress));
- PersistMgr->Transfer(TMEMBER(_centerImage));
- PersistMgr->Transfer(TMEMBER(_fontDisable));
- PersistMgr->Transfer(TMEMBER(_fontFocus));
- PersistMgr->Transfer(TMEMBER(_fontHover));
- PersistMgr->Transfer(TMEMBER(_fontPress));
- PersistMgr->Transfer(TMEMBER(_hover));
- PersistMgr->Transfer(TMEMBER(_image));
- PersistMgr->Transfer(TMEMBER(_imageDisable));
- PersistMgr->Transfer(TMEMBER(_imageFocus));
- PersistMgr->Transfer(TMEMBER(_imageHover));
- PersistMgr->Transfer(TMEMBER(_imagePress));
- PersistMgr->Transfer(TMEMBER(_pixelPerfect));
- PersistMgr->Transfer(TMEMBER(_press));
- PersistMgr->Transfer(TMEMBER(_stayPressed));
-
- if (!PersistMgr->_saving) {
+HRESULT CUIButton::Persist(CBPersistMgr *persistMgr) {
+
+ CUIObject::Persist(persistMgr);
+
+ persistMgr->transfer(TMEMBER_INT(_align));
+ persistMgr->transfer(TMEMBER(_backDisable));
+ persistMgr->transfer(TMEMBER(_backFocus));
+ persistMgr->transfer(TMEMBER(_backHover));
+ persistMgr->transfer(TMEMBER(_backPress));
+ persistMgr->transfer(TMEMBER(_centerImage));
+ persistMgr->transfer(TMEMBER(_fontDisable));
+ persistMgr->transfer(TMEMBER(_fontFocus));
+ persistMgr->transfer(TMEMBER(_fontHover));
+ persistMgr->transfer(TMEMBER(_fontPress));
+ persistMgr->transfer(TMEMBER(_hover));
+ persistMgr->transfer(TMEMBER(_image));
+ persistMgr->transfer(TMEMBER(_imageDisable));
+ persistMgr->transfer(TMEMBER(_imageFocus));
+ persistMgr->transfer(TMEMBER(_imageHover));
+ persistMgr->transfer(TMEMBER(_imagePress));
+ persistMgr->transfer(TMEMBER(_pixelPerfect));
+ persistMgr->transfer(TMEMBER(_press));
+ persistMgr->transfer(TMEMBER(_stayPressed));
+
+ if (!persistMgr->_saving) {
_oneTimePress = false;
_oneTimePressTime = 0;
}
diff --git a/engines/wintermute/UI/UIEdit.cpp b/engines/wintermute/UI/UIEdit.cpp
index 54c85021c9..28f9671a6a 100644
--- a/engines/wintermute/UI/UIEdit.cpp
+++ b/engines/wintermute/UI/UIEdit.cpp
@@ -835,20 +835,20 @@ int CUIEdit::InsertChars(int Pos, byte *Chars, int Num) {
//////////////////////////////////////////////////////////////////////////
-HRESULT CUIEdit::Persist(CBPersistMgr *PersistMgr) {
+HRESULT CUIEdit::Persist(CBPersistMgr *persistMgr) {
- CUIObject::Persist(PersistMgr);
+ CUIObject::Persist(persistMgr);
- PersistMgr->Transfer(TMEMBER(_cursorBlinkRate));
- PersistMgr->Transfer(TMEMBER(_cursorChar));
- PersistMgr->Transfer(TMEMBER(_fontSelected));
- PersistMgr->Transfer(TMEMBER(_frameWidth));
- PersistMgr->Transfer(TMEMBER(_maxLength));
- PersistMgr->Transfer(TMEMBER(_scrollOffset));
- PersistMgr->Transfer(TMEMBER(_selEnd));
- PersistMgr->Transfer(TMEMBER(_selStart));
+ persistMgr->transfer(TMEMBER(_cursorBlinkRate));
+ persistMgr->transfer(TMEMBER(_cursorChar));
+ persistMgr->transfer(TMEMBER(_fontSelected));
+ persistMgr->transfer(TMEMBER(_frameWidth));
+ persistMgr->transfer(TMEMBER(_maxLength));
+ persistMgr->transfer(TMEMBER(_scrollOffset));
+ persistMgr->transfer(TMEMBER(_selEnd));
+ persistMgr->transfer(TMEMBER(_selStart));
- if (!PersistMgr->_saving) {
+ if (!persistMgr->_saving) {
_cursorVisible = false;
_lastBlinkTime = 0;
}
diff --git a/engines/wintermute/UI/UIEntity.cpp b/engines/wintermute/UI/UIEntity.cpp
index 97565603f3..ed0c9e1230 100644
--- a/engines/wintermute/UI/UIEntity.cpp
+++ b/engines/wintermute/UI/UIEntity.cpp
@@ -328,11 +328,11 @@ const char *CUIEntity::ScToString() {
//////////////////////////////////////////////////////////////////////////
-HRESULT CUIEntity::Persist(CBPersistMgr *PersistMgr) {
+HRESULT CUIEntity::Persist(CBPersistMgr *persistMgr) {
- CUIObject::Persist(PersistMgr);
+ CUIObject::Persist(persistMgr);
- PersistMgr->Transfer(TMEMBER(_entity));
+ persistMgr->transfer(TMEMBER(_entity));
return S_OK;
}
diff --git a/engines/wintermute/UI/UIObject.cpp b/engines/wintermute/UI/UIObject.cpp
index 3ef052da3e..4160bf1115 100644
--- a/engines/wintermute/UI/UIObject.cpp
+++ b/engines/wintermute/UI/UIObject.cpp
@@ -555,28 +555,28 @@ HRESULT CUIObject::GetTotalOffset(int *OffsetX, int *OffsetY) {
//////////////////////////////////////////////////////////////////////////
-HRESULT CUIObject::Persist(CBPersistMgr *PersistMgr) {
-
- CBObject::Persist(PersistMgr);
-
- PersistMgr->Transfer(TMEMBER(_back));
- PersistMgr->Transfer(TMEMBER(_canFocus));
- PersistMgr->Transfer(TMEMBER(_disable));
- PersistMgr->Transfer(TMEMBER(_focusedWidget));
- PersistMgr->Transfer(TMEMBER(_font));
- PersistMgr->Transfer(TMEMBER(_height));
- PersistMgr->Transfer(TMEMBER(_image));
- PersistMgr->Transfer(TMEMBER(_listenerObject));
- PersistMgr->Transfer(TMEMBER(_listenerParamObject));
- PersistMgr->Transfer(TMEMBER(_listenerParamDWORD));
- PersistMgr->Transfer(TMEMBER(_parent));
- PersistMgr->Transfer(TMEMBER(_parentNotify));
- PersistMgr->Transfer(TMEMBER(_sharedFonts));
- PersistMgr->Transfer(TMEMBER(_sharedImages));
- PersistMgr->Transfer(TMEMBER(_text));
- PersistMgr->Transfer(TMEMBER_INT(_type));
- PersistMgr->Transfer(TMEMBER(_visible));
- PersistMgr->Transfer(TMEMBER(_width));
+HRESULT CUIObject::Persist(CBPersistMgr *persistMgr) {
+
+ CBObject::Persist(persistMgr);
+
+ persistMgr->transfer(TMEMBER(_back));
+ persistMgr->transfer(TMEMBER(_canFocus));
+ persistMgr->transfer(TMEMBER(_disable));
+ persistMgr->transfer(TMEMBER(_focusedWidget));
+ persistMgr->transfer(TMEMBER(_font));
+ persistMgr->transfer(TMEMBER(_height));
+ persistMgr->transfer(TMEMBER(_image));
+ persistMgr->transfer(TMEMBER(_listenerObject));
+ persistMgr->transfer(TMEMBER(_listenerParamObject));
+ persistMgr->transfer(TMEMBER(_listenerParamDWORD));
+ persistMgr->transfer(TMEMBER(_parent));
+ persistMgr->transfer(TMEMBER(_parentNotify));
+ persistMgr->transfer(TMEMBER(_sharedFonts));
+ persistMgr->transfer(TMEMBER(_sharedImages));
+ persistMgr->transfer(TMEMBER(_text));
+ persistMgr->transfer(TMEMBER_INT(_type));
+ persistMgr->transfer(TMEMBER(_visible));
+ persistMgr->transfer(TMEMBER(_width));
return S_OK;
}
diff --git a/engines/wintermute/UI/UIText.cpp b/engines/wintermute/UI/UIText.cpp
index c2888e7393..f9ac91d422 100644
--- a/engines/wintermute/UI/UIText.cpp
+++ b/engines/wintermute/UI/UIText.cpp
@@ -467,11 +467,11 @@ const char *CUIText::ScToString() {
//////////////////////////////////////////////////////////////////////////
-HRESULT CUIText::Persist(CBPersistMgr *PersistMgr) {
+HRESULT CUIText::Persist(CBPersistMgr *persistMgr) {
- CUIObject::Persist(PersistMgr);
- PersistMgr->Transfer(TMEMBER_INT(_textAlign));
- PersistMgr->Transfer(TMEMBER_INT(_verticalAlign));
+ CUIObject::Persist(persistMgr);
+ persistMgr->transfer(TMEMBER_INT(_textAlign));
+ persistMgr->transfer(TMEMBER_INT(_verticalAlign));
return S_OK;
}
diff --git a/engines/wintermute/UI/UITiledImage.cpp b/engines/wintermute/UI/UITiledImage.cpp
index a38b6df54e..79c2278d0b 100644
--- a/engines/wintermute/UI/UITiledImage.cpp
+++ b/engines/wintermute/UI/UITiledImage.cpp
@@ -350,19 +350,19 @@ void CUITiledImage::CorrectSize(int *Width, int *Height) {
//////////////////////////////////////////////////////////////////////////
-HRESULT CUITiledImage::Persist(CBPersistMgr *PersistMgr) {
- CBObject::Persist(PersistMgr);
-
- PersistMgr->Transfer(TMEMBER(_downLeft));
- PersistMgr->Transfer(TMEMBER(_downMiddle));
- PersistMgr->Transfer(TMEMBER(_downRight));
- PersistMgr->Transfer(TMEMBER(_image));
- PersistMgr->Transfer(TMEMBER(_middleLeft));
- PersistMgr->Transfer(TMEMBER(_middleMiddle));
- PersistMgr->Transfer(TMEMBER(_middleRight));
- PersistMgr->Transfer(TMEMBER(_upLeft));
- PersistMgr->Transfer(TMEMBER(_upMiddle));
- PersistMgr->Transfer(TMEMBER(_upRight));
+HRESULT CUITiledImage::Persist(CBPersistMgr *persistMgr) {
+ CBObject::Persist(persistMgr);
+
+ persistMgr->transfer(TMEMBER(_downLeft));
+ persistMgr->transfer(TMEMBER(_downMiddle));
+ persistMgr->transfer(TMEMBER(_downRight));
+ persistMgr->transfer(TMEMBER(_image));
+ persistMgr->transfer(TMEMBER(_middleLeft));
+ persistMgr->transfer(TMEMBER(_middleMiddle));
+ persistMgr->transfer(TMEMBER(_middleRight));
+ persistMgr->transfer(TMEMBER(_upLeft));
+ persistMgr->transfer(TMEMBER(_upMiddle));
+ persistMgr->transfer(TMEMBER(_upRight));
return S_OK;
}
diff --git a/engines/wintermute/UI/UIWindow.cpp b/engines/wintermute/UI/UIWindow.cpp
index 94c76a60ea..b8f00fdb1e 100644
--- a/engines/wintermute/UI/UIWindow.cpp
+++ b/engines/wintermute/UI/UIWindow.cpp
@@ -1150,31 +1150,31 @@ HRESULT CUIWindow::HandleMouse(TMouseEvent Event, TMouseButton Button) {
//////////////////////////////////////////////////////////////////////////
-HRESULT CUIWindow::Persist(CBPersistMgr *PersistMgr) {
-
- CUIObject::Persist(PersistMgr);
-
- PersistMgr->Transfer(TMEMBER(_backInactive));
- PersistMgr->Transfer(TMEMBER(_clipContents));
- PersistMgr->Transfer(TMEMBER(_dragFrom));
- PersistMgr->Transfer(TMEMBER(_dragging));
- PersistMgr->Transfer(TMEMBER(_dragRect));
- PersistMgr->Transfer(TMEMBER(_fadeBackground));
- PersistMgr->Transfer(TMEMBER(_fadeColor));
- PersistMgr->Transfer(TMEMBER(_fontInactive));
- PersistMgr->Transfer(TMEMBER(_imageInactive));
- PersistMgr->Transfer(TMEMBER(_inGame));
- PersistMgr->Transfer(TMEMBER(_isMenu));
- PersistMgr->Transfer(TMEMBER_INT(_mode));
- PersistMgr->Transfer(TMEMBER(_shieldButton));
- PersistMgr->Transfer(TMEMBER(_shieldWindow));
- PersistMgr->Transfer(TMEMBER_INT(_titleAlign));
- PersistMgr->Transfer(TMEMBER(_titleRect));
- PersistMgr->Transfer(TMEMBER(_transparent));
- PersistMgr->Transfer(TMEMBER(_viewport));
- PersistMgr->Transfer(TMEMBER(_pauseMusic));
-
- _widgets.Persist(PersistMgr);
+HRESULT CUIWindow::Persist(CBPersistMgr *persistMgr) {
+
+ CUIObject::Persist(persistMgr);
+
+ persistMgr->transfer(TMEMBER(_backInactive));
+ persistMgr->transfer(TMEMBER(_clipContents));
+ persistMgr->transfer(TMEMBER(_dragFrom));
+ persistMgr->transfer(TMEMBER(_dragging));
+ persistMgr->transfer(TMEMBER(_dragRect));
+ persistMgr->transfer(TMEMBER(_fadeBackground));
+ persistMgr->transfer(TMEMBER(_fadeColor));
+ persistMgr->transfer(TMEMBER(_fontInactive));
+ persistMgr->transfer(TMEMBER(_imageInactive));
+ persistMgr->transfer(TMEMBER(_inGame));
+ persistMgr->transfer(TMEMBER(_isMenu));
+ persistMgr->transfer(TMEMBER_INT(_mode));
+ persistMgr->transfer(TMEMBER(_shieldButton));
+ persistMgr->transfer(TMEMBER(_shieldWindow));
+ persistMgr->transfer(TMEMBER_INT(_titleAlign));
+ persistMgr->transfer(TMEMBER(_titleRect));
+ persistMgr->transfer(TMEMBER(_transparent));
+ persistMgr->transfer(TMEMBER(_viewport));
+ persistMgr->transfer(TMEMBER(_pauseMusic));
+
+ _widgets.Persist(persistMgr);
return S_OK;
}
diff --git a/engines/wintermute/coll_templ.h b/engines/wintermute/coll_templ.h
index a5c02b313d..131a261bf1 100644
--- a/engines/wintermute/coll_templ.h
+++ b/engines/wintermute/coll_templ.h
@@ -88,7 +88,7 @@ public:
// Clean up
void FreeExtra();
void RemoveAll();
- HRESULT Persist(CBPersistMgr *PersistMgr);
+ HRESULT Persist(CBPersistMgr *persistMgr);
// Accessing elements
TYPE GetAt(int nIndex) const;
@@ -346,21 +346,21 @@ void CBArray<TYPE, ARG_TYPE>::InsertAt(int nStartIndex, CBArray *pNewArray) {
/////////////////////////////////////////////////////////////////////////////
template<class TYPE, class ARG_TYPE>
-HRESULT CBArray<TYPE, ARG_TYPE>::Persist(CBPersistMgr *PersistMgr) {
+HRESULT CBArray<TYPE, ARG_TYPE>::Persist(CBPersistMgr *persistMgr) {
int i, j;
- if (PersistMgr->_saving) {
+ if (persistMgr->_saving) {
j = GetSize();
- PersistMgr->Transfer("ArraySize", &j);
+ persistMgr->transfer("ArraySize", &j);
for (i = 0; i < j; i++) {
ARG_TYPE obj = GetAt(i);
- PersistMgr->Transfer("", &obj);
+ persistMgr->transfer("", &obj);
}
} else {
SetSize(0, -1);
- PersistMgr->Transfer("ArraySize", &j);
+ persistMgr->transfer("ArraySize", &j);
for (i = 0; i < j; i++) {
ARG_TYPE obj;
- PersistMgr->Transfer("", &obj);
+ persistMgr->transfer("", &obj);
Add(obj);
}
}
diff --git a/engines/wintermute/video/VidTheoraPlayer.cpp b/engines/wintermute/video/VidTheoraPlayer.cpp
index 8398578c2b..d52248ad4a 100644
--- a/engines/wintermute/video/VidTheoraPlayer.cpp
+++ b/engines/wintermute/video/VidTheoraPlayer.cpp
@@ -797,29 +797,29 @@ HRESULT CVidTheoraPlayer::resume() {
}
//////////////////////////////////////////////////////////////////////////
-HRESULT CVidTheoraPlayer::Persist(CBPersistMgr *PersistMgr) {
- //CBBase::Persist(PersistMgr);
+HRESULT CVidTheoraPlayer::Persist(CBPersistMgr *persistMgr) {
+ //CBBase::Persist(persistMgr);
- if (PersistMgr->_saving) {
+ if (persistMgr->_saving) {
_savedPos = getMovieTime() * 1000;
_savedState = _state;
} else {
SetDefaults();
}
- PersistMgr->Transfer(TMEMBER(Game));
- PersistMgr->Transfer(TMEMBER(_savedPos));
- PersistMgr->Transfer(TMEMBER(_savedState));
- PersistMgr->Transfer(TMEMBER(_filename));
- PersistMgr->Transfer(TMEMBER(_alphaFilename));
- PersistMgr->Transfer(TMEMBER(_posX));
- PersistMgr->Transfer(TMEMBER(_posY));
- PersistMgr->Transfer(TMEMBER(_playZoom));
- PersistMgr->Transfer(TMEMBER_INT(_playbackType));
- PersistMgr->Transfer(TMEMBER(_looping));
- PersistMgr->Transfer(TMEMBER(_volume));
-
- if (!PersistMgr->_saving && (_savedState != THEORA_STATE_NONE)) {
+ persistMgr->transfer(TMEMBER(Game));
+ persistMgr->transfer(TMEMBER(_savedPos));
+ persistMgr->transfer(TMEMBER(_savedState));
+ persistMgr->transfer(TMEMBER(_filename));
+ persistMgr->transfer(TMEMBER(_alphaFilename));
+ persistMgr->transfer(TMEMBER(_posX));
+ persistMgr->transfer(TMEMBER(_posY));
+ persistMgr->transfer(TMEMBER(_playZoom));
+ persistMgr->transfer(TMEMBER_INT(_playbackType));
+ persistMgr->transfer(TMEMBER(_looping));
+ persistMgr->transfer(TMEMBER(_volume));
+
+ if (!persistMgr->_saving && (_savedState != THEORA_STATE_NONE)) {
initializeSimple();
}