diff options
Diffstat (limited to 'engines/wintermute/Base/scriptables')
-rw-r--r-- | engines/wintermute/Base/scriptables/SXDate.cpp | 2 | ||||
-rw-r--r-- | engines/wintermute/Base/scriptables/SXFile.cpp | 6 | ||||
-rw-r--r-- | engines/wintermute/Base/scriptables/SXFile.h | 2 | ||||
-rw-r--r-- | engines/wintermute/Base/scriptables/SXMemBuffer.cpp | 4 | ||||
-rw-r--r-- | engines/wintermute/Base/scriptables/SXMemBuffer.h | 2 | ||||
-rw-r--r-- | engines/wintermute/Base/scriptables/SXStore.cpp | 16 | ||||
-rw-r--r-- | engines/wintermute/Base/scriptables/SXStore.h | 2 | ||||
-rw-r--r-- | engines/wintermute/Base/scriptables/ScEngine.cpp | 12 | ||||
-rw-r--r-- | engines/wintermute/Base/scriptables/ScEngine.h | 4 | ||||
-rw-r--r-- | engines/wintermute/Base/scriptables/ScScript.cpp | 18 | ||||
-rw-r--r-- | engines/wintermute/Base/scriptables/ScScript.h | 4 | ||||
-rw-r--r-- | engines/wintermute/Base/scriptables/ScStack.cpp | 4 | ||||
-rw-r--r-- | engines/wintermute/Base/scriptables/ScValue.cpp | 8 | ||||
-rw-r--r-- | engines/wintermute/Base/scriptables/ScValue.h | 2 | ||||
-rw-r--r-- | engines/wintermute/Base/scriptables/SxObject.cpp | 2 |
15 files changed, 44 insertions, 44 deletions
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());
}
}
|