diff options
Diffstat (limited to 'engines/wintermute/scriptables')
19 files changed, 106 insertions, 106 deletions
diff --git a/engines/wintermute/scriptables/SXArray.cpp b/engines/wintermute/scriptables/SXArray.cpp index 77a90b7f12..7ac7dd5460 100644 --- a/engines/wintermute/scriptables/SXArray.cpp +++ b/engines/wintermute/scriptables/SXArray.cpp @@ -8,12 +8,12 @@ * modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/wintermute/scriptables/SXArray.h b/engines/wintermute/scriptables/SXArray.h index 8907ec2602..f3ae690ab2 100644 --- a/engines/wintermute/scriptables/SXArray.h +++ b/engines/wintermute/scriptables/SXArray.h @@ -8,12 +8,12 @@ * modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/wintermute/scriptables/SXDate.cpp b/engines/wintermute/scriptables/SXDate.cpp index 193521d44d..d04e4c5add 100644 --- a/engines/wintermute/scriptables/SXDate.cpp +++ b/engines/wintermute/scriptables/SXDate.cpp @@ -250,9 +250,9 @@ HRESULT CSXDate::Persist(CBPersistMgr *PersistMgr) { CBScriptable::Persist(PersistMgr);
#if 0
if (PersistMgr->_saving)
- PersistMgr->PutBytes((byte *)&_tm, sizeof(_tm));
+ PersistMgr->PutBytes((byte *)&_tm, sizeof(_tm));
else
- PersistMgr->GetBytes((byte *)&_tm, sizeof(_tm));
+ PersistMgr->GetBytes((byte *)&_tm, sizeof(_tm));
#endif
return S_OK;
}
diff --git a/engines/wintermute/scriptables/SXDate.h b/engines/wintermute/scriptables/SXDate.h index ca9744e6ab..1947925f02 100644 --- a/engines/wintermute/scriptables/SXDate.h +++ b/engines/wintermute/scriptables/SXDate.h @@ -8,12 +8,12 @@ * modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/wintermute/scriptables/SXFile.cpp b/engines/wintermute/scriptables/SXFile.cpp index fa860e56b6..a27376750a 100644 --- a/engines/wintermute/scriptables/SXFile.cpp +++ b/engines/wintermute/scriptables/SXFile.cpp @@ -200,7 +200,7 @@ HRESULT CSXFile::ScCallMethod(CScScript *Script, CScStack *Stack, CScStack *This return S_OK;
}
uint32 BufSize = FILE_BUFFER_SIZE;
- byte *Buf = (byte *)malloc(BufSize);
+ byte *Buf = (byte *)malloc(BufSize);
uint32 Counter = 0;
byte b;
bool FoundNewLine = false;
@@ -210,7 +210,7 @@ HRESULT CSXFile::ScCallMethod(CScScript *Script, CScStack *Stack, CScStack *This if (FAILED(Ret)) break;
if (Counter > BufSize) {
- Buf = (byte *)realloc(Buf, BufSize + FILE_BUFFER_SIZE);
+ Buf = (byte *)realloc(Buf, BufSize + FILE_BUFFER_SIZE);
BufSize += FILE_BUFFER_SIZE;
}
if (b == '\n') {
@@ -225,7 +225,7 @@ HRESULT CSXFile::ScCallMethod(CScScript *Script, CScStack *Stack, CScStack *This } while (SUCCEEDED(Ret));
if (Counter > BufSize) {
- Buf = (byte *)realloc(Buf, BufSize + FILE_BUFFER_SIZE);
+ Buf = (byte *)realloc(Buf, BufSize + FILE_BUFFER_SIZE);
BufSize += FILE_BUFFER_SIZE;
}
Buf[Counter] = '\0';
@@ -251,7 +251,7 @@ HRESULT CSXFile::ScCallMethod(CScScript *Script, CScStack *Stack, CScStack *This return S_OK;
}
uint32 BufSize = FILE_BUFFER_SIZE;
- byte *Buf = (byte *)malloc(BufSize);
+ byte *Buf = (byte *)malloc(BufSize);
uint32 Counter = 0;
byte b;
@@ -261,7 +261,7 @@ HRESULT CSXFile::ScCallMethod(CScScript *Script, CScStack *Stack, CScStack *This if (FAILED(Ret)) break;
if (Counter > BufSize) {
- Buf = (byte *)realloc(Buf, BufSize + FILE_BUFFER_SIZE);
+ Buf = (byte *)realloc(Buf, BufSize + FILE_BUFFER_SIZE);
BufSize += FILE_BUFFER_SIZE;
}
if (b == 0x0D) continue;
@@ -272,7 +272,7 @@ HRESULT CSXFile::ScCallMethod(CScScript *Script, CScStack *Stack, CScStack *This }
if (Counter > BufSize) {
- Buf = (byte *)realloc(Buf, BufSize + FILE_BUFFER_SIZE);
+ Buf = (byte *)realloc(Buf, BufSize + FILE_BUFFER_SIZE);
BufSize += FILE_BUFFER_SIZE;
}
Buf[Counter] = '\0';
@@ -335,7 +335,7 @@ HRESULT CSXFile::ScCallMethod(CScScript *Script, CScStack *Stack, CScStack *This return S_OK;
}
byte Val;
- if (SUCCEEDED(_readFile->Read(&Val, sizeof(byte )))) Stack->PushInt(Val);
+ if (SUCCEEDED(_readFile->Read(&Val, sizeof(byte)))) Stack->PushInt(Val);
else Stack->PushNULL();
return S_OK;
diff --git a/engines/wintermute/scriptables/SXMath.cpp b/engines/wintermute/scriptables/SXMath.cpp index bcd2e96495..59961fb5f1 100644 --- a/engines/wintermute/scriptables/SXMath.cpp +++ b/engines/wintermute/scriptables/SXMath.cpp @@ -8,12 +8,12 @@ * modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/wintermute/scriptables/SXMath.h b/engines/wintermute/scriptables/SXMath.h index 3169990159..59064c877f 100644 --- a/engines/wintermute/scriptables/SXMath.h +++ b/engines/wintermute/scriptables/SXMath.h @@ -8,12 +8,12 @@ * modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/wintermute/scriptables/SXMemBuffer.cpp b/engines/wintermute/scriptables/SXMemBuffer.cpp index 93d8e2e23b..9aea2b0c4c 100644 --- a/engines/wintermute/scriptables/SXMemBuffer.cpp +++ b/engines/wintermute/scriptables/SXMemBuffer.cpp @@ -8,12 +8,12 @@ * modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
@@ -91,7 +91,7 @@ HRESULT CSXMemBuffer::Resize(int NewSize) { }
if (_buffer && _size > OldSize) {
- memset((byte *)_buffer + OldSize, 0, _size - OldSize);
+ memset((byte *)_buffer + OldSize, 0, _size - OldSize);
}
return S_OK;
}
@@ -138,7 +138,7 @@ HRESULT CSXMemBuffer::ScCallMethod(CScScript *Script, CScStack *Stack, CScStack Stack->CorrectParams(1);
int Start = Stack->Pop()->GetInt();
if (!CheckBounds(Script, Start, sizeof(bool))) Stack->PushNULL();
- else Stack->PushBool(*(bool *)((byte *)_buffer + Start));
+ else Stack->PushBool(*(bool *)((byte *)_buffer + Start));
return S_OK;
}
@@ -149,8 +149,8 @@ HRESULT CSXMemBuffer::ScCallMethod(CScScript *Script, CScStack *Stack, CScStack else if (strcmp(Name, "GetByte") == 0) {
Stack->CorrectParams(1);
int Start = Stack->Pop()->GetInt();
- if (!CheckBounds(Script, Start, sizeof(byte ))) Stack->PushNULL();
- else Stack->PushInt(*(byte *)((byte *)_buffer + Start));
+ if (!CheckBounds(Script, Start, sizeof(byte))) Stack->PushNULL();
+ else Stack->PushInt(*(byte *)((byte *)_buffer + Start));
return S_OK;
}
@@ -162,7 +162,7 @@ HRESULT CSXMemBuffer::ScCallMethod(CScScript *Script, CScStack *Stack, CScStack Stack->CorrectParams(1);
int Start = Stack->Pop()->GetInt();
if (!CheckBounds(Script, Start, sizeof(short))) Stack->PushNULL();
- else Stack->PushInt(65536 + * (short *)((byte *)_buffer + Start));
+ else Stack->PushInt(65536 + * (short *)((byte *)_buffer + Start));
return S_OK;
}
@@ -174,7 +174,7 @@ HRESULT CSXMemBuffer::ScCallMethod(CScScript *Script, CScStack *Stack, CScStack Stack->CorrectParams(1);
int Start = Stack->Pop()->GetInt();
if (!CheckBounds(Script, Start, sizeof(int))) Stack->PushNULL();
- else Stack->PushInt(*(int *)((byte *)_buffer + Start));
+ else Stack->PushInt(*(int *)((byte *)_buffer + Start));
return S_OK;
}
@@ -186,7 +186,7 @@ HRESULT CSXMemBuffer::ScCallMethod(CScScript *Script, CScStack *Stack, CScStack Stack->CorrectParams(1);
int Start = Stack->Pop()->GetInt();
if (!CheckBounds(Script, Start, sizeof(float))) Stack->PushNULL();
- else Stack->PushFloat(*(float *)((byte *)_buffer + Start));
+ else Stack->PushFloat(*(float *)((byte *)_buffer + Start));
return S_OK;
}
@@ -198,7 +198,7 @@ HRESULT CSXMemBuffer::ScCallMethod(CScScript *Script, CScStack *Stack, CScStack Stack->CorrectParams(1);
int Start = Stack->Pop()->GetInt();
if (!CheckBounds(Script, Start, sizeof(double))) Stack->PushNULL();
- else Stack->PushFloat(*(double *)((byte *)_buffer + Start));
+ else Stack->PushFloat(*(double *)((byte *)_buffer + Start));
return S_OK;
}
@@ -240,7 +240,7 @@ HRESULT CSXMemBuffer::ScCallMethod(CScScript *Script, CScStack *Stack, CScStack int Start = Stack->Pop()->GetInt();
if (!CheckBounds(Script, Start, sizeof(void *))) Stack->PushNULL();
else {
- void *Pointer = *(void **)((byte *)_buffer + Start);
+ void *Pointer = *(void **)((byte *)_buffer + Start);
CSXMemBuffer *Buf = new CSXMemBuffer(Game, Pointer);
Stack->PushNative(Buf, false);
}
@@ -257,7 +257,7 @@ HRESULT CSXMemBuffer::ScCallMethod(CScScript *Script, CScStack *Stack, CScStack if (!CheckBounds(Script, Start, sizeof(bool))) Stack->PushBool(false);
else {
- *(bool *)((byte *)_buffer + Start) = Val;
+ *(bool *)((byte *)_buffer + Start) = Val;
Stack->PushBool(true);
}
return S_OK;
@@ -269,11 +269,11 @@ HRESULT CSXMemBuffer::ScCallMethod(CScScript *Script, CScStack *Stack, CScStack else if (strcmp(Name, "SetByte") == 0) {
Stack->CorrectParams(2);
int Start = Stack->Pop()->GetInt();
- byte Val = (byte )Stack->Pop()->GetInt();
+ byte Val = (byte)Stack->Pop()->GetInt();
- if (!CheckBounds(Script, Start, sizeof(byte ))) Stack->PushBool(false);
+ if (!CheckBounds(Script, Start, sizeof(byte))) Stack->PushBool(false);
else {
- *(byte *)((byte *)_buffer + Start) = Val;
+ *(byte *)((byte *)_buffer + Start) = Val;
Stack->PushBool(true);
}
return S_OK;
@@ -289,7 +289,7 @@ HRESULT CSXMemBuffer::ScCallMethod(CScScript *Script, CScStack *Stack, CScStack if (!CheckBounds(Script, Start, sizeof(short))) Stack->PushBool(false);
else {
- *(short *)((byte *)_buffer + Start) = Val;
+ *(short *)((byte *)_buffer + Start) = Val;
Stack->PushBool(true);
}
return S_OK;
@@ -305,7 +305,7 @@ HRESULT CSXMemBuffer::ScCallMethod(CScScript *Script, CScStack *Stack, CScStack if (!CheckBounds(Script, Start, sizeof(int))) Stack->PushBool(false);
else {
- *(int *)((byte *)_buffer + Start) = Val;
+ *(int *)((byte *)_buffer + Start) = Val;
Stack->PushBool(true);
}
return S_OK;
@@ -321,7 +321,7 @@ HRESULT CSXMemBuffer::ScCallMethod(CScScript *Script, CScStack *Stack, CScStack if (!CheckBounds(Script, Start, sizeof(float))) Stack->PushBool(false);
else {
- *(float *)((byte *)_buffer + Start) = Val;
+ *(float *)((byte *)_buffer + Start) = Val;
Stack->PushBool(true);
}
return S_OK;
@@ -337,7 +337,7 @@ HRESULT CSXMemBuffer::ScCallMethod(CScScript *Script, CScStack *Stack, CScStack if (!CheckBounds(Script, Start, sizeof(double))) Stack->PushBool(false);
else {
- *(double *)((byte *)_buffer + Start) = Val;
+ *(double *)((byte *)_buffer + Start) = Val;
Stack->PushBool(true);
}
return S_OK;
@@ -353,7 +353,7 @@ HRESULT CSXMemBuffer::ScCallMethod(CScScript *Script, CScStack *Stack, CScStack if (!CheckBounds(Script, Start, strlen(Val) + 1)) Stack->PushBool(false);
else {
- memcpy((byte *)_buffer + Start, Val, strlen(Val) + 1);
+ memcpy((byte *)_buffer + Start, Val, strlen(Val) + 1);
Stack->PushBool(true);
}
return S_OK;
@@ -454,11 +454,11 @@ HRESULT CSXMemBuffer::Persist(CBPersistMgr *PersistMgr) { PersistMgr->Transfer(TMEMBER(_size));
if (PersistMgr->_saving) {
- if (_size > 0) PersistMgr->PutBytes((byte *)_buffer, _size);
+ if (_size > 0) PersistMgr->PutBytes((byte *)_buffer, _size);
} else {
if (_size > 0) {
_buffer = malloc(_size);
- PersistMgr->GetBytes((byte *)_buffer, _size);
+ PersistMgr->GetBytes((byte *)_buffer, _size);
} else _buffer = NULL;
}
diff --git a/engines/wintermute/scriptables/SXMemBuffer.h b/engines/wintermute/scriptables/SXMemBuffer.h index 9c6553bd89..e63601a113 100644 --- a/engines/wintermute/scriptables/SXMemBuffer.h +++ b/engines/wintermute/scriptables/SXMemBuffer.h @@ -8,12 +8,12 @@ * modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/wintermute/scriptables/SXString.cpp b/engines/wintermute/scriptables/SXString.cpp index d9e1c246c4..acc846dccc 100644 --- a/engines/wintermute/scriptables/SXString.cpp +++ b/engines/wintermute/scriptables/SXString.cpp @@ -103,22 +103,22 @@ HRESULT CSXString::ScCallMethod(CScScript *Script, CScStack *Stack, CScStack *Th if (end < start) CBUtils::Swap(&start, &end);
//try {
- WideString str;
- if (Game->_textEncoding == TEXT_UTF8)
- str = StringUtil::Utf8ToWide(_string);
- else
- str = StringUtil::AnsiToWide(_string);
+ WideString str;
+ if (Game->_textEncoding == TEXT_UTF8)
+ str = StringUtil::Utf8ToWide(_string);
+ else
+ str = StringUtil::AnsiToWide(_string);
- //WideString subStr = str.substr(start, end - start + 1);
- WideString subStr(str.c_str() + start, end - start + 1);
+ //WideString subStr = str.substr(start, end - start + 1);
+ WideString subStr(str.c_str() + start, end - start + 1);
- if (Game->_textEncoding == TEXT_UTF8)
- Stack->PushString(StringUtil::WideToUtf8(subStr).c_str());
- else
- Stack->PushString(StringUtil::WideToAnsi(subStr).c_str());
- // } catch (std::exception &) {
- // Stack->PushNULL();
- // }
+ if (Game->_textEncoding == TEXT_UTF8)
+ Stack->PushString(StringUtil::WideToUtf8(subStr).c_str());
+ else
+ Stack->PushString(StringUtil::WideToAnsi(subStr).c_str());
+ // } catch (std::exception &) {
+ // Stack->PushNULL();
+ // }
return S_OK;
}
@@ -141,19 +141,19 @@ HRESULT CSXString::ScCallMethod(CScScript *Script, CScStack *Stack, CScStack *Th if (val->IsNULL()) len = strlen(_string) - start;
// try {
- WideString str;
- if (Game->_textEncoding == TEXT_UTF8)
- str = StringUtil::Utf8ToWide(_string);
- else
- str = StringUtil::AnsiToWide(_string);
+ WideString str;
+ if (Game->_textEncoding == TEXT_UTF8)
+ str = StringUtil::Utf8ToWide(_string);
+ else
+ str = StringUtil::AnsiToWide(_string);
// WideString subStr = str.substr(start, len);
- WideString subStr(str.c_str() + start, len);
+ WideString subStr(str.c_str() + start, len);
- if (Game->_textEncoding == TEXT_UTF8)
- Stack->PushString(StringUtil::WideToUtf8(subStr).c_str());
- else
- Stack->PushString(StringUtil::WideToAnsi(subStr).c_str());
+ if (Game->_textEncoding == TEXT_UTF8)
+ Stack->PushString(StringUtil::WideToUtf8(subStr).c_str());
+ else
+ Stack->PushString(StringUtil::WideToAnsi(subStr).c_str());
// } catch (std::exception &) {
// Stack->PushNULL();
// }
@@ -371,11 +371,11 @@ HRESULT CSXString::Persist(CBPersistMgr *PersistMgr) { PersistMgr->Transfer(TMEMBER(_capacity));
if (PersistMgr->_saving) {
- if (_capacity > 0) PersistMgr->PutBytes((byte *)_string, _capacity);
+ if (_capacity > 0) PersistMgr->PutBytes((byte *)_string, _capacity);
} else {
if (_capacity > 0) {
_string = new char[_capacity];
- PersistMgr->GetBytes((byte *)_string, _capacity);
+ PersistMgr->GetBytes((byte *)_string, _capacity);
} else _string = NULL;
}
diff --git a/engines/wintermute/scriptables/SXString.h b/engines/wintermute/scriptables/SXString.h index 8abddf244d..a303f2d190 100644 --- a/engines/wintermute/scriptables/SXString.h +++ b/engines/wintermute/scriptables/SXString.h @@ -8,12 +8,12 @@ * modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
@@ -47,7 +47,7 @@ public: CSXString(CBGame *inGame, CScStack *Stack);
virtual ~CSXString();
-
+
private:
char *_string;
int _capacity;
diff --git a/engines/wintermute/scriptables/ScEngine.cpp b/engines/wintermute/scriptables/ScEngine.cpp index bfdfb53fa0..9c690b1c1f 100644 --- a/engines/wintermute/scriptables/ScEngine.cpp +++ b/engines/wintermute/scriptables/ScEngine.cpp @@ -8,12 +8,12 @@ * modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
@@ -319,7 +319,7 @@ byte *CScEngine::GetCompiledScript(const char *Filename, uint32 *OutSize, bool I // We have const char* everywhere but in the DLL-interfaces...
char *tempFileName = new char[strlen(Filename) + 1];
memcpy(tempFileName, Filename, strlen(Filename) + 1);
-
+
SetFileToCompile(Filename);
CompBuffer = ExtCompileFile(tempFileName, &CompSize);
delete[] tempFileName;
@@ -828,26 +828,26 @@ void CScEngine::DisableProfiling() { //////////////////////////////////////////////////////////////////////////
void CScEngine::DumpStats() {
error("DumpStats not ported to ScummVM yet");
-/* uint32 totalTime = CBPlatform::GetTime() - _profilingStartTime;
+ /* uint32 totalTime = CBPlatform::GetTime() - _profilingStartTime;
- typedef std::vector <std::pair<uint32, std::string> > TimeVector;
- TimeVector times;
+ typedef std::vector <std::pair<uint32, std::string> > TimeVector;
+ TimeVector times;
- ScriptTimes::iterator it;
- for (it = _scriptTimes.begin(); it != _scriptTimes.end(); it++) {
- times.push_back(std::pair<uint32, std::string> (it->_value, it->_key));
- }
- std::sort(times.begin(), times.end());
+ ScriptTimes::iterator it;
+ for (it = _scriptTimes.begin(); it != _scriptTimes.end(); it++) {
+ times.push_back(std::pair<uint32, std::string> (it->_value, it->_key));
+ }
+ std::sort(times.begin(), times.end());
- TimeVector::reverse_iterator tit;
+ TimeVector::reverse_iterator tit;
- Game->LOG(0, "***** Script profiling information: *****");
- Game->LOG(0, " %-40s %fs", "Total execution time", (float)totalTime / 1000);
+ Game->LOG(0, "***** Script profiling information: *****");
+ Game->LOG(0, " %-40s %fs", "Total execution time", (float)totalTime / 1000);
- for (tit = times.rbegin(); tit != times.rend(); tit++) {
- Game->LOG(0, " %-40s %fs (%f%%)", tit->second.c_str(), (float)tit->first / 1000, (float)tit->first / (float)totalTime * 100);
- }*/
+ for (tit = times.rbegin(); tit != times.rend(); tit++) {
+ Game->LOG(0, " %-40s %fs (%f%%)", tit->second.c_str(), (float)tit->first / 1000, (float)tit->first / (float)totalTime * 100);
+ }*/
}
} // end of namespace WinterMute
diff --git a/engines/wintermute/scriptables/ScEngine.h b/engines/wintermute/scriptables/ScEngine.h index d034bf8ed6..c633a98d6c 100644 --- a/engines/wintermute/scriptables/ScEngine.h +++ b/engines/wintermute/scriptables/ScEngine.h @@ -8,12 +8,12 @@ * modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/wintermute/scriptables/ScScript.cpp b/engines/wintermute/scriptables/ScScript.cpp index 3678701cf4..611ce4124f 100644 --- a/engines/wintermute/scriptables/ScScript.cpp +++ b/engines/wintermute/scriptables/ScScript.cpp @@ -8,12 +8,12 @@ * modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
@@ -1322,7 +1322,7 @@ HRESULT CScScript::ExternalCall(CScStack *Stack, CScStack *ThisStack, CScScript: Buffer->PutDWORD(Val->GetInt());
break;
case TYPE_BYTE:
- Buffer->PutDWORD((byte )Val->GetInt());
+ Buffer->PutDWORD((byte)Val->GetInt());
break;
case TYPE_STRING:
if (Val->IsNULL()) Buffer->PutDWORD(0);
@@ -1363,13 +1363,13 @@ HRESULT CScScript::ExternalCall(CScStack *Stack, CScStack *ThisStack, CScScript: // return
switch (Function->returns) {
case TYPE_BOOL:
- Stack->PushBool((byte )ret != 0);
+ Stack->PushBool((byte)ret != 0);
break;
case TYPE_LONG:
Stack->PushInt(ret);
break;
case TYPE_BYTE:
- Stack->PushInt((byte )ret);
+ Stack->PushInt((byte)ret);
break;
break;
case TYPE_STRING:
diff --git a/engines/wintermute/scriptables/ScScript.h b/engines/wintermute/scriptables/ScScript.h index 588f57512e..ce9548fc99 100644 --- a/engines/wintermute/scriptables/ScScript.h +++ b/engines/wintermute/scriptables/ScScript.h @@ -8,12 +8,12 @@ * modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/wintermute/scriptables/ScStack.cpp b/engines/wintermute/scriptables/ScStack.cpp index c7b724e9b2..0d097c69c7 100644 --- a/engines/wintermute/scriptables/ScStack.cpp +++ b/engines/wintermute/scriptables/ScStack.cpp @@ -8,12 +8,12 @@ * modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/wintermute/scriptables/ScStack.h b/engines/wintermute/scriptables/ScStack.h index 113fb4c19f..811492c6ca 100644 --- a/engines/wintermute/scriptables/ScStack.h +++ b/engines/wintermute/scriptables/ScStack.h @@ -8,12 +8,12 @@ * modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/wintermute/scriptables/ScValue.cpp b/engines/wintermute/scriptables/ScValue.cpp index 3576c0a618..72baddbbc8 100644 --- a/engines/wintermute/scriptables/ScValue.cpp +++ b/engines/wintermute/scriptables/ScValue.cpp @@ -8,12 +8,12 @@ * modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/engines/wintermute/scriptables/ScValue.h b/engines/wintermute/scriptables/ScValue.h index 7c87c8e707..92ee09f0c5 100644 --- a/engines/wintermute/scriptables/ScValue.h +++ b/engines/wintermute/scriptables/ScValue.h @@ -8,12 +8,12 @@ * modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|