diff options
author | Einar Johan Trøan Sømåen | 2012-06-26 00:41:05 +0200 |
---|---|---|
committer | Einar Johan Trøan Sømåen | 2012-06-26 00:41:05 +0200 |
commit | 37079a633591c386731c6287800a09cb093ae78b (patch) | |
tree | 5ab996372ffd14273bafb9dc87898e0f940bb358 /engines/wintermute/Base | |
parent | 4f1989e6b82ed493b59a06df7744c62b668b5929 (diff) | |
download | scummvm-rg350-37079a633591c386731c6287800a09cb093ae78b.tar.gz scummvm-rg350-37079a633591c386731c6287800a09cb093ae78b.tar.bz2 scummvm-rg350-37079a633591c386731c6287800a09cb093ae78b.zip |
WINTERMUTE: Rename FuncName->funcName in BNamedObject and BScriptHolder
Diffstat (limited to 'engines/wintermute/Base')
38 files changed, 172 insertions, 172 deletions
diff --git a/engines/wintermute/Base/BDynBuffer.cpp b/engines/wintermute/Base/BDynBuffer.cpp index 0e1c56d264..4a498fb3dd 100644 --- a/engines/wintermute/Base/BDynBuffer.cpp +++ b/engines/wintermute/Base/BDynBuffer.cpp @@ -47,12 +47,12 @@ CBDynBuffer::CBDynBuffer(CBGame *inGame, uint32 InitSize, uint32 GrowBy): CBBase //////////////////////////////////////////////////////////////////////////
CBDynBuffer::~CBDynBuffer() {
- Cleanup();
+ cleanup();
}
//////////////////////////////////////////////////////////////////////////
-void CBDynBuffer::Cleanup() {
+void CBDynBuffer::cleanup() {
if (_buffer) free(_buffer);
_buffer = NULL;
_size = 0;
@@ -70,7 +70,7 @@ uint32 CBDynBuffer::GetSize() { //////////////////////////////////////////////////////////////////////////
HRESULT CBDynBuffer::Init(uint32 InitSize) {
- Cleanup();
+ cleanup();
if (InitSize == 0) InitSize = _initSize;
diff --git a/engines/wintermute/Base/BDynBuffer.h b/engines/wintermute/Base/BDynBuffer.h index c90c464aad..626ce04314 100644 --- a/engines/wintermute/Base/BDynBuffer.h +++ b/engines/wintermute/Base/BDynBuffer.h @@ -47,7 +47,7 @@ public: HRESULT PutBytes(byte *Buffer, uint32 Size);
uint32 GetSize();
HRESULT Init(uint32 InitSize = 0);
- void Cleanup();
+ void cleanup();
uint32 _size;
byte *_buffer;
CBDynBuffer(CBGame *inGame, uint32 InitSize = 1000, uint32 GrowBy = 1000);
diff --git a/engines/wintermute/Base/BFileManager.cpp b/engines/wintermute/Base/BFileManager.cpp index 90c0fffc39..397d314c3a 100644 --- a/engines/wintermute/Base/BFileManager.cpp +++ b/engines/wintermute/Base/BFileManager.cpp @@ -70,12 +70,12 @@ CBFileManager::CBFileManager(CBGame *inGame): CBBase(inGame) { //////////////////////////////////////////////////////////////////////
CBFileManager::~CBFileManager() {
- Cleanup();
+ cleanup();
}
//////////////////////////////////////////////////////////////////////////
-HRESULT CBFileManager::Cleanup() {
+HRESULT CBFileManager::cleanup() {
int i;
// delete registered paths
@@ -842,7 +842,7 @@ HRESULT CBFileManager::RestoreCurrentDir() { //////////////////////////////////////////////////////////////////////////
HRESULT CBFileManager::SetBasePath(const Common::String &Path) {
- Cleanup();
+ cleanup();
if (Path.c_str()) {
_basePath = new char[Path.size() + 1];
diff --git a/engines/wintermute/Base/BFileManager.h b/engines/wintermute/Base/BFileManager.h index 11a90fc823..173bf4c570 100644 --- a/engines/wintermute/Base/BFileManager.h +++ b/engines/wintermute/Base/BFileManager.h @@ -43,7 +43,7 @@ class CBFile; class CBFileManager: CBBase {
public:
bool FindPackageSignature(Common::File *f, uint32 *Offset);
- HRESULT Cleanup();
+ HRESULT cleanup();
HRESULT SetBasePath(const Common::String &path);
HRESULT RestoreCurrentDir();
char *_basePath;
diff --git a/engines/wintermute/Base/BFontStorage.cpp b/engines/wintermute/Base/BFontStorage.cpp index a6ad5fb6a6..3244dfa332 100644 --- a/engines/wintermute/Base/BFontStorage.cpp +++ b/engines/wintermute/Base/BFontStorage.cpp @@ -50,7 +50,7 @@ CBFontStorage::CBFontStorage(CBGame *inGame): CBBase(inGame) { //////////////////////////////////////////////////////////////////////////
CBFontStorage::~CBFontStorage() {
- Cleanup(true);
+ cleanup(true);
}
@@ -65,7 +65,7 @@ void CBFontStorage::InitFreeType() { }
//////////////////////////////////////////////////////////////////////////
-HRESULT CBFontStorage::Cleanup(bool Warn) {
+HRESULT CBFontStorage::cleanup(bool Warn) {
int i;
for (i = 0; i < _fonts.GetSize(); i++) {
@@ -144,7 +144,7 @@ HRESULT CBFontStorage::RemoveFont(CBFont *Font) { //////////////////////////////////////////////////////////////////////////
HRESULT CBFontStorage::persist(CBPersistMgr *persistMgr) {
- if (!persistMgr->_saving) Cleanup(false);
+ if (!persistMgr->_saving) cleanup(false);
persistMgr->transfer(TMEMBER(Game));
_fonts.persist(persistMgr);
diff --git a/engines/wintermute/Base/BFontStorage.h b/engines/wintermute/Base/BFontStorage.h index 17d0501093..110f4634c8 100644 --- a/engines/wintermute/Base/BFontStorage.h +++ b/engines/wintermute/Base/BFontStorage.h @@ -41,7 +41,7 @@ class CBFont; class CBFontStorage : public CBBase {
public:
DECLARE_PERSISTENT(CBFontStorage, CBBase)
- HRESULT Cleanup(bool Warn = false);
+ HRESULT cleanup(bool Warn = false);
HRESULT RemoveFont(CBFont *Font);
CBFont *AddFont(const char *Filename);
CBFontStorage(CBGame *inGame);
diff --git a/engines/wintermute/Base/BFrame.cpp b/engines/wintermute/Base/BFrame.cpp index 2838c57d89..b774a4bf92 100644 --- a/engines/wintermute/Base/BFrame.cpp +++ b/engines/wintermute/Base/BFrame.cpp @@ -100,7 +100,7 @@ HRESULT CBFrame::OneTimeDisplay(CBObject *Owner, bool Muted) { }
if (Owner) {
for (int i = 0; i < _applyEvent.GetSize(); i++) {
- Owner->ApplyEvent(_applyEvent[i]);
+ Owner->applyEvent(_applyEvent[i]);
}
}
return S_OK;
diff --git a/engines/wintermute/Base/BGame.cpp b/engines/wintermute/Base/BGame.cpp index cfa3002d32..73cdea0971 100644 --- a/engines/wintermute/Base/BGame.cpp +++ b/engines/wintermute/Base/BGame.cpp @@ -288,7 +288,7 @@ CBGame::~CBGame() { _registry->WriteBool("System", "LastRun", true);
- Cleanup();
+ cleanup();
delete[] _localSaveDir;
delete[] _settingsGameFile;
@@ -343,7 +343,7 @@ CBGame::~CBGame() { //////////////////////////////////////////////////////////////////////////
-HRESULT CBGame::Cleanup() {
+HRESULT CBGame::cleanup() {
delete _loadingIcon;
_loadingIcon = NULL;
@@ -813,7 +813,7 @@ HRESULT CBGame::LoadBuffer(byte *Buffer, bool Complete) { break;
case TOKEN_NAME:
- SetName((char *)params);
+ setName((char *)params);
break;
case TOKEN_CAPTION:
@@ -867,7 +867,7 @@ HRESULT CBGame::LoadBuffer(byte *Buffer, bool Complete) { break;
case TOKEN_SCRIPT:
- AddScript((char *)params);
+ addScript((char *)params);
break;
case TOKEN_PERSONAL_SAVEGAMES:
@@ -887,7 +887,7 @@ HRESULT CBGame::LoadBuffer(byte *Buffer, bool Complete) { break;
case TOKEN_PROPERTY:
- ParseProperty(params, false);
+ parseProperty(params, false);
break;
case TOKEN_EDITOR_PROPERTY:
@@ -1014,7 +1014,7 @@ HRESULT CBGame::scCallMethod(CScScript *Script, CScStack *Stack, CScStack *ThisS else if (strcmp(Name, "RunScript") == 0) {
Game->LOG(0, "**Warning** The 'RunScript' method is now obsolete. Use 'AttachScript' instead (same syntax)");
Stack->CorrectParams(1);
- if (FAILED(AddScript(Stack->Pop()->GetString())))
+ if (FAILED(addScript(Stack->Pop()->GetString())))
Stack->PushBool(false);
else
Stack->PushBool(true);
@@ -1847,7 +1847,7 @@ HRESULT CBGame::scCallMethod(CScScript *Script, CScStack *Stack, CScStack *ThisS CUIWindow *Win = new CUIWindow(Game);
_windows.Add(Win);
RegisterObject(Win);
- if (!Val->IsNULL()) Win->SetName(Val->GetString());
+ if (!Val->IsNULL()) Win->setName(Val->GetString());
Stack->PushNative(Win, true);
return S_OK;
}
@@ -2561,7 +2561,7 @@ HRESULT CBGame::scSetProperty(const char *Name, CScValue *Value) { // Name
//////////////////////////////////////////////////////////////////////////
if (strcmp(Name, "Name") == 0) {
- SetName(Value->GetString());
+ setName(Value->GetString());
return S_OK;
}
@@ -3232,7 +3232,7 @@ HRESULT CBGame::SaveGame(int slot, const char *desc, bool quickSave) { LOG(0, "Saving game '%s'...", Filename);
- Game->ApplyEvent("BeforeSave", true);
+ Game->applyEvent("BeforeSave", true);
HRESULT ret;
@@ -3311,14 +3311,14 @@ HRESULT CBGame::LoadGame(const char *Filename) { _dEBUG_AbsolutePathWarning = false;
if (FAILED(ret = pm->initLoad(Filename))) goto load_finish;
- //if(FAILED(ret = Cleanup())) goto load_finish;
+ //if(FAILED(ret = cleanup())) goto load_finish;
if (FAILED(ret = CSysClassRegistry::GetInstance()->LoadTable(Game, pm))) goto load_finish;
if (FAILED(ret = CSysClassRegistry::GetInstance()->LoadInstances(Game, pm))) goto load_finish;
// data initialization after load
InitAfterLoad();
- Game->ApplyEvent("AfterLoad", true);
+ Game->applyEvent("AfterLoad", true);
DisplayContent(true, false);
//_renderer->Flip();
@@ -3618,7 +3618,7 @@ HRESULT CBGame::LoadSettings(const char *Filename) { //////////////////////////////////////////////////////////////////////////
HRESULT CBGame::persist(CBPersistMgr *persistMgr) {
- if (!persistMgr->_saving) Cleanup();
+ if (!persistMgr->_saving) cleanup();
CBObject::persist(persistMgr);
@@ -3798,15 +3798,15 @@ bool CBGame::HandleKeypress(Common::Event *event, bool printable) { if (_focusedWindow) {
if (!Game->_focusedWindow->HandleKeypress(event, _keyboardState->_currentPrintable)) {
/*if (event->type != SDL_TEXTINPUT) {*/
- if (Game->_focusedWindow->CanHandleEvent("Keypress"))
- Game->_focusedWindow->ApplyEvent("Keypress");
+ if (Game->_focusedWindow->canHandleEvent("Keypress"))
+ Game->_focusedWindow->applyEvent("Keypress");
else
- ApplyEvent("Keypress");
+ applyEvent("Keypress");
/*}*/
}
return true;
} else { /*if (event->type != SDL_TEXTINPUT)*/
- ApplyEvent("Keypress");
+ applyEvent("Keypress");
return true;
} //else return true;
@@ -3825,11 +3825,11 @@ bool CBGame::HandleMouseWheel(int Delta) { Handled = Game->_focusedWindow->HandleMouseWheel(Delta);
if (!Handled) {
- if (Delta < 0 && Game->_focusedWindow->CanHandleEvent("MouseWheelDown")) {
- Game->_focusedWindow->ApplyEvent("MouseWheelDown");
+ if (Delta < 0 && Game->_focusedWindow->canHandleEvent("MouseWheelDown")) {
+ Game->_focusedWindow->applyEvent("MouseWheelDown");
Handled = true;
- } else if (Game->_focusedWindow->CanHandleEvent("MouseWheelUp")) {
- Game->_focusedWindow->ApplyEvent("MouseWheelUp");
+ } else if (Game->_focusedWindow->canHandleEvent("MouseWheelUp")) {
+ Game->_focusedWindow->applyEvent("MouseWheelUp");
Handled = true;
}
@@ -3838,9 +3838,9 @@ bool CBGame::HandleMouseWheel(int Delta) { if (!Handled) {
if (Delta < 0) {
- ApplyEvent("MouseWheelDown");
+ applyEvent("MouseWheelDown");
} else {
- ApplyEvent("MouseWheelUp");
+ applyEvent("MouseWheelUp");
}
}
@@ -3966,11 +3966,11 @@ HRESULT CBGame::SetActiveObject(CBObject *Obj) { if (Obj == _activeObject) return S_OK;
- if (_activeObject) _activeObject->ApplyEvent("MouseLeave");
- //if(ValidObject(_activeObject)) _activeObject->ApplyEvent("MouseLeave");
+ if (_activeObject) _activeObject->applyEvent("MouseLeave");
+ //if(ValidObject(_activeObject)) _activeObject->applyEvent("MouseLeave");
_activeObject = Obj;
if (_activeObject) {
- _activeObject->ApplyEvent("MouseEntry");
+ _activeObject->applyEvent("MouseEntry");
}
return S_OK;
@@ -4268,10 +4268,10 @@ HRESULT CBGame::OnActivate(bool Activate, bool RefreshMouse) { HRESULT CBGame::OnMouseLeftDown() {
if (_activeObject) _activeObject->HandleMouse(MOUSE_CLICK, MOUSE_BUTTON_LEFT);
- bool Handled = _state == GAME_RUNNING && SUCCEEDED(ApplyEvent("LeftClick"));
+ bool Handled = _state == GAME_RUNNING && SUCCEEDED(applyEvent("LeftClick"));
if (!Handled) {
if (_activeObject != NULL) {
- _activeObject->ApplyEvent("LeftClick");
+ _activeObject->applyEvent("LeftClick");
}
}
@@ -4290,10 +4290,10 @@ HRESULT CBGame::OnMouseLeftUp() { _capturedObject = NULL;
_mouseLeftDown = false;
- bool Handled = _state == GAME_RUNNING && SUCCEEDED(ApplyEvent("LeftRelease"));
+ bool Handled = _state == GAME_RUNNING && SUCCEEDED(applyEvent("LeftRelease"));
if (!Handled) {
if (_activeObject != NULL) {
- _activeObject->ApplyEvent("LeftRelease");
+ _activeObject->applyEvent("LeftRelease");
}
}
return S_OK;
@@ -4305,10 +4305,10 @@ HRESULT CBGame::OnMouseLeftDblClick() { if (_activeObject) _activeObject->HandleMouse(MOUSE_DBLCLICK, MOUSE_BUTTON_LEFT);
- bool Handled = _state == GAME_RUNNING && SUCCEEDED(ApplyEvent("LeftDoubleClick"));
+ bool Handled = _state == GAME_RUNNING && SUCCEEDED(applyEvent("LeftDoubleClick"));
if (!Handled) {
if (_activeObject != NULL) {
- _activeObject->ApplyEvent("LeftDoubleClick");
+ _activeObject->applyEvent("LeftDoubleClick");
}
}
return S_OK;
@@ -4320,10 +4320,10 @@ HRESULT CBGame::OnMouseRightDblClick() { if (_activeObject) _activeObject->HandleMouse(MOUSE_DBLCLICK, MOUSE_BUTTON_RIGHT);
- bool Handled = _state == GAME_RUNNING && SUCCEEDED(ApplyEvent("RightDoubleClick"));
+ bool Handled = _state == GAME_RUNNING && SUCCEEDED(applyEvent("RightDoubleClick"));
if (!Handled) {
if (_activeObject != NULL) {
- _activeObject->ApplyEvent("RightDoubleClick");
+ _activeObject->applyEvent("RightDoubleClick");
}
}
return S_OK;
@@ -4333,10 +4333,10 @@ HRESULT CBGame::OnMouseRightDblClick() { HRESULT CBGame::OnMouseRightDown() {
if (_activeObject) _activeObject->HandleMouse(MOUSE_CLICK, MOUSE_BUTTON_RIGHT);
- bool Handled = _state == GAME_RUNNING && SUCCEEDED(ApplyEvent("RightClick"));
+ bool Handled = _state == GAME_RUNNING && SUCCEEDED(applyEvent("RightClick"));
if (!Handled) {
if (_activeObject != NULL) {
- _activeObject->ApplyEvent("RightClick");
+ _activeObject->applyEvent("RightClick");
}
}
return S_OK;
@@ -4346,10 +4346,10 @@ HRESULT CBGame::OnMouseRightDown() { HRESULT CBGame::OnMouseRightUp() {
if (_activeObject) _activeObject->HandleMouse(MOUSE_RELEASE, MOUSE_BUTTON_RIGHT);
- bool Handled = _state == GAME_RUNNING && SUCCEEDED(ApplyEvent("RightRelease"));
+ bool Handled = _state == GAME_RUNNING && SUCCEEDED(applyEvent("RightRelease"));
if (!Handled) {
if (_activeObject != NULL) {
- _activeObject->ApplyEvent("RightRelease");
+ _activeObject->applyEvent("RightRelease");
}
}
return S_OK;
@@ -4361,10 +4361,10 @@ HRESULT CBGame::OnMouseMiddleDown() { if (_activeObject) _activeObject->HandleMouse(MOUSE_CLICK, MOUSE_BUTTON_MIDDLE);
- bool Handled = _state == GAME_RUNNING && SUCCEEDED(ApplyEvent("MiddleClick"));
+ bool Handled = _state == GAME_RUNNING && SUCCEEDED(applyEvent("MiddleClick"));
if (!Handled) {
if (_activeObject != NULL) {
- _activeObject->ApplyEvent("MiddleClick");
+ _activeObject->applyEvent("MiddleClick");
}
}
return S_OK;
@@ -4374,10 +4374,10 @@ HRESULT CBGame::OnMouseMiddleDown() { HRESULT CBGame::OnMouseMiddleUp() {
if (_activeObject) _activeObject->HandleMouse(MOUSE_RELEASE, MOUSE_BUTTON_MIDDLE);
- bool Handled = _state == GAME_RUNNING && SUCCEEDED(ApplyEvent("MiddleRelease"));
+ bool Handled = _state == GAME_RUNNING && SUCCEEDED(applyEvent("MiddleRelease"));
if (!Handled) {
if (_activeObject != NULL) {
- _activeObject->ApplyEvent("MiddleRelease");
+ _activeObject->applyEvent("MiddleRelease");
}
}
return S_OK;
@@ -4396,8 +4396,8 @@ HRESULT CBGame::OnPaint() { //////////////////////////////////////////////////////////////////////////
HRESULT CBGame::OnWindowClose() {
- if (CanHandleEvent("QuitGame")) {
- if (_state != GAME_FROZEN) Game->ApplyEvent("QuitGame");
+ if (canHandleEvent("QuitGame")) {
+ if (_state != GAME_FROZEN) Game->applyEvent("QuitGame");
return S_OK;
} else return E_FAIL;
}
diff --git a/engines/wintermute/Base/BGame.h b/engines/wintermute/Base/BGame.h index ecbad813c6..8aa1cce127 100644 --- a/engines/wintermute/Base/BGame.h +++ b/engines/wintermute/Base/BGame.h @@ -291,7 +291,7 @@ public: HRESULT DisplayWindows(bool InGame = false);
CBRegistry *_registry;
bool _useD3D;
- virtual HRESULT Cleanup();
+ virtual HRESULT cleanup();
virtual HRESULT LoadGame(int Slot);
virtual HRESULT LoadGame(const char *Filename);
virtual HRESULT SaveGame(int slot, const char *desc, bool quickSave = false);
diff --git a/engines/wintermute/Base/BKeyboardState.cpp b/engines/wintermute/Base/BKeyboardState.cpp index 953270c03b..09d24453fa 100644 --- a/engines/wintermute/Base/BKeyboardState.cpp +++ b/engines/wintermute/Base/BKeyboardState.cpp @@ -179,7 +179,7 @@ HRESULT CBKeyboardState::scSetProperty(const char *Name, CScValue *Value) { // Name
//////////////////////////////////////////////////////////////////////////
if (strcmp(Name, "Name") == 0) {
- SetName(Value->GetString());
+ setName(Value->GetString());
if (_renderer) SetWindowText(_renderer->_window, _name);
return S_OK;
}
@@ -216,7 +216,7 @@ HRESULT CBKeyboardState::ReadKey(Common::Event *event) { //////////////////////////////////////////////////////////////////////////
HRESULT CBKeyboardState::persist(CBPersistMgr *persistMgr) {
- //if(!persistMgr->_saving) Cleanup();
+ //if(!persistMgr->_saving) cleanup();
CBScriptable::persist(persistMgr);
persistMgr->transfer(TMEMBER(_currentAlt));
diff --git a/engines/wintermute/Base/BNamedObject.cpp b/engines/wintermute/Base/BNamedObject.cpp index 3c4652b731..855bdb2738 100644 --- a/engines/wintermute/Base/BNamedObject.cpp +++ b/engines/wintermute/Base/BNamedObject.cpp @@ -55,11 +55,11 @@ CBNamedObject::~CBNamedObject(void) { //////////////////////////////////////////////////////////////////////
-void CBNamedObject::SetName(const char *Name) {
+void CBNamedObject::setName(const char *name) {
delete[] _name;
- _name = new char [strlen(Name) + 1];
- if (_name != NULL) strcpy(_name, Name);
+ _name = new char [strlen(name) + 1];
+ if (_name != NULL) strcpy(_name, name);
}
} // end of namespace WinterMute
diff --git a/engines/wintermute/Base/BNamedObject.h b/engines/wintermute/Base/BNamedObject.h index ef1a3a444c..e2649acbf5 100644 --- a/engines/wintermute/Base/BNamedObject.h +++ b/engines/wintermute/Base/BNamedObject.h @@ -42,7 +42,7 @@ public: CBNamedObject(TDynamicConstructor, TDynamicConstructor);
char *_name;
- void SetName(const char *Name);
+ void setName(const char *name);
};
} // end of namespace WinterMute
diff --git a/engines/wintermute/Base/BObject.cpp b/engines/wintermute/Base/BObject.cpp index 7eee851e65..107ab2537c 100644 --- a/engines/wintermute/Base/BObject.cpp +++ b/engines/wintermute/Base/BObject.cpp @@ -101,15 +101,15 @@ CBObject::CBObject(CBGame *inGame): CBScriptHolder(inGame) { //////////////////////////////////////////////////////////////////////
CBObject::~CBObject() {
- Cleanup();
+ cleanup();
}
//////////////////////////////////////////////////////////////////////////
-HRESULT CBObject::Cleanup() {
+HRESULT CBObject::cleanup() {
if (Game && Game->_activeObject == this) Game->_activeObject = NULL;
- CBScriptHolder::Cleanup();
+ CBScriptHolder::cleanup();
delete[] _soundEvent;
_soundEvent = NULL;
@@ -157,7 +157,7 @@ char *CBObject::GetCaption(int Case) { //////////////////////////////////////////////////////////////////////////
-HRESULT CBObject::Listen(CBScriptHolder *param1, uint32 param2) {
+HRESULT CBObject::listen(CBScriptHolder *param1, uint32 param2) {
return E_FAIL;
}
@@ -1060,7 +1060,7 @@ HRESULT CBObject::SetSFXVolume(int Volume) { HRESULT CBObject::UpdateSounds() {
if (_soundEvent) {
if (_sFX && !_sFX->IsPlaying()) {
- ApplyEvent(_soundEvent);
+ applyEvent(_soundEvent);
SetSoundEvent(NULL);
}
}
diff --git a/engines/wintermute/Base/BObject.h b/engines/wintermute/Base/BObject.h index 4658770aad..294b345dec 100644 --- a/engines/wintermute/Base/BObject.h +++ b/engines/wintermute/Base/BObject.h @@ -85,7 +85,7 @@ public: virtual int GetHeight();
HRESULT SetCursor(const char *Filename);
HRESULT SetActiveCursor(const char *Filename);
- HRESULT Cleanup();
+ HRESULT cleanup();
char *GetCaption(int Case = 1);
void SetCaption(const char *Caption, int Case = 1);
bool _editorSelected;
@@ -98,7 +98,7 @@ public: bool _sharedCursors;
CBSprite *_activeCursor;
virtual HRESULT saveAsText(CBDynBuffer *Buffer, int Indent);
- virtual HRESULT Listen(CBScriptHolder *param1, uint32 param2);
+ virtual HRESULT listen(CBScriptHolder *param1, uint32 param2);
bool _ready;
bool _registrable;
bool _zoomable;
diff --git a/engines/wintermute/Base/BRegion.cpp b/engines/wintermute/Base/BRegion.cpp index 5a9ddcbbf0..9307af62bb 100644 --- a/engines/wintermute/Base/BRegion.cpp +++ b/engines/wintermute/Base/BRegion.cpp @@ -55,12 +55,12 @@ CBRegion::CBRegion(CBGame *inGame): CBObject(inGame) { //////////////////////////////////////////////////////////////////////////
CBRegion::~CBRegion() {
- Cleanup();
+ cleanup();
}
//////////////////////////////////////////////////////////////////////////
-void CBRegion::Cleanup() {
+void CBRegion::cleanup() {
for (int i = 0; i < _points.GetSize(); i++) delete _points[i];
_points.RemoveAll();
@@ -165,7 +165,7 @@ HRESULT CBRegion::LoadBuffer(byte *Buffer, bool Complete) { break;
case TOKEN_NAME:
- SetName((char *)params);
+ setName((char *)params);
break;
case TOKEN_CAPTION:
@@ -184,7 +184,7 @@ HRESULT CBRegion::LoadBuffer(byte *Buffer, bool Complete) { break;
case TOKEN_SCRIPT:
- AddScript((char *)params);
+ addScript((char *)params);
break;
case TOKEN_EDITOR_SELECTED_POINT:
@@ -192,7 +192,7 @@ HRESULT CBRegion::LoadBuffer(byte *Buffer, bool Complete) { break;
case TOKEN_PROPERTY:
- ParseProperty(params, false);
+ parseProperty(params, false);
break;
}
}
@@ -355,7 +355,7 @@ HRESULT CBRegion::scSetProperty(const char *Name, CScValue *Value) { // Name
//////////////////////////////////////////////////////////////////////////
if (strcmp(Name, "Name") == 0) {
- SetName(Value->GetString());
+ setName(Value->GetString());
return S_OK;
}
@@ -488,7 +488,7 @@ HRESULT CBRegion::GetBoundingRect(RECT *Rect) { HRESULT CBRegion::Mimic(CBRegion *Region, float Scale, int X, int Y) {
if (Scale == _lastMimicScale && X == _lastMimicX && Y == _lastMimicY) return S_OK;
- Cleanup();
+ cleanup();
for (int i = 0; i < Region->_points.GetSize(); i++) {
int x, y;
diff --git a/engines/wintermute/Base/BRegion.h b/engines/wintermute/Base/BRegion.h index aa49503967..f52f646f2c 100644 --- a/engines/wintermute/Base/BRegion.h +++ b/engines/wintermute/Base/BRegion.h @@ -39,7 +39,7 @@ public: float _lastMimicScale;
int _lastMimicX;
int _lastMimicY;
- void Cleanup();
+ void cleanup();
HRESULT Mimic(CBRegion *Region, float Scale = 100.0f, int X = 0, int Y = 0);
HRESULT GetBoundingRect(RECT *Rect);
bool PtInPolygon(int X, int Y);
diff --git a/engines/wintermute/Base/BScriptHolder.cpp b/engines/wintermute/Base/BScriptHolder.cpp index d47f2915c6..aaf73b2bc2 100644 --- a/engines/wintermute/Base/BScriptHolder.cpp +++ b/engines/wintermute/Base/BScriptHolder.cpp @@ -41,7 +41,7 @@ IMPLEMENT_PERSISTENT(CBScriptHolder, false) //////////////////////////////////////////////////////////////////////
CBScriptHolder::CBScriptHolder(CBGame *inGame): CBScriptable(inGame) {
- SetName("<unnamed>");
+ setName("<unnamed>");
_freezable = true;
_filename = NULL;
@@ -50,12 +50,12 @@ CBScriptHolder::CBScriptHolder(CBGame *inGame): CBScriptable(inGame) { //////////////////////////////////////////////////////////////////////
CBScriptHolder::~CBScriptHolder() {
- Cleanup();
+ cleanup();
}
//////////////////////////////////////////////////////////////////////////
-HRESULT CBScriptHolder::Cleanup() {
+HRESULT CBScriptHolder::cleanup() {
delete[] _filename;
_filename = NULL;
@@ -71,7 +71,7 @@ HRESULT CBScriptHolder::Cleanup() { }
//////////////////////////////////////////////////////////////////////
-void CBScriptHolder::SetFilename(const char *Filename) {
+void CBScriptHolder::setFilename(const char *Filename) {
if (_filename != NULL) delete [] _filename;
_filename = new char [strlen(Filename) + 1];
@@ -80,7 +80,7 @@ void CBScriptHolder::SetFilename(const char *Filename) { //////////////////////////////////////////////////////////////////////////
-HRESULT CBScriptHolder::ApplyEvent(const char *EventName, bool Unbreakable) {
+HRESULT CBScriptHolder::applyEvent(const char *EventName, bool Unbreakable) {
int NumHandlers = 0;
HRESULT ret = E_FAIL;
@@ -101,7 +101,7 @@ HRESULT CBScriptHolder::ApplyEvent(const char *EventName, bool Unbreakable) { //////////////////////////////////////////////////////////////////////////
-HRESULT CBScriptHolder::Listen(CBScriptHolder *param1, uint32 param2) {
+HRESULT CBScriptHolder::listen(CBScriptHolder *param1, uint32 param2) {
return E_FAIL;
}
@@ -129,7 +129,7 @@ HRESULT CBScriptHolder::scCallMethod(CScScript *Script, CScStack *Stack, CScStac Stack->CorrectParams(1);
CScValue *val = Stack->Pop();
HRESULT ret;
- ret = ApplyEvent(val->GetString());
+ ret = applyEvent(val->GetString());
if (SUCCEEDED(ret)) Stack->PushBool(true);
else Stack->PushBool(false);
@@ -142,7 +142,7 @@ HRESULT CBScriptHolder::scCallMethod(CScScript *Script, CScStack *Stack, CScStac //////////////////////////////////////////////////////////////////////////
else if (strcmp(Name, "CanHandleEvent") == 0) {
Stack->CorrectParams(1);
- Stack->PushBool(CanHandleEvent(Stack->Pop()->GetString()));
+ Stack->PushBool(canHandleEvent(Stack->Pop()->GetString()));
return S_OK;
}
@@ -162,7 +162,7 @@ HRESULT CBScriptHolder::scCallMethod(CScScript *Script, CScStack *Stack, CScStac //////////////////////////////////////////////////////////////////////////
else if (strcmp(Name, "AttachScript") == 0) {
Stack->CorrectParams(1);
- Stack->PushBool(SUCCEEDED(AddScript(Stack->Pop()->GetString())));
+ Stack->PushBool(SUCCEEDED(addScript(Stack->Pop()->GetString())));
return S_OK;
}
@@ -245,7 +245,7 @@ HRESULT CBScriptHolder::scSetProperty(const char *Name, CScValue *Value) { // Name
//////////////////////////////////////////////////////////////////////////
if (strcmp(Name, "Name") == 0) {
- SetName(Value->GetString());
+ setName(Value->GetString());
return S_OK;
} else return CBScriptable::scSetProperty(Name, Value);
}
@@ -276,7 +276,7 @@ HRESULT CBScriptHolder::persist(CBPersistMgr *persistMgr) { //////////////////////////////////////////////////////////////////////////
-HRESULT CBScriptHolder::AddScript(const char *Filename) {
+HRESULT CBScriptHolder::addScript(const char *Filename) {
for (int i = 0; i < _scripts.GetSize(); i++) {
if (scumm_stricmp(_scripts[i]->_filename, Filename) == 0) {
if (_scripts[i]->_state != SCRIPT_FINISHED) {
@@ -311,7 +311,7 @@ HRESULT CBScriptHolder::AddScript(const char *Filename) { //////////////////////////////////////////////////////////////////////////
-HRESULT CBScriptHolder::RemoveScript(CScScript *Script) {
+HRESULT CBScriptHolder::removeScript(CScScript *Script) {
for (int i = 0; i < _scripts.GetSize(); i++) {
if (_scripts[i] == Script) {
_scripts.RemoveAt(i);
@@ -322,9 +322,9 @@ HRESULT CBScriptHolder::RemoveScript(CScScript *Script) { }
//////////////////////////////////////////////////////////////////////////
-bool CBScriptHolder::CanHandleEvent(const char *EventName) {
+bool CBScriptHolder::canHandleEvent(const char *EventName) {
for (int i = 0; i < _scripts.GetSize(); i++) {
- if (!_scripts[i]->_thread && _scripts[i]->CanHandleEvent(EventName)) return true;
+ if (!_scripts[i]->_thread && _scripts[i]->canHandleEvent(EventName)) return true;
}
return false;
}
@@ -345,7 +345,7 @@ TOKEN_DEF(NAME) TOKEN_DEF(VALUE)
TOKEN_DEF_END
//////////////////////////////////////////////////////////////////////////
-HRESULT CBScriptHolder::ParseProperty(byte *Buffer, bool Complete) {
+HRESULT CBScriptHolder::parseProperty(byte *Buffer, bool Complete) {
TOKEN_TABLE_START(commands)
TOKEN_TABLE(PROPERTY)
TOKEN_TABLE(NAME)
@@ -418,7 +418,7 @@ HRESULT CBScriptHolder::ParseProperty(byte *Buffer, bool Complete) { //////////////////////////////////////////////////////////////////////////
-void CBScriptHolder::MakeFreezable(bool Freezable) {
+void CBScriptHolder::makeFreezable(bool Freezable) {
_freezable = Freezable;
for (int i = 0; i < _scripts.GetSize(); i++)
_scripts[i]->_freezable = Freezable;
@@ -466,8 +466,8 @@ void CBScriptHolder::scDebuggerDesc(char *Buf, int BufSize) { //////////////////////////////////////////////////////////////////////////
// IWmeObject
//////////////////////////////////////////////////////////////////////////
-bool CBScriptHolder::SendEvent(const char *EventName) {
- return SUCCEEDED(ApplyEvent(EventName));
+bool CBScriptHolder::sendEvent(const char *EventName) {
+ return SUCCEEDED(applyEvent(EventName));
}
} // end of namespace WinterMute
diff --git a/engines/wintermute/Base/BScriptHolder.h b/engines/wintermute/Base/BScriptHolder.h index 6e406699d5..688e13c7e3 100644 --- a/engines/wintermute/Base/BScriptHolder.h +++ b/engines/wintermute/Base/BScriptHolder.h @@ -41,32 +41,32 @@ public: CBScriptHolder(CBGame *inGame);
virtual ~CBScriptHolder();
- virtual CScScript *invokeMethodThread(const char *MethodName);
- virtual void MakeFreezable(bool Freezable);
- bool CanHandleEvent(const char *EventName);
- virtual bool canHandleMethod(const char *EventMethod);
- HRESULT Cleanup();
- HRESULT RemoveScript(CScScript *Script);
- HRESULT AddScript(const char *Filename);
- virtual HRESULT saveAsText(CBDynBuffer *Buffer, int Indent);
- virtual HRESULT Listen(CBScriptHolder *param1, uint32 param2);
- HRESULT ApplyEvent(const char *EventName, bool Unbreakable = false);
- void SetFilename(const char *Filename);
- HRESULT ParseProperty(byte *Buffer, bool Complete = true);
+ virtual CScScript *invokeMethodThread(const char *methodName);
+ virtual void makeFreezable(bool freezable);
+ bool canHandleEvent(const char *eventName);
+ virtual bool canHandleMethod(const char *eventMethod);
+ HRESULT cleanup();
+ HRESULT removeScript(CScScript *script);
+ HRESULT addScript(const char *filename);
+ virtual HRESULT saveAsText(CBDynBuffer *buffer, int indent);
+ virtual HRESULT listen(CBScriptHolder *param1, uint32 param2);
+ HRESULT applyEvent(const char *eventName, bool unbreakable = false);
+ void setFilename(const char *filename);
+ HRESULT parseProperty(byte *buffer, bool complete = true);
char *_filename;
bool _freezable;
bool _ready;
CBArray<CScScript *, CScScript *> _scripts;
// scripting interface
- virtual CScValue *scGetProperty(const char *Name);
- virtual HRESULT scSetProperty(const char *Name, CScValue *Value);
- virtual HRESULT scCallMethod(CScScript *Script, CScStack *Stack, CScStack *ThisStack, const char *Name);
+ virtual CScValue *scGetProperty(const char *name);
+ virtual HRESULT scSetProperty(const char *name, CScValue *value);
+ virtual HRESULT scCallMethod(CScScript *script, CScStack *stack, CScStack *thisStack, const char *name);
virtual const char *scToString();
- virtual void scDebuggerDesc(char *Buf, int BufSize);
+ virtual void scDebuggerDesc(char *buf, int bufSize);
// IWmeObject
public:
- virtual bool SendEvent(const char *EventName);
+ virtual bool sendEvent(const char *eventName);
};
} // end of namespace WinterMute
diff --git a/engines/wintermute/Base/BSprite.cpp b/engines/wintermute/Base/BSprite.cpp index 670bf77560..8e851d5605 100644 --- a/engines/wintermute/Base/BSprite.cpp +++ b/engines/wintermute/Base/BSprite.cpp @@ -57,7 +57,7 @@ CBSprite::CBSprite(CBGame *inGame, CBObject *Owner): CBScriptHolder(inGame) { //////////////////////////////////////////////////////////////////////
CBSprite::~CBSprite() {
- Cleanup();
+ cleanup();
}
@@ -80,15 +80,15 @@ void CBSprite::SetDefaults() { _streamed = false;
_streamedKeepLoaded = false;
- SetName("");
+ setName("");
_precise = true;
}
//////////////////////////////////////////////////////////////////////////
-void CBSprite::Cleanup() {
- CBScriptHolder::Cleanup();
+void CBSprite::cleanup() {
+ CBScriptHolder::cleanup();
for (int i = 0; i < _frames.GetSize(); i++)
delete _frames[i];
@@ -210,7 +210,7 @@ HRESULT CBSprite::LoadBuffer(byte *Buffer, bool Complete, int LifeTime, TSprite int cmd;
CBParser parser(Game);
- Cleanup();
+ cleanup();
if (Complete) {
@@ -234,7 +234,7 @@ HRESULT CBSprite::LoadBuffer(byte *Buffer, bool Complete, int LifeTime, TSprite break;
case TOKEN_SCRIPT:
- AddScript((char *)params);
+ addScript((char *)params);
break;
case TOKEN_LOOPING:
@@ -258,7 +258,7 @@ HRESULT CBSprite::LoadBuffer(byte *Buffer, bool Complete, int LifeTime, TSprite break;
case TOKEN_NAME:
- SetName((char *)params);
+ setName((char *)params);
break;
case TOKEN_EDITOR_BG_FILE:
@@ -391,7 +391,7 @@ HRESULT CBSprite::Display(int X, int Y, CBObject *Register, float ZoomX, float Z if (_frames[_currentFrame]->_killSound) {
KillAllSounds();
}
- ApplyEvent("FrameChanged");
+ applyEvent("FrameChanged");
_frames[_currentFrame]->OneTimeDisplay(_owner, Game->_editorMode && _editorMuted);
}
diff --git a/engines/wintermute/Base/BSprite.h b/engines/wintermute/Base/BSprite.h index 6969253285..a5dde324e5 100644 --- a/engines/wintermute/Base/BSprite.h +++ b/engines/wintermute/Base/BSprite.h @@ -47,7 +47,7 @@ public: int _editorBgAlpha;
bool _streamed;
bool _streamedKeepLoaded;
- void Cleanup();
+ void cleanup();
void SetDefaults();
bool _precise;
DECLARE_PERSISTENT(CBSprite, CBScriptHolder)
diff --git a/engines/wintermute/Base/BSurfaceStorage.cpp b/engines/wintermute/Base/BSurfaceStorage.cpp index 797c5f3d49..337ad50bba 100644 --- a/engines/wintermute/Base/BSurfaceStorage.cpp +++ b/engines/wintermute/Base/BSurfaceStorage.cpp @@ -46,12 +46,12 @@ CBSurfaceStorage::CBSurfaceStorage(CBGame *inGame): CBBase(inGame) { //////////////////////////////////////////////////////////////////////
CBSurfaceStorage::~CBSurfaceStorage() {
- Cleanup(true);
+ cleanup(true);
}
//////////////////////////////////////////////////////////////////////////
-HRESULT CBSurfaceStorage::Cleanup(bool Warn) {
+HRESULT CBSurfaceStorage::cleanup(bool Warn) {
for (int i = 0; i < _surfaces.GetSize(); i++) {
if (Warn) Game->LOG(0, "CBSurfaceStorage warning: purging surface '%s', usage:%d", _surfaces[i]->_filename, _surfaces[i]->_referenceCount);
delete _surfaces[i];
@@ -151,7 +151,7 @@ HRESULT CBSurfaceStorage::RestoreAll() { HRESULT CBSurfaceStorage::persist(CBPersistMgr *persistMgr)
{
- if(!persistMgr->_saving) Cleanup(false);
+ if(!persistMgr->_saving) cleanup(false);
persistMgr->transfer(TMEMBER(Game));
diff --git a/engines/wintermute/Base/BSurfaceStorage.h b/engines/wintermute/Base/BSurfaceStorage.h index 5491252557..62c9796bfc 100644 --- a/engines/wintermute/Base/BSurfaceStorage.h +++ b/engines/wintermute/Base/BSurfaceStorage.h @@ -41,7 +41,7 @@ public: HRESULT InitLoop();
HRESULT SortSurfaces();
static int SurfaceSortCB(const void *arg1, const void *arg2);
- HRESULT Cleanup(bool Warn = false);
+ HRESULT cleanup(bool Warn = false);
//DECLARE_PERSISTENT(CBSurfaceStorage, CBBase);
HRESULT RestoreAll();
diff --git a/engines/wintermute/Base/PartEmitter.cpp b/engines/wintermute/Base/PartEmitter.cpp index 2ff9a56679..bfce64041e 100644 --- a/engines/wintermute/Base/PartEmitter.cpp +++ b/engines/wintermute/Base/PartEmitter.cpp @@ -280,7 +280,7 @@ HRESULT CPartEmitter::UpdateInternal(uint32 CurrentTime, uint32 TimerDelta) { // we actually generated some particles and we're not in fast-forward mode
if (NeedsSort && _overheadTime == 0) {
- if (_owner && _emitEvent) _owner->ApplyEvent(_emitEvent);
+ if (_owner && _emitEvent) _owner->applyEvent(_emitEvent);
}
}
@@ -376,7 +376,7 @@ CPartForce *CPartEmitter::AddForceByName(const char *Name) { if (!Force) {
Force = new CPartForce(Game);
if (Force) {
- Force->SetName(Name);
+ Force->setName(Name);
_forces.Add(Force);
}
}
diff --git a/engines/wintermute/Base/scriptables/SXDate.cpp b/engines/wintermute/Base/scriptables/SXDate.cpp index 669b072d2f..4bb2a3b32a 100644 --- a/engines/wintermute/Base/scriptables/SXDate.cpp +++ b/engines/wintermute/Base/scriptables/SXDate.cpp @@ -229,7 +229,7 @@ HRESULT CSXDate::scSetProperty(const char *Name, CScValue *Value) { // Name
//////////////////////////////////////////////////////////////////////////
if(strcmp(Name, "Name")==0){
- SetName(Value->GetString());
+ setName(Value->GetString());
return S_OK;
}
diff --git a/engines/wintermute/Base/scriptables/SXFile.cpp b/engines/wintermute/Base/scriptables/SXFile.cpp index 2be008edaf..bffd1d462a 100644 --- a/engines/wintermute/Base/scriptables/SXFile.cpp +++ b/engines/wintermute/Base/scriptables/SXFile.cpp @@ -72,11 +72,11 @@ CSXFile::CSXFile(CBGame *inGame, CScStack *Stack): CBScriptable(inGame) { //////////////////////////////////////////////////////////////////////////
CSXFile::~CSXFile() {
- Cleanup();
+ cleanup();
}
//////////////////////////////////////////////////////////////////////////
-void CSXFile::Cleanup() {
+void CSXFile::cleanup() {
delete[] _filename;
_filename = NULL;
Close();
@@ -112,7 +112,7 @@ HRESULT CSXFile::scCallMethod(CScScript *Script, CScStack *Stack, CScStack *This if (strcmp(Name, "SetFilename") == 0) {
Stack->CorrectParams(1);
const char *Filename = Stack->Pop()->GetString();
- Cleanup();
+ cleanup();
CBUtils::SetString(&_filename, Filename);
Stack->PushNULL();
return S_OK;
diff --git a/engines/wintermute/Base/scriptables/SXFile.h b/engines/wintermute/Base/scriptables/SXFile.h index d36f8ec3ae..d3076620c2 100644 --- a/engines/wintermute/Base/scriptables/SXFile.h +++ b/engines/wintermute/Base/scriptables/SXFile.h @@ -52,7 +52,7 @@ private: int _mode; // 0..none, 1..read, 2..write, 3..append
bool _textMode;
void Close();
- void Cleanup();
+ void cleanup();
uint32 GetPos();
uint32 GetLength();
bool SetPos(uint32 Pos, TSeek Origin = SEEK_TO_BEGIN);
diff --git a/engines/wintermute/Base/scriptables/SXMemBuffer.cpp b/engines/wintermute/Base/scriptables/SXMemBuffer.cpp index de635e1c72..7a128d5899 100644 --- a/engines/wintermute/Base/scriptables/SXMemBuffer.cpp +++ b/engines/wintermute/Base/scriptables/SXMemBuffer.cpp @@ -60,7 +60,7 @@ CSXMemBuffer::CSXMemBuffer(CBGame *inGame, void *Buffer): CBScriptable(inGame) { //////////////////////////////////////////////////////////////////////////
CSXMemBuffer::~CSXMemBuffer() {
- Cleanup();
+ cleanup();
}
//////////////////////////////////////////////////////////////////////////
@@ -69,7 +69,7 @@ void *CSXMemBuffer::scToMemBuffer() { }
//////////////////////////////////////////////////////////////////////////
-void CSXMemBuffer::Cleanup() {
+void CSXMemBuffer::cleanup() {
if (_size) free(_buffer);
_buffer = NULL;
_size = 0;
diff --git a/engines/wintermute/Base/scriptables/SXMemBuffer.h b/engines/wintermute/Base/scriptables/SXMemBuffer.h index d080b1f136..a14f09bfd6 100644 --- a/engines/wintermute/Base/scriptables/SXMemBuffer.h +++ b/engines/wintermute/Base/scriptables/SXMemBuffer.h @@ -50,7 +50,7 @@ public: private:
HRESULT Resize(int NewSize);
void *_buffer;
- void Cleanup();
+ void cleanup();
bool CheckBounds(CScScript *Script, int Start, int Length);
};
diff --git a/engines/wintermute/Base/scriptables/SXStore.cpp b/engines/wintermute/Base/scriptables/SXStore.cpp index 322ef8930d..b910f27f62 100644 --- a/engines/wintermute/Base/scriptables/SXStore.cpp +++ b/engines/wintermute/Base/scriptables/SXStore.cpp @@ -61,11 +61,11 @@ CSXStore::CSXStore(CBGame *inGame) : CBObject(inGame) { //////////////////////////////////////////////////////////////////////////
CSXStore::~CSXStore() {
- Cleanup();
+ cleanup();
}
//////////////////////////////////////////////////////////////////////////
-void CSXStore::Cleanup() {
+void CSXStore::cleanup() {
SetEventsEnabled(NULL, false);
for (int i = 0; i < _validProducts.GetSize(); i++) {
@@ -279,7 +279,7 @@ CScValue *CSXStore::scGetProperty(const char *name) { //////////////////////////////////////////////////////////////////////////
HRESULT CSXStore::persist(CBPersistMgr *persistMgr) {
- if (!persistMgr->_saving) Cleanup();
+ if (!persistMgr->_saving) cleanup();
CBObject::persist(persistMgr);
@@ -371,7 +371,7 @@ void CSXStore::ReceiveProductsStart() { //////////////////////////////////////////////////////////////////////////
void CSXStore::ReceiveProductsEnd() {
- if (_lastProductRequestOwner) _lastProductRequestOwner->ApplyEvent("ProductsValidated");
+ if (_lastProductRequestOwner) _lastProductRequestOwner->applyEvent("ProductsValidated");
}
//////////////////////////////////////////////////////////////////////////
@@ -395,8 +395,8 @@ void CSXStore::ReceiveTransactionsStart() { //////////////////////////////////////////////////////////////////////////
void CSXStore::ReceiveTransactionsEnd() {
- if (_lastPurchaseOwner) _lastPurchaseOwner->ApplyEvent("TransactionsUpdated");
- else Game->ApplyEvent("TransactionsUpdated");
+ if (_lastPurchaseOwner) _lastPurchaseOwner->applyEvent("TransactionsUpdated");
+ else Game->applyEvent("TransactionsUpdated");
}
//////////////////////////////////////////////////////////////////////////
@@ -452,8 +452,8 @@ void CSXStore::RestoreTransactions(CScScript *script) { //////////////////////////////////////////////////////////////////////////
void CSXStore::OnRestoreFinished(bool error) {
if (_lastRestoreOwner) {
- if (error) _lastRestoreOwner->ApplyEvent("TransactionsRestoreFailed");
- else _lastRestoreOwner->ApplyEvent("TransactionsRestoreFinished");
+ if (error) _lastRestoreOwner->applyEvent("TransactionsRestoreFailed");
+ else _lastRestoreOwner->applyEvent("TransactionsRestoreFinished");
}
}
diff --git a/engines/wintermute/Base/scriptables/SXStore.h b/engines/wintermute/Base/scriptables/SXStore.h index fd5f36a882..5889678122 100644 --- a/engines/wintermute/Base/scriptables/SXStore.h +++ b/engines/wintermute/Base/scriptables/SXStore.h @@ -154,7 +154,7 @@ public: void OnRestoreFinished(bool error);
private:
- void Cleanup();
+ void cleanup();
bool Purchase(CScScript *script, const char *productId);
bool FinishTransaction(CScScript *script, const char *transId);
void RestoreTransactions(CScScript *script);
diff --git a/engines/wintermute/Base/scriptables/ScEngine.cpp b/engines/wintermute/Base/scriptables/ScEngine.cpp index c3c376790f..0066a2574f 100644 --- a/engines/wintermute/Base/scriptables/ScEngine.cpp +++ b/engines/wintermute/Base/scriptables/ScEngine.cpp @@ -147,7 +147,7 @@ CScEngine::~CScEngine() { #ifdef __WIN32__
if (_compilerAvailable && _compilerDLL) ::FreeLibrary(_compilerDLL);
#endif
- Cleanup();
+ cleanup();
for (int i = 0; i < _breakpoints.GetSize(); i++) {
delete _breakpoints[i];
@@ -158,9 +158,9 @@ CScEngine::~CScEngine() { //////////////////////////////////////////////////////////////////////////
-HRESULT CScEngine::Cleanup() {
+HRESULT CScEngine::cleanup() {
for (int i = 0; i < _scripts.GetSize(); i++) {
- if (!_scripts[i]->_thread && _scripts[i]->_owner) _scripts[i]->_owner->RemoveScript(_scripts[i]);
+ if (!_scripts[i]->_thread && _scripts[i]->_owner) _scripts[i]->_owner->removeScript(_scripts[i]);
delete _scripts[i];
_scripts.RemoveAt(i);
i--;
@@ -489,7 +489,7 @@ HRESULT CScEngine::RemoveFinishedScripts() { // remove finished scripts
for (int i = 0; i < _scripts.GetSize(); i++) {
if (_scripts[i]->_state == SCRIPT_FINISHED || _scripts[i]->_state == SCRIPT_ERROR) {
- if (!_scripts[i]->_thread && _scripts[i]->_owner) _scripts[i]->_owner->RemoveScript(_scripts[i]);
+ if (!_scripts[i]->_thread && _scripts[i]->_owner) _scripts[i]->_owner->removeScript(_scripts[i]);
Game->GetDebugMgr()->OnScriptShutdown(_scripts[i]);
delete _scripts[i];
_scripts.RemoveAt(i);
@@ -571,7 +571,7 @@ HRESULT CScEngine::ResetScript(CScScript *Script) { //////////////////////////////////////////////////////////////////////////
HRESULT CScEngine::persist(CBPersistMgr *persistMgr) {
- if (!persistMgr->_saving) Cleanup();
+ if (!persistMgr->_saving) cleanup();
persistMgr->transfer(TMEMBER(Game));
persistMgr->transfer(TMEMBER(_currentScript));
@@ -584,7 +584,7 @@ HRESULT CScEngine::persist(CBPersistMgr *persistMgr) { //////////////////////////////////////////////////////////////////////////
-void CScEngine::EditorCleanup() {
+void CScEngine::editorCleanup() {
for (int i = 0; i < _scripts.GetSize(); i++) {
if (_scripts[i]->_owner == NULL && (_scripts[i]->_state == SCRIPT_FINISHED || _scripts[i]->_state == SCRIPT_ERROR)) {
delete _scripts[i];
diff --git a/engines/wintermute/Base/scriptables/ScEngine.h b/engines/wintermute/Base/scriptables/ScEngine.h index 4d545bea66..06417793ed 100644 --- a/engines/wintermute/Base/scriptables/ScEngine.h +++ b/engines/wintermute/Base/scriptables/ScEngine.h @@ -121,13 +121,13 @@ public: CScScript *_currentScript;
HRESULT ResumeAll();
HRESULT PauseAll();
- void EditorCleanup();
+ void editorCleanup();
HRESULT ResetObject(CBObject *Object);
HRESULT ResetScript(CScScript *Script);
HRESULT EmptyScriptCache();
byte *GetCompiledScript(const char *Filename, uint32 *OutSize, bool IgnoreCache = false);
DECLARE_PERSISTENT(CScEngine, CBBase)
- HRESULT Cleanup();
+ HRESULT cleanup();
int GetNumScripts(int *Running = NULL, int *Waiting = NULL, int *Persistent = NULL);
HRESULT Tick();
CScValue *_globals;
diff --git a/engines/wintermute/Base/scriptables/ScScript.cpp b/engines/wintermute/Base/scriptables/ScScript.cpp index 33e697ffd7..aa3485030e 100644 --- a/engines/wintermute/Base/scriptables/ScScript.cpp +++ b/engines/wintermute/Base/scriptables/ScScript.cpp @@ -97,7 +97,7 @@ CScScript::CScScript(CBGame *inGame, CScEngine *Engine): CBBase(inGame) { //////////////////////////////////////////////////////////////////////////
CScScript::~CScScript() {
- Cleanup();
+ cleanup();
}
@@ -107,13 +107,13 @@ HRESULT CScScript::InitScript() { TScriptHeader *Header = (TScriptHeader *)_buffer;
if (Header->magic != SCRIPT_MAGIC) {
Game->LOG(0, "File '%s' is not a valid compiled script", _filename);
- Cleanup();
+ cleanup();
return E_FAIL;
}
if (Header->version > SCRIPT_VERSION) {
Game->LOG(0, "Script '%s' has a wrong version %d.%d (expected %d.%d)", _filename, Header->version / 256, Header->version % 256, SCRIPT_VERSION / 256, SCRIPT_VERSION % 256);
- Cleanup();
+ cleanup();
return E_FAIL;
}
@@ -224,7 +224,7 @@ HRESULT CScScript::InitTables() { //////////////////////////////////////////////////////////////////////////
HRESULT CScScript::Create(const char *Filename, byte *Buffer, uint32 Size, CBScriptHolder *Owner) {
- Cleanup();
+ cleanup();
_thread = false;
_methodThread = false;
@@ -256,7 +256,7 @@ HRESULT CScScript::Create(const char *Filename, byte *Buffer, uint32 Size, CBScr //////////////////////////////////////////////////////////////////////////
HRESULT CScScript::CreateThread(CScScript *Original, uint32 InitIP, const char *EventName) {
- Cleanup();
+ cleanup();
_thread = true;
_methodThread = false;
@@ -302,7 +302,7 @@ HRESULT CScScript::CreateMethodThread(CScScript *Original, const char *MethodNam uint32 IP = Original->GetMethodPos(MethodName);
if (IP == 0) return E_FAIL;
- Cleanup();
+ cleanup();
_thread = true;
_methodThread = true;
@@ -342,7 +342,7 @@ HRESULT CScScript::CreateMethodThread(CScScript *Original, const char *MethodNam //////////////////////////////////////////////////////////////////////////
-void CScScript::Cleanup() {
+void CScScript::cleanup() {
if (_buffer) delete [] _buffer;
_buffer = NULL;
@@ -445,7 +445,7 @@ HRESULT CScScript::ExecuteInstruction() { const char *str = NULL;
//CScValue* op = new CScValue(Game);
- _operand->Cleanup();
+ _operand->cleanup();
CScValue *op1;
CScValue *op2;
@@ -1244,7 +1244,7 @@ uint32 CScScript::GetEventPos(const char *Name) { //////////////////////////////////////////////////////////////////////////
-bool CScScript::CanHandleEvent(const char *EventName) {
+bool CScScript::canHandleEvent(const char *EventName) {
return GetEventPos(EventName) != 0;
}
diff --git a/engines/wintermute/Base/scriptables/ScScript.h b/engines/wintermute/Base/scriptables/ScScript.h index dd6fcb1f4a..24cc4debdf 100644 --- a/engines/wintermute/Base/scriptables/ScScript.h +++ b/engines/wintermute/Base/scriptables/ScScript.h @@ -68,7 +68,7 @@ public: bool _freezable;
HRESULT Resume();
HRESULT Pause();
- bool CanHandleEvent(const char *EventName);
+ bool canHandleEvent(const char *EventName);
bool canHandleMethod(const char *MethodName);
HRESULT CreateThread(CScScript *Original, uint32 InitIP, const char *EventName);
HRESULT CreateMethodThread(CScScript *Original, const char *MethodName);
@@ -139,7 +139,7 @@ public: char *GetString();
uint32 GetDWORD();
double GetFloat();
- void Cleanup();
+ void cleanup();
HRESULT Create(const char *Filename, byte *Buffer, uint32 Size, CBScriptHolder *Owner);
uint32 _iP;
uint32 _bufferSize;
diff --git a/engines/wintermute/Base/scriptables/ScStack.cpp b/engines/wintermute/Base/scriptables/ScStack.cpp index 6e792ceb53..8dac129788 100644 --- a/engines/wintermute/Base/scriptables/ScStack.cpp +++ b/engines/wintermute/Base/scriptables/ScStack.cpp @@ -70,7 +70,7 @@ void CScStack::Push(CScValue *Val) { _sP++;
if (_sP < _values.GetSize()) {
- _values[_sP]->Cleanup();
+ _values[_sP]->cleanup();
_values[_sP]->Copy(Val);
} else {
CScValue *val = new CScValue(Game);
@@ -88,7 +88,7 @@ CScValue *CScStack::GetPushValue() { CScValue *val = new CScValue(Game);
_values.Add(val);
}
- _values[_sP]->Cleanup();
+ _values[_sP]->cleanup();
return _values[_sP];
}
diff --git a/engines/wintermute/Base/scriptables/ScValue.cpp b/engines/wintermute/Base/scriptables/ScValue.cpp index cb007f91b1..7e575879c1 100644 --- a/engines/wintermute/Base/scriptables/ScValue.cpp +++ b/engines/wintermute/Base/scriptables/ScValue.cpp @@ -119,7 +119,7 @@ CScValue::CScValue(CBGame *inGame, const char *Val): CBBase(inGame) { //////////////////////////////////////////////////////////////////////////
-void CScValue::Cleanup(bool IgnoreNatives) {
+void CScValue::cleanup(bool IgnoreNatives) {
DeleteProps();
if (_valString) delete [] _valString;
@@ -151,7 +151,7 @@ void CScValue::Cleanup(bool IgnoreNatives) { //////////////////////////////////////////////////////////////////////////
CScValue::~CScValue() {
- Cleanup();
+ cleanup();
}
@@ -219,7 +219,7 @@ HRESULT CScValue::SetProp(const char *Name, CScValue *Val, bool CopyWhole, bool val = _valIter->_value;
}
if (!val) val = new CScValue(Game);
- else val->Cleanup();
+ else val->cleanup();
val->Copy(Val, CopyWhole);
val->_isConstVar = SetAsConst;
@@ -658,7 +658,7 @@ void CScValue::Copy(CScValue *orig, bool CopyWhole) { if (orig->_type == VAL_VARIABLE_REF && orig->_valRef && CopyWhole) orig = orig->_valRef;
- Cleanup(true);
+ cleanup(true);
_type = orig->_type;
_valBool = orig->_valBool;
diff --git a/engines/wintermute/Base/scriptables/ScValue.h b/engines/wintermute/Base/scriptables/ScValue.h index 6f6388a9da..6ee0981020 100644 --- a/engines/wintermute/Base/scriptables/ScValue.h +++ b/engines/wintermute/Base/scriptables/ScValue.h @@ -48,7 +48,7 @@ public: static int Compare(CScValue *Val1, CScValue *Val2);
static int CompareStrict(CScValue *Val1, CScValue *Val2);
TValType GetTypeTolerant();
- void Cleanup(bool IgnoreNatives = false);
+ void cleanup(bool IgnoreNatives = false);
DECLARE_PERSISTENT(CScValue, CBBase)
bool _isConstVar;
diff --git a/engines/wintermute/Base/scriptables/SxObject.cpp b/engines/wintermute/Base/scriptables/SxObject.cpp index 7ebbb45132..d991085792 100644 --- a/engines/wintermute/Base/scriptables/SxObject.cpp +++ b/engines/wintermute/Base/scriptables/SxObject.cpp @@ -46,7 +46,7 @@ CBScriptable *makeSXObject(CBGame *inGame, CScStack *stack) { CSXObject::CSXObject(CBGame *inGame, CScStack *Stack): CBObject(inGame) {
int NumParams = Stack->Pop()->GetInt(0);
for (int i = 0; i < NumParams; i++) {
- AddScript(Stack->Pop()->GetString());
+ addScript(Stack->Pop()->GetString());
}
}
|