From be4ceeb44e455882a33dd81a76dc91d3a378dbfb Mon Sep 17 00:00:00 2001 From: Einar Johan Trøan Sømåen Date: Wed, 4 Jul 2012 13:18:05 +0200 Subject: WINTERMUTE: Rename FuncName->funcName in AdInventory --- engines/wintermute/Ad/AdGame.cpp | 2 +- engines/wintermute/Ad/AdInventory.cpp | 18 +++++++++--------- engines/wintermute/Ad/AdInventory.h | 6 +++--- engines/wintermute/Ad/AdObject.cpp | 4 ++-- 4 files changed, 15 insertions(+), 15 deletions(-) diff --git a/engines/wintermute/Ad/AdGame.cpp b/engines/wintermute/Ad/AdGame.cpp index 969a03456d..fabeda7dea 100644 --- a/engines/wintermute/Ad/AdGame.cpp +++ b/engines/wintermute/Ad/AdGame.cpp @@ -1847,7 +1847,7 @@ HRESULT CAdGame::deleteItem(CAdItem *item) { // remove from all inventories for (int i = 0; i < _inventories.GetSize(); i++) { - _inventories[i]->RemoveItem(item); + _inventories[i]->removeItem(item); } // remove object diff --git a/engines/wintermute/Ad/AdInventory.cpp b/engines/wintermute/Ad/AdInventory.cpp index a453343a56..6260e23778 100644 --- a/engines/wintermute/Ad/AdInventory.cpp +++ b/engines/wintermute/Ad/AdInventory.cpp @@ -49,32 +49,32 @@ CAdInventory::~CAdInventory() { ////////////////////////////////////////////////////////////////////////// -HRESULT CAdInventory::InsertItem(const char *name, const char *InsertAfter) { +HRESULT CAdInventory::insertItem(const char *name, const char *insertAfter) { if (name == NULL) return E_FAIL; CAdItem *item = ((CAdGame *)Game)->getItemByName(name); if (item == NULL) return E_FAIL; - int InsertIndex = -1; + int insertIndex = -1; for (int i = 0; i < _takenItems.GetSize(); i++) { if (scumm_stricmp(_takenItems[i]->_name, name) == 0) { _takenItems.RemoveAt(i); i--; continue; } - if (InsertAfter && scumm_stricmp(_takenItems[i]->_name, InsertAfter) == 0) InsertIndex = i + 1; + if (insertAfter && scumm_stricmp(_takenItems[i]->_name, insertAfter) == 0) insertIndex = i + 1; } - if (InsertIndex == -1) _takenItems.Add(item); - else _takenItems.InsertAt(InsertIndex, item); + if (insertIndex == -1) _takenItems.Add(item); + else _takenItems.InsertAt(insertIndex, item); return S_OK; } ////////////////////////////////////////////////////////////////////////// -HRESULT CAdInventory::RemoveItem(const char *name) { +HRESULT CAdInventory::removeItem(const char *name) { if (name == NULL) return E_FAIL; for (int i = 0; i < _takenItems.GetSize(); i++) { @@ -91,11 +91,11 @@ HRESULT CAdInventory::RemoveItem(const char *name) { ////////////////////////////////////////////////////////////////////////// -HRESULT CAdInventory::RemoveItem(CAdItem *Item) { - if (Item == NULL) return E_FAIL; +HRESULT CAdInventory::removeItem(CAdItem *item) { + if (item == NULL) return E_FAIL; for (int i = 0; i < _takenItems.GetSize(); i++) { - if (_takenItems[i] == Item) { + if (_takenItems[i] == item) { if (((CAdGame *)Game)->_selectedItem == _takenItems[i])((CAdGame *)Game)->_selectedItem = NULL; _takenItems.RemoveAt(i); return S_OK; diff --git a/engines/wintermute/Ad/AdInventory.h b/engines/wintermute/Ad/AdInventory.h index f372fec6e9..6ba48a59c9 100644 --- a/engines/wintermute/Ad/AdInventory.h +++ b/engines/wintermute/Ad/AdInventory.h @@ -38,9 +38,9 @@ class CAdItem; class CAdInventory : public CBObject { public: DECLARE_PERSISTENT(CAdInventory, CBObject) - HRESULT RemoveItem(const char *name); - HRESULT RemoveItem(CAdItem *Item); - HRESULT InsertItem(const char *name, const char *InsertAfter = NULL); + HRESULT removeItem(const char *name); + HRESULT removeItem(CAdItem *Item); + HRESULT insertItem(const char *name, const char *insertAfter = NULL); CAdInventory(CBGame *inGame); virtual ~CAdInventory(); CBArray _takenItems; diff --git a/engines/wintermute/Ad/AdObject.cpp b/engines/wintermute/Ad/AdObject.cpp index d59e575d8e..5068bdf5dc 100644 --- a/engines/wintermute/Ad/AdObject.cpp +++ b/engines/wintermute/Ad/AdObject.cpp @@ -360,7 +360,7 @@ HRESULT CAdObject::scCallMethod(CScScript *script, CScStack *stack, CScStack *th const char *ItemName = val->getString(); val = stack->pop(); const char *InsertAfter = val->isNULL() ? NULL : val->getString(); - if (FAILED(_inventory->InsertItem(ItemName, InsertAfter))) script->RuntimeError("Cannot add item '%s' to inventory", ItemName); + if (FAILED(_inventory->insertItem(ItemName, InsertAfter))) script->RuntimeError("Cannot add item '%s' to inventory", ItemName); else { // hide associated entities ((CAdGame *)Game)->_scene->handleItemAssociations(ItemName, false); @@ -385,7 +385,7 @@ HRESULT CAdObject::scCallMethod(CScScript *script, CScStack *stack, CScStack *th CScValue *val = stack->pop(); if (!val->isNULL()) { - if (FAILED(_inventory->RemoveItem(val->getString()))) script->RuntimeError("Cannot remove item '%s' from inventory", val->getString()); + if (FAILED(_inventory->removeItem(val->getString()))) script->RuntimeError("Cannot remove item '%s' from inventory", val->getString()); else { // show associated entities ((CAdGame *)Game)->_scene->handleItemAssociations(val->getString(), true); -- cgit v1.2.3