aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorEinar Johan Trøan Sømåen2012-07-04 22:08:57 +0200
committerEinar Johan Trøan Sømåen2012-07-04 22:08:57 +0200
commit3f6f944473211d5a1788671ca66f6fba103b4d40 (patch)
treef2738df95ac795068264c49ead4ad9cf086b8117 /engines
parent3fa0bb4c7a2079d9f8f6d5787d20cecfb0883146 (diff)
downloadscummvm-rg350-3f6f944473211d5a1788671ca66f6fba103b4d40.tar.gz
scummvm-rg350-3f6f944473211d5a1788671ca66f6fba103b4d40.tar.bz2
scummvm-rg350-3f6f944473211d5a1788671ca66f6fba103b4d40.zip
WINTERMUTE: Rename VarName->varName in BBase.
Diffstat (limited to 'engines')
-rw-r--r--engines/wintermute/Base/BBase.cpp63
-rw-r--r--engines/wintermute/Base/BBase.h8
2 files changed, 36 insertions, 35 deletions
diff --git a/engines/wintermute/Base/BBase.cpp b/engines/wintermute/Base/BBase.cpp
index 08baa337ed..3ca29e9dcd 100644
--- a/engines/wintermute/Base/BBase.cpp
+++ b/engines/wintermute/Base/BBase.cpp
@@ -55,23 +55,23 @@ CBBase::~CBBase() {
//////////////////////////////////////////////////////////////////////////
-const char *CBBase::getEditorProp(const char *PropName, const char *InitVal) {
- _editorPropsIter = _editorProps.find(PropName);
+const char *CBBase::getEditorProp(const char *propName, const char *initVal) {
+ _editorPropsIter = _editorProps.find(propName);
if (_editorPropsIter != _editorProps.end())
return _editorPropsIter->_value.c_str();
//return _editorPropsIter->second.c_str(); // <- TODO Clean
- else return InitVal;
+ else return initVal;
}
//////////////////////////////////////////////////////////////////////////
-HRESULT CBBase::setEditorProp(const char *PropName, const char *PropValue) {
- if (PropName == NULL) return E_FAIL;
+HRESULT CBBase::setEditorProp(const char *propName, const char *propValue) {
+ if (propName == NULL) return E_FAIL;
- if (PropValue == NULL) {
- _editorProps.erase(PropName);
+ if (propValue == NULL) {
+ _editorProps.erase(propName);
} else {
- _editorProps[PropName] = PropValue;
+ _editorProps[propName] = propValue;
}
return S_OK;
}
@@ -92,7 +92,8 @@ HRESULT CBBase::parseEditorProperty(byte *buffer, bool complete) {
TOKEN_TABLE_END
- if (!Game->_editorMode) return S_OK;
+ if (!Game->_editorMode)
+ return S_OK;
byte *params;
@@ -107,51 +108,51 @@ HRESULT CBBase::parseEditorProperty(byte *buffer, bool complete) {
buffer = params;
}
- char *PropName = NULL;
- char *PropValue = NULL;
+ char *propName = NULL;
+ char *propValue = NULL;
while ((cmd = parser.GetCommand((char **)&buffer, commands, (char **)&params)) > 0) {
switch (cmd) {
case TOKEN_NAME:
- delete[] PropName;
- PropName = new char[strlen((char *)params) + 1];
- if (PropName) strcpy(PropName, (char *)params);
+ delete[] propName;
+ propName = new char[strlen((char *)params) + 1];
+ if (propName) strcpy(propName, (char *)params);
else cmd = PARSERR_GENERIC;
break;
case TOKEN_VALUE:
- delete[] PropValue;
- PropValue = new char[strlen((char *)params) + 1];
- if (PropValue) strcpy(PropValue, (char *)params);
+ delete[] propValue;
+ propValue = new char[strlen((char *)params) + 1];
+ if (propValue) strcpy(propValue, (char *)params);
else cmd = PARSERR_GENERIC;
break;
}
}
if (cmd == PARSERR_TOKENNOTFOUND) {
- delete[] PropName;
- delete[] PropValue;
- PropName = NULL;
- PropValue = NULL;
+ delete[] propName;
+ delete[] propValue;
+ propName = NULL;
+ propValue = NULL;
Game->LOG(0, "Syntax error in EDITOR_PROPERTY definition");
return E_FAIL;
}
- if (cmd == PARSERR_GENERIC || PropName == NULL || PropValue == NULL) {
- delete[] PropName;
- delete[] PropValue;
- PropName = NULL;
- PropValue = NULL;
+ if (cmd == PARSERR_GENERIC || propName == NULL || propValue == NULL) {
+ delete[] propName;
+ delete[] propValue;
+ propName = NULL;
+ propValue = NULL;
Game->LOG(0, "Error loading EDITOR_PROPERTY definition");
return E_FAIL;
}
- setEditorProp(PropName, PropValue);
+ setEditorProp(propName, propValue);
- delete[] PropName;
- delete[] PropValue;
- PropName = NULL;
- PropValue = NULL;
+ delete[] propName;
+ delete[] propValue;
+ propName = NULL;
+ propValue = NULL;
return S_OK;
}
diff --git a/engines/wintermute/Base/BBase.h b/engines/wintermute/Base/BBase.h
index 15bc768bfd..73eabb5d62 100644
--- a/engines/wintermute/Base/BBase.h
+++ b/engines/wintermute/Base/BBase.h
@@ -43,11 +43,11 @@ class CBDynBuffer;
class CBBase {
public:
bool _persistable;
- HRESULT setEditorProp(const char *PropName, const char *PropValue);
- const char *getEditorProp(const char *PropName, const char *InitVal = NULL);
+ HRESULT setEditorProp(const char *propName, const char *propValue);
+ const char *getEditorProp(const char *propName, const char *initVal = NULL);
CBBase(TDynamicConstructor, TDynamicConstructor) {};
- HRESULT parseEditorProperty(byte *Buffer, bool Complete = true);
- virtual HRESULT saveAsText(CBDynBuffer *Buffer, int Indent = 0);
+ HRESULT parseEditorProperty(byte *buffer, bool complete = true);
+ virtual HRESULT saveAsText(CBDynBuffer *buffer, int indent = 0);
CBBase();
CBGame *Game;
CBBase(CBGame *GameOwner);