aboutsummaryrefslogtreecommitdiff
path: root/engines/wintermute/Base
diff options
context:
space:
mode:
authorEinar Johan Trøan Sømåen2012-07-08 19:48:18 +0200
committerEinar Johan Trøan Sømåen2012-07-08 19:48:18 +0200
commitf821b5c0a83e8b0b962db877238f2e8e7480bcc1 (patch)
tree820a1dbcfe971d265589d5aaa76d88a22ac0f8d5 /engines/wintermute/Base
parent6e06a2dd980bbb1ba54ebd770a84c1c0a3cd62f9 (diff)
downloadscummvm-rg350-f821b5c0a83e8b0b962db877238f2e8e7480bcc1.tar.gz
scummvm-rg350-f821b5c0a83e8b0b962db877238f2e8e7480bcc1.tar.bz2
scummvm-rg350-f821b5c0a83e8b0b962db877238f2e8e7480bcc1.zip
WINTERMUTE: Rename VarName->varName in BObject
Diffstat (limited to 'engines/wintermute/Base')
-rw-r--r--engines/wintermute/Base/BObject.cpp54
-rw-r--r--engines/wintermute/Base/BObject.h22
2 files changed, 41 insertions, 35 deletions
diff --git a/engines/wintermute/Base/BObject.cpp b/engines/wintermute/Base/BObject.cpp
index 8b92721a4e..49c4a19fcc 100644
--- a/engines/wintermute/Base/BObject.cpp
+++ b/engines/wintermute/Base/BObject.cpp
@@ -86,7 +86,8 @@ CBObject::CBObject(CBGame *inGame): CBScriptHolder(inGame) {
_rotateValid = false;
_relativeRotate = 0.0f;
- for (int i = 0; i < 7; i++) _caption[i] = NULL;
+ for (int i = 0; i < 7; i++)
+ _caption[i] = NULL;
_saveState = true;
_nonIntMouseEvents = false;
@@ -107,7 +108,8 @@ CBObject::~CBObject() {
//////////////////////////////////////////////////////////////////////////
HRESULT CBObject::cleanup() {
- if (Game && Game->_activeObject == this) Game->_activeObject = NULL;
+ if (Game && Game->_activeObject == this)
+ Game->_activeObject = NULL;
CBScriptHolder::cleanup();
delete[] _soundEvent;
@@ -137,7 +139,8 @@ HRESULT CBObject::cleanup() {
//////////////////////////////////////////////////////////////////////////
void CBObject::setCaption(const char *caption, int Case) { // TODO: rename Case to something usefull
if (Case == 0) Case = 1;
- if (Case < 1 || Case > 7) return;
+ if (Case < 1 || Case > 7)
+ return;
delete[] _caption[Case - 1];
_caption[Case - 1] = new char[strlen(caption) + 1];
@@ -149,10 +152,11 @@ void CBObject::setCaption(const char *caption, int Case) { // TODO: rename Case
//////////////////////////////////////////////////////////////////////////
-char *CBObject::getCaption(int Case) {
- if (Case == 0) Case = 1;
- if (Case < 1 || Case > 7 || _caption[Case - 1] == NULL) return "";
- else return _caption[Case - 1];
+char *CBObject::getCaption(int caseVal) {
+ if (caseVal == 0) caseVal = 1;
+ if (caseVal < 1 || caseVal > 7 || _caption[caseVal - 1] == NULL)
+ return "";
+ else return _caption[caseVal - 1];
}
@@ -284,8 +288,8 @@ HRESULT CBObject::scCallMethod(CScScript *script, CScStack *stack, CScStack *thi
stack->correctParams(3);
const char *filename;
- bool Looping;
- uint32 LoopStart;
+ bool looping;
+ uint32 loopStart;
CScValue *val1 = stack->pop();
CScValue *val2 = stack->pop();
@@ -293,16 +297,17 @@ HRESULT CBObject::scCallMethod(CScScript *script, CScStack *stack, CScStack *thi
if (val1->_type == VAL_BOOL) {
filename = NULL;
- Looping = val1->getBool();
- LoopStart = val2->getInt();
+ looping = val1->getBool();
+ loopStart = val2->getInt();
} else {
if (val1->isNULL()) filename = NULL;
else filename = val1->getString();
- Looping = val2->isNULL() ? false : val2->getBool();
- LoopStart = val3->getInt();
+ looping = val2->isNULL() ? false : val2->getBool();
+ loopStart = val3->getInt();
}
- if (FAILED(playSFX(filename, Looping, true, NULL, LoopStart))) stack->pushBool(false);
+ if (FAILED(playSFX(filename, looping, true, NULL, loopStart)))
+ stack->pushBool(false);
else stack->pushBool(true);
return S_OK;
}
@@ -314,20 +319,20 @@ HRESULT CBObject::scCallMethod(CScScript *script, CScStack *stack, CScStack *thi
stack->correctParams(2);
const char *filename;
- const char *EventName;
+ const char *eventName;
CScValue *val1 = stack->pop();
CScValue *val2 = stack->pop();
if (val2->isNULL()) {
filename = NULL;
- EventName = val1->getString();
+ eventName = val1->getString();
} else {
filename = val1->getString();
- EventName = val2->getString();
+ eventName = val2->getString();
}
- if (FAILED(playSFX(filename, false, true, EventName))) stack->pushBool(false);
+ if (FAILED(playSFX(filename, false, true, eventName))) stack->pushBool(false);
else stack->pushBool(true);
return S_OK;
}
@@ -405,8 +410,8 @@ HRESULT CBObject::scCallMethod(CScScript *script, CScStack *stack, CScStack *thi
else if (strcmp(name, "SetSoundVolume") == 0) {
stack->correctParams(1);
- int Volume = stack->pop()->getInt();
- if (FAILED(setSFXVolume(Volume))) stack->pushBool(false);
+ int volume = stack->pop()->getInt();
+ if (FAILED(setSFXVolume(volume))) stack->pushBool(false);
else stack->pushBool(true);
return S_OK;
}
@@ -867,7 +872,8 @@ 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]));
+ for (int i = 0; i < 7; i++)
+ persistMgr->transfer(TMEMBER(_caption[i]));
persistMgr->transfer(TMEMBER(_activeCursor));
persistMgr->transfer(TMEMBER(_alphaColor));
persistMgr->transfer(TMEMBER(_autoSoundPanning));
@@ -1049,9 +1055,9 @@ HRESULT CBObject::setSFXTime(uint32 time) {
//////////////////////////////////////////////////////////////////////////
-HRESULT CBObject::setSFXVolume(int Volume) {
- _sFXVolume = Volume;
- if (_sFX) return _sFX->setVolume(Volume);
+HRESULT CBObject::setSFXVolume(int volume) {
+ _sFXVolume = volume;
+ if (_sFX) return _sFX->setVolume(volume);
else return S_OK;
}
diff --git a/engines/wintermute/Base/BObject.h b/engines/wintermute/Base/BObject.h
index a77bde0896..48d2ea667b 100644
--- a/engines/wintermute/Base/BObject.h
+++ b/engines/wintermute/Base/BObject.h
@@ -50,7 +50,7 @@ public:
float _relativeRotate;
bool _rotateValid;
float _rotate;
- void setSoundEvent(const char *EventName);
+ void setSoundEvent(const char *eventName);
bool _rotatable;
uint32 _alphaColor;
float _scale;
@@ -58,19 +58,19 @@ public:
float _scaleY;
float _relativeScale;
virtual bool isReady();
- virtual bool getExtendedFlag(const char *FlagName);
+ virtual bool getExtendedFlag(const char *flagName);
virtual HRESULT resetSoundPan();
virtual HRESULT updateSounds();
- HRESULT updateOneSound(CBSound *Sound);
+ HRESULT updateOneSound(CBSound *sound);
bool _autoSoundPanning;
uint32 _sFXStart;
int _sFXVolume;
- HRESULT setSFXTime(uint32 Time);
- HRESULT setSFXVolume(int Volume);
+ HRESULT setSFXTime(uint32 time);
+ HRESULT setSFXVolume(int volume);
HRESULT resumeSFX();
HRESULT pauseSFX();
- HRESULT stopSFX(bool DeleteSound = true);
- HRESULT playSFX(const char *filename, bool Looping = false, bool PlayNow = true, const char *EventName = NULL, uint32 LoopStart = 0);
+ HRESULT stopSFX(bool deleteSound = true);
+ HRESULT playSFX(const char *filename, bool looping = false, bool playNow = true, const char *eventName = NULL, uint32 loopStart = 0);
CBSound *_sFX;
TSFXType _sFXType;
@@ -79,15 +79,15 @@ public:
float _sFXParam3;
float _sFXParam4;
- virtual bool handleMouseWheel(int Delta);
- virtual HRESULT handleMouse(TMouseEvent Event, TMouseButton Button);
+ virtual bool handleMouseWheel(int delta);
+ virtual HRESULT handleMouse(TMouseEvent event, TMouseButton button);
virtual bool handleKeypress(Common::Event *event, bool printable = false);
virtual int getHeight();
HRESULT setCursor(const char *filename);
HRESULT setActiveCursor(const char *filename);
HRESULT cleanup();
- char *getCaption(int Case = 1);
- void setCaption(const char *Caption, int Case = 1);
+ char *getCaption(int caseVal = 1);
+ void setCaption(const char *caption, int caseVal = 1);
bool _editorSelected;
bool _editorAlwaysRegister;
bool _editorOnly;