diff options
Diffstat (limited to 'engines/wintermute/Base')
35 files changed, 313 insertions, 292 deletions
diff --git a/engines/wintermute/Base/BFileManager.cpp b/engines/wintermute/Base/BFileManager.cpp index 990375ef73..90c0fffc39 100644 --- a/engines/wintermute/Base/BFileManager.cpp +++ b/engines/wintermute/Base/BFileManager.cpp @@ -168,7 +168,7 @@ Common::SeekableReadStream *CBFileManager::loadSaveGame(const Common::String &fi HRESULT CBFileManager::SaveFile(const Common::String &Filename, byte *Buffer, uint32 BufferSize, bool Compressed, byte *PrefixBuffer, uint32 PrefixSize) {
// TODO
warning("Implement SaveFile");
-
+
Common::SaveFileManager *saveMan = g_wintermute->getSaveFileMan();
Common::OutSaveFile *file = saveMan->openForSaving(Filename);
file->write(PrefixBuffer, PrefixSize);
@@ -770,15 +770,15 @@ CBFileEntry *CBFileManager::GetPackageEntry(const Common::String &Filename) { Common::SeekableReadStream *CBFileManager::OpenFile(const Common::String &filename, bool AbsPathWarning, bool keepTrackOf) {
if (strcmp(filename.c_str(), "") == 0) return NULL;
//Game->LOG(0, "open file: %s", Filename);
-/*#ifdef __WIN32__
- if (Game->_dEBUG_DebugMode && Game->_dEBUG_AbsolutePathWarning && AbsPathWarning) {
- char Drive[_MAX_DRIVE];
- _splitpath(Filename, Drive, NULL, NULL, NULL);
- if (Drive[0] != '\0') {
- Game->LOG(0, "WARNING: Referencing absolute path '%s'. The game will NOT work on another computer.", Filename);
- }
- }
-#endif*/
+ /*#ifdef __WIN32__
+ if (Game->_dEBUG_DebugMode && Game->_dEBUG_AbsolutePathWarning && AbsPathWarning) {
+ char Drive[_MAX_DRIVE];
+ _splitpath(Filename, Drive, NULL, NULL, NULL);
+ if (Drive[0] != '\0') {
+ Game->LOG(0, "WARNING: Referencing absolute path '%s'. The game will NOT work on another computer.", Filename);
+ }
+ }
+ #endif*/
Common::SeekableReadStream *File = OpenFileRaw(filename);
if (File && keepTrackOf) _openFiles.Add(File);
@@ -813,13 +813,13 @@ Common::SeekableReadStream *CBFileManager::OpenFileRaw(const Common::String &Fil }
Common::SeekableReadStream *ret = NULL;
-
+
ret = openDiskFile(Filename, this);
if (ret) return ret;
ret = openPkgFile(Filename, this);
if (ret) return ret;
-
+
ret = CBResources::getFile(Filename);
if (ret) return ret;
diff --git a/engines/wintermute/Base/BFontTT.cpp b/engines/wintermute/Base/BFontTT.cpp index 7592eff3bf..9f0e9e3b36 100644 --- a/engines/wintermute/Base/BFontTT.cpp +++ b/engines/wintermute/Base/BFontTT.cpp @@ -129,7 +129,7 @@ int CBFontTT::GetTextWidth(byte *Text, int MaxLength) { WideString text;
if (Game->_textEncoding == TEXT_UTF8) text = StringUtil::Utf8ToWide((char *)Text);
- else text = StringUtil::AnsiToWide((char *)Text);
+ else text = StringUtil::AnsiToWide((char *)Text);
if (MaxLength >= 0 && text.size() > MaxLength)
text = Common::String(text.c_str(), MaxLength);
@@ -146,7 +146,7 @@ int CBFontTT::GetTextHeight(byte *Text, int Width) { WideString text;
if (Game->_textEncoding == TEXT_UTF8) text = StringUtil::Utf8ToWide((char *)Text);
- else text = StringUtil::AnsiToWide((char *)Text);
+ else text = StringUtil::AnsiToWide((char *)Text);
int textWidth, textHeight;
@@ -160,11 +160,11 @@ int CBFontTT::GetTextHeight(byte *Text, int Width) { void CBFontTT::DrawText(byte *Text, int X, int Y, int Width, TTextAlign Align, int MaxHeight, int MaxLength) {
if (Text == NULL || strcmp((char *)Text, "") == 0) return;
- WideString text = (char*)Text;
+ WideString text = (char *)Text;
// TODO: Why do we still insist on Widestrings everywhere?
-/* if (Game->_textEncoding == TEXT_UTF8) text = StringUtil::Utf8ToWide((char *)Text);
- else text = StringUtil::AnsiToWide((char *)Text);*/
+ /* if (Game->_textEncoding == TEXT_UTF8) text = StringUtil::Utf8ToWide((char *)Text);
+ else text = StringUtil::AnsiToWide((char *)Text);*/
if (MaxLength >= 0 && text.size() > MaxLength)
text = Common::String(text.c_str(), MaxLength);
@@ -262,7 +262,7 @@ CBSurface *CBFontTT::RenderTextToTexture(const WideString &text, int width, TTex hasWarned = true;
warning("CBFontTT::RenderTextToTexture - Not fully ported yet");
}
- warning("%s %d %d %d %d", text.c_str(), D3DCOLGetR(_layers[0]->_color), D3DCOLGetG(_layers[0]->_color),D3DCOLGetB(_layers[0]->_color),D3DCOLGetA(_layers[0]->_color));
+ warning("%s %d %d %d %d", text.c_str(), D3DCOLGetR(_layers[0]->_color), D3DCOLGetG(_layers[0]->_color), D3DCOLGetB(_layers[0]->_color), D3DCOLGetA(_layers[0]->_color));
// void drawString(Surface *dst, const Common::String &str, int x, int y, int w, uint32 color, TextAlign align = kTextAlignLeft, int deltax = 0, bool useEllipsis = true) const;
Graphics::Surface *surface = new Graphics::Surface();
surface->create(width, _lineHeight * lines.size(), Graphics::PixelFormat(2, 5, 5, 5, 1, 10, 5, 0, 15));
@@ -271,12 +271,12 @@ CBSurface *CBFontTT::RenderTextToTexture(const WideString &text, int width, TTex Common::Array<Common::String>::iterator it;
int heightOffset = 0;
for (it = lines.begin(); it != lines.end(); it++) {
- _font->drawString(surface, *it, 0, heightOffset, width, useColor, alignment);
+ _font->drawString(surface, *it, 0, heightOffset, width, useColor, alignment);
heightOffset += _lineHeight;
}
CBSurfaceSDL *retSurface = new CBSurfaceSDL(Game);
- Graphics::Surface *convertedSurface = surface->convertTo(Graphics::PixelFormat(4, 8, 8, 8, 8, 24, 16, 8 ,0));
+ Graphics::Surface *convertedSurface = surface->convertTo(Graphics::PixelFormat(4, 8, 8, 8, 8, 24, 16, 8 , 0));
retSurface->putSurface(*convertedSurface, true);
convertedSurface->free();
surface->free();
@@ -655,10 +655,10 @@ HRESULT CBFontTT::InitFont() { if (file) {
#ifdef USE_FREETYPE2
- _deletableFont = Graphics::loadTTFFont(*file, _fontHeight * 4/3); // Compensate for the difference in dpi (96 vs 72).
+ _deletableFont = Graphics::loadTTFFont(*file, _fontHeight * 4 / 3); // Compensate for the difference in dpi (96 vs 72).
_font = _deletableFont;
#endif
- }
+ }
if (!_font) {
_font = _fallbackFont = FontMan.getFontByUsage(Graphics::FontManager::kBigGUIFont);
warning("BFontTT::InitFont - Couldn't load %s", _fontFile);
@@ -854,7 +854,7 @@ void CBFontTT::MeasureText(const WideString &text, int maxWidth, int maxHeight, for (it = lines.begin(); it != lines.end(); it++) {
textWidth = MAX(textWidth, _font->getStringWidth(*it));
}
-
+
//WrapText(text, maxWidth, maxHeight, lines);
textHeight = (int)(lines.size() * GetLineHeight());
@@ -862,14 +862,14 @@ void CBFontTT::MeasureText(const WideString &text, int maxWidth, int maxHeight, textWidth = _font->getStringWidth(text);
textHeight = _fontHeight;
}
-/*
- TextLineList::iterator it;
- for (it = lines.begin(); it != lines.end(); ++it) {
- TextLine *line = (*it);
- textWidth = MAX(textWidth, line->GetWidth());
- delete line;
- line = NULL;
- }*/
+ /*
+ TextLineList::iterator it;
+ for (it = lines.begin(); it != lines.end(); ++it) {
+ TextLine *line = (*it);
+ textWidth = MAX(textWidth, line->GetWidth());
+ delete line;
+ line = NULL;
+ }*/
}
#if 0
diff --git a/engines/wintermute/Base/BGame.cpp b/engines/wintermute/Base/BGame.cpp index 4c545b7a1c..def8c5137e 100644 --- a/engines/wintermute/Base/BGame.cpp +++ b/engines/wintermute/Base/BGame.cpp @@ -446,9 +446,9 @@ HRESULT CBGame::Initialize1() { _scEngine = new CScEngine(this);
if (_scEngine == NULL) goto init_fail;
-
+
_videoPlayer = new CVidPlayer(this);
- if (_videoPlayer==NULL) goto init_fail;
+ if (_videoPlayer == NULL) goto init_fail;
_transMgr = new CBTransitionMgr(this);
if (_transMgr == NULL) goto init_fail;
@@ -525,21 +525,21 @@ void CBGame::DEBUG_DebugEnable(const char *Filename) { warning("BGame::DEBUG_DebugEnable - No logfile is currently created"); //TODO: Use a dumpfile?
#endif
-/* time_t timeNow;
- time(&timeNow);
- struct tm *tm = localtime(&timeNow);
+ /* time_t timeNow;
+ time(&timeNow);
+ struct tm *tm = localtime(&timeNow);
-#ifdef _DEBUG
- LOG(0, "********** DEBUG LOG OPENED %02d-%02d-%04d (Debug Build) *******************", tm->tm_mday, tm->tm_mon, tm->tm_year + 1900);
-#else
- LOG(0, "********** DEBUG LOG OPENED %02d-%02d-%04d (Release Build) *****************", tm->tm_mday, tm->tm_mon, tm->tm_year + 1900);
-#endif*/
+ #ifdef _DEBUG
+ LOG(0, "********** DEBUG LOG OPENED %02d-%02d-%04d (Debug Build) *******************", tm->tm_mday, tm->tm_mon, tm->tm_year + 1900);
+ #else
+ LOG(0, "********** DEBUG LOG OPENED %02d-%02d-%04d (Release Build) *****************", tm->tm_mday, tm->tm_mon, tm->tm_year + 1900);
+ #endif*/
int secs = g_system->getMillis() / 1000;
int hours = secs / 3600;
secs = secs % 3600;
int mins = secs / 60;
secs = secs % 60;
-
+
#ifdef _DEBUG
LOG(0, "********** DEBUG LOG OPENED %02d-%02d-%02d (Debug Build) *******************", hours, mins, secs);
#else
@@ -571,9 +571,9 @@ void CBGame::LOG(HRESULT res, LPCSTR fmt, ...) { #ifndef __IPHONEOS__
if (!_dEBUG_DebugMode) return;
#endif
-/* time_t timeNow;
- time(&timeNow);
- struct tm *tm = localtime(&timeNow);*/
+ /* time_t timeNow;
+ time(&timeNow);
+ struct tm *tm = localtime(&timeNow);*/
int secs = g_system->getMillis() / 1000;
int hours = secs / 3600;
secs = secs % 3600;
@@ -1395,42 +1395,40 @@ HRESULT CBGame::ScCallMethod(CScScript *Script, CScStack *Stack, CScStack *ThisS // PlayVideo
//////////////////////////////////////////////////////////////////////////
else if (strcmp(Name, "PlayVideo") == 0) {
-/* Stack->CorrectParams(0);
- Stack->PushBool(false);
+ /* Stack->CorrectParams(0);
+ Stack->PushBool(false);
+
+ return S_OK;
+ // TODO: ADDVIDEO
+ */
- return S_OK;
- // TODO: ADDVIDEO
- */
-
Game->LOG(0, "Warning: Game.PlayVideo() is now deprecated. Use Game.PlayTheora() instead.");
-
+
Stack->CorrectParams(6);
- const char* Filename = Stack->Pop()->GetString();
+ const char *Filename = Stack->Pop()->GetString();
warning("PlayVideo: %s - not implemented yet", Filename);
- CScValue* valType = Stack->Pop();
+ CScValue *valType = Stack->Pop();
int Type;
if (valType->IsNULL()) Type = (int)VID_PLAY_STRETCH;
else Type = valType->GetInt();
-
+
int X = Stack->Pop()->GetInt();
int Y = Stack->Pop()->GetInt();
bool FreezeMusic = Stack->Pop()->GetBool(true);
-
- CScValue* valSub = Stack->Pop();
- const char* SubtitleFile = valSub->IsNULL()?NULL:valSub->GetString();
-
- if (Type < (int)VID_PLAY_POS || Type > (int)VID_PLAY_CENTER)
+
+ CScValue *valSub = Stack->Pop();
+ const char *SubtitleFile = valSub->IsNULL() ? NULL : valSub->GetString();
+
+ if (Type < (int)VID_PLAY_POS || Type > (int)VID_PLAY_CENTER)
Type = (int)VID_PLAY_STRETCH;
-
+
if (SUCCEEDED(Game->_videoPlayer->initialize(Filename, SubtitleFile))) {
if (SUCCEEDED(Game->_videoPlayer->play((TVideoPlayback)Type, X, Y, FreezeMusic))) {
Stack->PushBool(true);
Script->Sleep(0);
- }
- else Stack->PushBool(false);
- }
- else Stack->PushBool(false);
-
+ } else Stack->PushBool(false);
+ } else Stack->PushBool(false);
+
return S_OK;
}
@@ -1438,27 +1436,27 @@ HRESULT CBGame::ScCallMethod(CScScript *Script, CScStack *Stack, CScStack *ThisS // PlayTheora
//////////////////////////////////////////////////////////////////////////
else if (strcmp(Name, "PlayTheora") == 0) {
-/* Stack->CorrectParams(0);
- Stack->PushBool(false);
+ /* Stack->CorrectParams(0);
+ Stack->PushBool(false);
- return S_OK;*/
+ return S_OK;*/
// TODO: ADDVIDEO
Stack->CorrectParams(7);
- const char* Filename = Stack->Pop()->GetString();
- CScValue* valType = Stack->Pop();
+ const char *Filename = Stack->Pop()->GetString();
+ CScValue *valType = Stack->Pop();
int Type;
- if (valType->IsNULL())
+ if (valType->IsNULL())
Type = (int)VID_PLAY_STRETCH;
else Type = valType->GetInt();
-
+
int X = Stack->Pop()->GetInt();
int Y = Stack->Pop()->GetInt();
bool FreezeMusic = Stack->Pop()->GetBool(true);
bool DropFrames = Stack->Pop()->GetBool(true);
-
- CScValue* valSub = Stack->Pop();
- const char* SubtitleFile = valSub->IsNULL()?NULL:valSub->GetString();
+
+ CScValue *valSub = Stack->Pop();
+ const char *SubtitleFile = valSub->IsNULL() ? NULL : valSub->GetString();
if (Type < (int)VID_PLAY_POS || Type > (int)VID_PLAY_CENTER) Type = (int)VID_PLAY_STRETCH;
@@ -1469,15 +1467,13 @@ HRESULT CBGame::ScCallMethod(CScScript *Script, CScStack *Stack, CScStack *ThisS if (SUCCEEDED(_theoraPlayer->play((TVideoPlayback)Type, X, Y, true, FreezeMusic))) {
Stack->PushBool(true);
Script->Sleep(0);
- }
- else Stack->PushBool(false);
- }
- else {
+ } else Stack->PushBool(false);
+ } else {
Stack->PushBool(false);
delete _theoraPlayer;
_theoraPlayer = NULL;
}
-
+
return S_OK;
}
@@ -1813,7 +1809,7 @@ HRESULT CBGame::ScCallMethod(CScScript *Script, CScStack *Stack, CScStack *ThisS warning("BGame::ScCallMethod - Screenshot not reimplemented"); //TODO
int FileNum = 0;
-
+
while (true) {
sprintf(Filename, "%s%03d.bmp", Val->IsNULL() ? _name : Val->GetString(), FileNum);
if (!Common::File::exists(Filename))
@@ -2052,8 +2048,10 @@ HRESULT CBGame::ScCallMethod(CScScript *Script, CScStack *Stack, CScStack *ThisS //////////////////////////////////////////////////////////////////////////
else if (strcmp(Name, "AccOutputText") == 0) {
Stack->CorrectParams(2);
- /* const char *Str = */ Stack->Pop()->GetString();
- /* int Type = */ Stack->Pop()->GetInt();
+ /* const char *Str = */
+ Stack->Pop()->GetString();
+ /* int Type = */
+ Stack->Pop()->GetInt();
// do nothing
Stack->PushNULL();
@@ -3388,7 +3386,7 @@ void CBGame::AfterLoadSound(void *Sound, void *Data) { //////////////////////////////////////////////////////////////////////////
void CBGame::AfterLoadFont(void *Font, void *Data) {
- ((CBFont*)Font)->AfterLoad();
+ ((CBFont *)Font)->AfterLoad();
}
//////////////////////////////////////////////////////////////////////////
@@ -3783,8 +3781,8 @@ HRESULT CBGame::Unfreeze() { //////////////////////////////////////////////////////////////////////////
bool CBGame::HandleKeypress(Common::Event *event, bool printable) {
- if(IsVideoPlaying()) {
- if(event->kbd.keycode == Common::KEYCODE_ESCAPE)
+ if (IsVideoPlaying()) {
+ if (event->kbd.keycode == Common::KEYCODE_ESCAPE)
StopVideo();
return true;
}
@@ -3812,14 +3810,14 @@ 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");
- else
- ApplyEvent("Keypress");
+ if (Game->_focusedWindow->CanHandleEvent("Keypress"))
+ Game->_focusedWindow->ApplyEvent("Keypress");
+ else
+ ApplyEvent("Keypress");
/*}*/
}
return true;
- } else /*if (event->type != SDL_TEXTINPUT)*/ {
+ } else { /*if (event->type != SDL_TEXTINPUT)*/
ApplyEvent("Keypress");
return true;
} //else return true;
@@ -4192,7 +4190,7 @@ void CBGame::DEBUG_DumpClassRegistry() { f->open("zz_class_reg_dump.log");
CSysClassRegistry::GetInstance()->DumpClasses(f);
-
+
f->close();
delete f;
Game->QuickMessage("Classes dump completed.");
@@ -4230,16 +4228,14 @@ HRESULT CBGame::SetWaitCursor(const char *Filename) { }
//////////////////////////////////////////////////////////////////////////
-bool CBGame::IsVideoPlaying()
-{
+bool CBGame::IsVideoPlaying() {
if (_videoPlayer->isPlaying()) return true;
if (_theoraPlayer && _theoraPlayer->isPlaying()) return true;
return false;
}
//////////////////////////////////////////////////////////////////////////
-HRESULT CBGame::StopVideo()
-{
+HRESULT CBGame::StopVideo() {
if (_videoPlayer->isPlaying()) _videoPlayer->stop();
if (_theoraPlayer && _theoraPlayer->isPlaying()) {
_theoraPlayer->stop();
diff --git a/engines/wintermute/Base/BGame.h b/engines/wintermute/Base/BGame.h index 4a660a91fb..e920fab2b9 100644 --- a/engines/wintermute/Base/BGame.h +++ b/engines/wintermute/Base/BGame.h @@ -263,8 +263,8 @@ public: HRESULT Unfreeze();
HRESULT Freeze(bool IncludingMusic = true);
HRESULT FocusWindow(CUIWindow *Window);
- CVidPlayer* _videoPlayer;
- CVidTheoraPlayer* _theoraPlayer;
+ CVidPlayer *_videoPlayer;
+ CVidTheoraPlayer *_theoraPlayer;
bool _loadInProgress;
CUIWindow *_focusedWindow;
bool _editorForceScripts;
diff --git a/engines/wintermute/Base/BImage.cpp b/engines/wintermute/Base/BImage.cpp index 6076b09963..2504850887 100644 --- a/engines/wintermute/Base/BImage.cpp +++ b/engines/wintermute/Base/BImage.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.
@@ -59,7 +59,7 @@ CBImage::CBImage(CBGame *inGame, FIBITMAP *bitmap): CBBase(inGame) { //////////////////////////////////////////////////////////////////////
CBImage::~CBImage() {
-/* delete _bitmap; */
+ /* delete _bitmap; */
delete _decoder;
delete _deletableSurface;
#if 0
@@ -83,21 +83,21 @@ HRESULT CBImage::loadFile(const Common::String &filename) { } else {
error("CBImage::loadFile : Unsupported fileformat %s", filename.c_str());
}
-
+
Common::SeekableReadStream *file = Game->_fileManager->OpenFile(filename.c_str());
if (!file) return E_FAIL;
-
+
_decoder->loadStream(*file);
_surface = _decoder->getSurface();
_palette = _decoder->getPalette();
Game->_fileManager->CloseFile(file);
-
+
return S_OK;
}
byte CBImage::getAlphaAt(int x, int y) {
if (!_surface) return 0xFF;
- uint32 color = *(uint32*)_surface->getBasePtr(x, y);
+ uint32 color = *(uint32 *)_surface->getBasePtr(x, y);
byte r, g, b, a;
_surface->format.colorToARGB(color, a, r, g, b);
return a;
@@ -149,9 +149,12 @@ bool CBImage::writeBMPToStream(Common::WriteStream *stream) { stream->writeByte('M');
/* Since we don't care during reads, we don't care during writes: */
- /* uint32 fileSize = */ stream->writeUint32LE(0);
- /* uint16 res1 = */ stream->writeUint16LE(0);
- /* uint16 res2 = */ stream->writeUint16LE(0);
+ /* uint32 fileSize = */
+ stream->writeUint32LE(0);
+ /* uint16 res1 = */
+ stream->writeUint16LE(0);
+ /* uint16 res2 = */
+ stream->writeUint16LE(0);
const uint32 imageOffset = 54;
stream->writeUint32LE(imageOffset);
@@ -165,12 +168,12 @@ bool CBImage::writeBMPToStream(Common::WriteStream *stream) { if (width == 0 || height == 0)
return false;
-
+
if (height < 0) {
warning("Right-side up bitmaps not supported");
return false;
}
-
+
/* uint16 planes = */ stream->writeUint16LE(0);
const uint16 bitsPerPixel = 24;
stream->writeUint16LE(bitsPerPixel);
@@ -178,12 +181,16 @@ bool CBImage::writeBMPToStream(Common::WriteStream *stream) { const uint32 compression = 0;
stream->writeUint32LE(compression);
- /* uint32 imageSize = */ stream->writeUint32LE(0);
- /* uint32 pixelsPerMeterX = */ stream->writeUint32LE(0);
- /* uint32 pixelsPerMeterY = */ stream->writeUint32LE(0);
+ /* uint32 imageSize = */
+ stream->writeUint32LE(0);
+ /* uint32 pixelsPerMeterX = */
+ stream->writeUint32LE(0);
+ /* uint32 pixelsPerMeterY = */
+ stream->writeUint32LE(0);
const uint32 paletteColorCount = 0;
stream->writeUint32LE(paletteColorCount);
- /* uint32 colorsImportant = */ stream->writeUint32LE(0);
+ /* uint32 colorsImportant = */
+ stream->writeUint32LE(0);
// Start us at the beginning of the image (54 bytes in)
Graphics::PixelFormat format = Graphics::PixelFormat::createFormatCLUT8();
@@ -199,14 +206,14 @@ bool CBImage::writeBMPToStream(Common::WriteStream *stream) { for (int32 i = height - 1; i >= 0; i--) {
for (uint32 j = 0; j < width; j++) {
- byte b,g,r;
- uint32 color = *(uint32*)surface->getBasePtr(j, i);
+ byte b, g, r;
+ uint32 color = *(uint32 *)surface->getBasePtr(j, i);
surface->format.colorToRGB(color, r, g, b);
stream->writeByte(b);
stream->writeByte(g);
stream->writeByte(r);
}
-
+
for (int k = 0; k < extraDataLength; k++) {
stream->writeByte(0);
}
diff --git a/engines/wintermute/Base/BImage.h b/engines/wintermute/Base/BImage.h index 1161c97fa5..8b2cf70cc1 100644 --- a/engines/wintermute/Base/BImage.h +++ b/engines/wintermute/Base/BImage.h @@ -48,8 +48,12 @@ public: ~CBImage();
HRESULT loadFile(const Common::String &filename);
- const Graphics::Surface *getSurface() const { return _surface; };
- const byte *getPalette() const { return _palette; }
+ const Graphics::Surface *getSurface() const {
+ return _surface;
+ };
+ const byte *getPalette() const {
+ return _palette;
+ }
byte getAlphaAt(int x, int y);
bool writeBMPToStream(Common::WriteStream *stream);
HRESULT Resize(int NewWidth, int NewHeight);
diff --git a/engines/wintermute/Base/BKeyboardState.cpp b/engines/wintermute/Base/BKeyboardState.cpp index cc25dd39a9..3f5d9b1225 100644 --- a/engines/wintermute/Base/BKeyboardState.cpp +++ b/engines/wintermute/Base/BKeyboardState.cpp @@ -46,7 +46,7 @@ CBKeyboardState::CBKeyboardState(CBGame *inGame): CBScriptable(inGame) { _currentShift = false;
_currentAlt = false;
_currentControl = false;
-
+
_keyStates = new uint8[323]; // Hardcoded size for the common/keyboard.h enum
for (int i = 0; i < 323; i++) {
_keyStates[i] = false;
@@ -66,7 +66,7 @@ void CBKeyboardState::handleKeyPress(Common::Event *event) { void CBKeyboardState::handleKeyRelease(Common::Event *event) {
if (event->type == Common::EVENT_KEYUP) {
- _keyStates[event->kbd.keycode] = false;
+ _keyStates[event->kbd.keycode] = false;
}
}
@@ -198,8 +198,8 @@ const char *CBKeyboardState::ScToString() { HRESULT CBKeyboardState::ReadKey(Common::Event *event) {
//_currentPrintable = (event->type == SDL_TEXTINPUT); // TODO
_currentCharCode = KeyCodeToVKey(event);
- if ((_currentCharCode <= Common::KEYCODE_z && _currentCharCode >= Common::KEYCODE_a) ||
- (_currentCharCode <= Common::KEYCODE_9 && _currentCharCode >= Common::KEYCODE_0)) {
+ if ((_currentCharCode <= Common::KEYCODE_z && _currentCharCode >= Common::KEYCODE_a) ||
+ (_currentCharCode <= Common::KEYCODE_9 && _currentCharCode >= Common::KEYCODE_0)) {
_currentPrintable = true;
} else {
_currentPrintable = false;
@@ -225,7 +225,7 @@ HRESULT CBKeyboardState::Persist(CBPersistMgr *persistMgr) { persistMgr->transfer(TMEMBER(_currentKeyData));
persistMgr->transfer(TMEMBER(_currentPrintable));
persistMgr->transfer(TMEMBER(_currentShift));
-
+
if (!persistMgr->_saving) {
_keyStates = new uint8[323]; // Hardcoded size for the common/keyboard.h enum
for (int i = 0; i < 323; i++) {
diff --git a/engines/wintermute/Base/BParser.cpp b/engines/wintermute/Base/BParser.cpp index e3887f1acb..d7d58241cc 100644 --- a/engines/wintermute/Base/BParser.cpp +++ b/engines/wintermute/Base/BParser.cpp @@ -181,7 +181,7 @@ char *CBParser::GetAssignmentText(char **buf) { break;
++*buf;
}
- **buf = 0; // null terminate it
+ **buf = 0; // null terminate it
if (theChar) // skip the terminator
++*buf;
}
diff --git a/engines/wintermute/Base/BRenderSDL.cpp b/engines/wintermute/Base/BRenderSDL.cpp index 83adca59f3..54119d3a7a 100644 --- a/engines/wintermute/Base/BRenderSDL.cpp +++ b/engines/wintermute/Base/BRenderSDL.cpp @@ -145,7 +145,7 @@ HRESULT CBRenderSDL::InitRenderer(int width, int height, bool windowed) { g_system->beginGFXTransaction();
g_system->initSize(_width, _height, &format);
OSystem::TransactionError gfxError = g_system->endGFXTransaction();
-
+
if (gfxError != OSystem::kTransactionSuccess) {
warning("Couldn't setup GFX-backend for %dx%dx%d", _width, _height, format.bytesPerPixel * 8);
return E_FAIL;
@@ -275,7 +275,7 @@ HRESULT CBRenderSDL::FadeToColor(uint32 Color, Common::Rect *rect) { warning("Implement CBRenderSDL::FadeToColor"); // TODO.
hasWarned = true;
}
-
+
Common::Rect fillRect;
if (rect) {
@@ -317,7 +317,7 @@ void CBRenderSDL::drawFromSurface(Graphics::Surface *surf, Common::Rect *srcRect mirror |= TransparentSurface::FLIP_V;
if (mirrorY)
mirror |= TransparentSurface::FLIP_H;
- src.blit(*_renderSurface, dstRect->left, dstRect->top, mirror, srcRect, _colorMod, dstRect->width(), dstRect->height() );
+ src.blit(*_renderSurface, dstRect->left, dstRect->top, mirror, srcRect, _colorMod, dstRect->width(), dstRect->height());
}
void CBRenderSDL::drawOpaqueFromSurface(Graphics::Surface *surf, Common::Rect *srcRect, Common::Rect *dstRect, bool mirrorX, bool mirrorY) {
@@ -332,31 +332,31 @@ void CBRenderSDL::drawOpaqueFromSurface(Graphics::Surface *surf, Common::Rect *s img = &src;
}
- int posX = dstRect->left;
+ int posX = dstRect->left;
int posY = dstRect->top;
-
+
// Handle off-screen clipping
if (posY < 0) {
img->h = MAX(0, (int)img->h - -posY);
img->pixels = (byte *)img->pixels + img->pitch * -posY;
posY = 0;
}
-
+
if (posX < 0) {
img->w = MAX(0, (int)img->w - -posX);
img->pixels = (byte *)img->pixels + (-posX * 4);
posX = 0;
}
-
+
img->w = CLIP((int)img->w, 0, (int)MAX((int)_renderSurface->w - posX, 0));
img->h = CLIP((int)img->h, 0, (int)MAX((int)_renderSurface->h - posY, 0));
-
+
for (int i = 0; i < img->h; i++) {
void *destPtr = _renderSurface->getBasePtr(posX, posY + i);
void *srcPtr = img->getBasePtr(0, i);
memcpy(destPtr, srcPtr, _renderSurface->format.bytesPerPixel * img->w);
}
-
+
if (imgScaled) {
imgScaled->pixels = savedPixels;
imgScaled->free();
diff --git a/engines/wintermute/Base/BResources.cpp b/engines/wintermute/Base/BResources.cpp index 3b6d0a264c..75b4a5d1ea 100644 --- a/engines/wintermute/Base/BResources.cpp +++ b/engines/wintermute/Base/BResources.cpp @@ -2806,7 +2806,7 @@ unsigned char systemfont[] = { 0x01, 0x01, 0x01, 0x01, 0x01, 0x01
} ;
-Common::SeekableReadStream *CBResources::getFile(const Common::String& fileName) {
+Common::SeekableReadStream *CBResources::getFile(const Common::String &fileName) {
if (scumm_stricmp(fileName.c_str(), "invalid.bmp") == 0) {
return new Common::MemoryReadStream(invalid, sizeof(invalid), DisposeAfterUse::NO);
} else if (scumm_stricmp(fileName.c_str(), "invalid_debug.bmp") == 0) {
diff --git a/engines/wintermute/Base/BResources.h b/engines/wintermute/Base/BResources.h index f9a28865b4..6ec0541b5c 100644 --- a/engines/wintermute/Base/BResources.h +++ b/engines/wintermute/Base/BResources.h @@ -36,7 +36,7 @@ namespace WinterMute { class CBResources {
public:
- static Common::SeekableReadStream *getFile(const Common::String& fileName);
+ static Common::SeekableReadStream *getFile(const Common::String &fileName);
};
} // end of namespace WinterMute
diff --git a/engines/wintermute/Base/BScriptHolder.cpp b/engines/wintermute/Base/BScriptHolder.cpp index 50a704421c..efe8e5f195 100644 --- a/engines/wintermute/Base/BScriptHolder.cpp +++ b/engines/wintermute/Base/BScriptHolder.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/Base/BSoundBuffer.cpp b/engines/wintermute/Base/BSoundBuffer.cpp index c658cf5b31..a8c41cd022 100644 --- a/engines/wintermute/Base/BSoundBuffer.cpp +++ b/engines/wintermute/Base/BSoundBuffer.cpp @@ -260,7 +260,7 @@ void CBSoundBuffer::SetType(TSoundType Type) { //////////////////////////////////////////////////////////////////////////
HRESULT CBSoundBuffer::SetVolume(int Volume) {
if (_stream && _handle) {
- byte vol = Volume/100.f * Audio::Mixer::kMaxChannelVolume;
+ byte vol = Volume / 100.f * Audio::Mixer::kMaxChannelVolume;
g_system->getMixer()->setChannelVolume(*_handle, vol);
}
return S_OK;
diff --git a/engines/wintermute/Base/BSurface.h b/engines/wintermute/Base/BSurface.h index e91f03ca02..2e745b8ed4 100644 --- a/engines/wintermute/Base/BSurface.h +++ b/engines/wintermute/Base/BSurface.h @@ -63,7 +63,9 @@ public: virtual HRESULT restore();
virtual HRESULT create(const char *Filename, bool default_ck, byte ck_red, byte ck_green, byte ck_blue, int LifeTime = -1, bool KeepLoaded = false) = 0;
virtual HRESULT create(int Width, int Height);
- virtual HRESULT putSurface(const Graphics::Surface &surface, bool hasAlpha = false) { return E_FAIL; }
+ virtual HRESULT putSurface(const Graphics::Surface &surface, bool hasAlpha = false) {
+ return E_FAIL;
+ }
virtual HRESULT putPixel(int x, int y, byte r, byte g, byte b, int a = -1);
virtual HRESULT getPixel(int x, int y, byte *r, byte *g, byte *b, byte *a = NULL);
virtual bool comparePixel(int x, int y, byte r, byte g, byte b, int a = -1);
diff --git a/engines/wintermute/Base/BSurfaceSDL.cpp b/engines/wintermute/Base/BSurfaceSDL.cpp index e118bac384..618c155b36 100644 --- a/engines/wintermute/Base/BSurfaceSDL.cpp +++ b/engines/wintermute/Base/BSurfaceSDL.cpp @@ -83,14 +83,14 @@ bool hasTransparency(Graphics::Surface *surf) { warning("hasTransparency:: non 32 bpp surface passed as argument");
return false;
}
- uint8 r,g,b,a;
+ uint8 r, g, b, a;
for (int i = 0; i < surf->h; i++) {
for (int j = 0; j < surf->w; j++) {
- uint32 pix = *(uint32*)surf->getBasePtr(j, i);
+ uint32 pix = *(uint32 *)surf->getBasePtr(j, i);
surf->format.colorToARGB(pix, a, r, g, b);
if (a != 255) {
return true;
- }
+ }
}
}
return false;
@@ -98,7 +98,7 @@ bool hasTransparency(Graphics::Surface *surf) { //////////////////////////////////////////////////////////////////////////
HRESULT CBSurfaceSDL::create(const char *filename, bool default_ck, byte ck_red, byte ck_green, byte ck_blue, int lifeTime, bool keepLoaded) {
-/* CBRenderSDL *renderer = static_cast<CBRenderSDL *>(Game->_renderer); */
+ /* CBRenderSDL *renderer = static_cast<CBRenderSDL *>(Game->_renderer); */
Common::String strFileName(filename);
CBImage *image = new CBImage(Game);
image->loadFile(strFileName);
@@ -138,10 +138,10 @@ HRESULT CBSurfaceSDL::create(const char *filename, bool default_ck, byte ck_red, FreeImage_FlipVertical(img);*/
//TODO: This is rather endian-specific, but should be replaced by non-SDL-code anyhow:
-/* uint32 rmask = surface->format.rMax() << surface->format.rShift;
- uint32 gmask = surface->format.gMax() << surface->format.gShift;
- uint32 bmask = surface->format.bMax() << surface->format.bShift;
- uint32 amask = surface->format.aMax();*/
+ /* uint32 rmask = surface->format.rMax() << surface->format.rShift;
+ uint32 gmask = surface->format.gMax() << surface->format.gShift;
+ uint32 bmask = surface->format.bMax() << surface->format.bShift;
+ uint32 amask = surface->format.aMax();*/
// SDL_Surface *surf = SDL_CreateRGBSurfaceFrom(surface->pixels, _width, _height, surface->format.bytesPerPixel * 8, surface->pitch, rmask, gmask, bmask, amask);
@@ -165,7 +165,7 @@ HRESULT CBSurfaceSDL::create(const char *filename, bool default_ck, byte ck_red, _surface = new Graphics::Surface();
_surface->copyFrom(*image->getSurface());
}
-
+
_hasAlpha = hasTransparency(_surface);
//SDL_SetHint(SDL_HINT_RENDER_SCALE_QUALITY, "best"); //TODO
//_texture = SdlUtil::CreateTextureFromSurface(renderer->GetSdlRenderer(), surf);
@@ -210,7 +210,7 @@ HRESULT CBSurfaceSDL::create(const char *filename, bool default_ck, byte ck_red, _valid = true;
Game->AddMem(_width * _height * 4);
-
+
delete image;
return S_OK;
@@ -280,11 +280,11 @@ uint32 CBSurfaceSDL::getPixel(Graphics::Surface *surface, int x, int y) { case 3:
#ifdef SCUMM_BIG_ENDIAN
- // if (SDL_BYTEORDER == SDL_BIG_ENDIAN)
- return p[0] << 16 | p[1] << 8 | p[2];
+ // if (SDL_BYTEORDER == SDL_BIG_ENDIAN)
+ return p[0] << 16 | p[1] << 8 | p[2];
#else
//else
- return p[0] | p[1] << 8 | p[2] << 16;
+ return p[0] | p[1] << 8 | p[2] << 16;
#endif
break;
@@ -377,8 +377,8 @@ bool CBSurfaceSDL::isTransparentAtLite(int x, int y) { hasWarned = true;
}
if (_surface->format.bytesPerPixel == 4) {
- uint32 pixel = *(uint32*)_surface->getBasePtr(x, y);
- uint8 r,g,b,a;
+ uint32 pixel = *(uint32 *)_surface->getBasePtr(x, y);
+ uint8 r, g, b, a;
_surface->format.colorToARGB(pixel, a, r, g, b);
if (a <= 128) {
return true;
@@ -482,7 +482,7 @@ HRESULT CBSurfaceSDL::drawSprite(int x, int y, RECT *Rect, float ZoomX, float Zo byte g = D3DCOLGetG(Alpha);
byte b = D3DCOLGetB(Alpha);
byte a = D3DCOLGetA(Alpha);
-
+
renderer->setAlphaMod(a);
renderer->setColorMod(r, g, b);
#if 0
@@ -506,14 +506,14 @@ HRESULT CBSurfaceSDL::drawSprite(int x, int y, RECT *Rect, float ZoomX, float Zo position.left = x + offsetX;
position.top = y + offsetY;
// TODO: Scaling...
-
+
position.setWidth((float)srcRect.width() * ZoomX / 100.f);
position.setHeight((float)srcRect.height() * ZoomX / 100.f);
renderer->ModTargetRect(&position);
-/* position.left += offsetX;
- position.top += offsetY;*/
+ /* position.left += offsetX;
+ position.top += offsetY;*/
// TODO: This actually requires us to have the SAME source-offsets every time,
// But no checking is in place for that yet.
diff --git a/engines/wintermute/Base/BTransitionMgr.cpp b/engines/wintermute/Base/BTransitionMgr.cpp index 74553f3031..500f2a961d 100644 --- a/engines/wintermute/Base/BTransitionMgr.cpp +++ b/engines/wintermute/Base/BTransitionMgr.cpp @@ -115,7 +115,7 @@ HRESULT CBTransitionMgr::Update() { }
break;
default:
- error("CBTransitionMgr::Update - unhandled enum NUM_TRANSITION_TYPES");
+ error("CBTransitionMgr::Update - unhandled enum NUM_TRANSITION_TYPES");
}
if (IsReady()) {
diff --git a/engines/wintermute/Base/PartEmitter.cpp b/engines/wintermute/Base/PartEmitter.cpp index c7a9259a51..39416377c8 100644 --- a/engines/wintermute/Base/PartEmitter.cpp +++ b/engines/wintermute/Base/PartEmitter.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/Base/PartEmitter.h b/engines/wintermute/Base/PartEmitter.h index 98eed9e678..76d4bcdbd2 100644 --- a/engines/wintermute/Base/PartEmitter.h +++ b/engines/wintermute/Base/PartEmitter.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/Base/PartForce.cpp b/engines/wintermute/Base/PartForce.cpp index eb76a25469..441831dc8c 100644 --- a/engines/wintermute/Base/PartForce.cpp +++ b/engines/wintermute/Base/PartForce.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/Base/PartForce.h b/engines/wintermute/Base/PartForce.h index 0754eebfdf..8bfc7ebf68 100644 --- a/engines/wintermute/Base/PartForce.h +++ b/engines/wintermute/Base/PartForce.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/Base/PartParticle.cpp b/engines/wintermute/Base/PartParticle.cpp index d6682e309b..da97a702f8 100644 --- a/engines/wintermute/Base/PartParticle.cpp +++ b/engines/wintermute/Base/PartParticle.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/Base/PartParticle.h b/engines/wintermute/Base/PartParticle.h index e86c1004ae..a7f7c37a65 100644 --- a/engines/wintermute/Base/PartParticle.h +++ b/engines/wintermute/Base/PartParticle.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/Base/file/BDiskFile.cpp b/engines/wintermute/Base/file/BDiskFile.cpp index ce6a6a100c..c26b3f02c6 100644 --- a/engines/wintermute/Base/file/BDiskFile.cpp +++ b/engines/wintermute/Base/file/BDiskFile.cpp @@ -45,7 +45,7 @@ void correctSlashes(char *fileName) { }
}
-Common::SeekableReadStream *openDiskFile(const Common::String &Filename, CBFileManager *fileManager) {
+Common::SeekableReadStream *openDiskFile(const Common::String &Filename, CBFileManager *fileManager) {
char FullPath[MAX_PATH];
uint32 prefixSize = 0;
Common::SeekableReadStream *file = NULL;
@@ -60,7 +60,7 @@ Common::SeekableReadStream *openDiskFile(const Common::String &Filename, CBFileM delete tempFile;
}
}
-
+
// if we didn't find it in search paths, try to open directly
if (!file) {
strcpy(FullPath, Filename.c_str());
@@ -73,28 +73,28 @@ Common::SeekableReadStream *openDiskFile(const Common::String &Filename, CBFileM delete tempFile;
}
}
-
+
if (file) {
uint32 magic1, magic2;
magic1 = file->readUint32LE();
magic2 = file->readUint32LE();
-
+
bool compressed = false;
if (magic1 == DCGF_MAGIC && magic2 == COMPRESSED_FILE_MAGIC) compressed = true;
-
+
if (compressed) {
uint32 DataOffset, CompSize, UncompSize;
DataOffset = file->readUint32LE();
CompSize = file->readUint32LE();
UncompSize = file->readUint32LE();
-
+
byte *CompBuffer = new byte[CompSize];
if (!CompBuffer) {
error("Error allocating memory for compressed file '%s'", Filename.c_str());
delete file;
return NULL;
}
-
+
byte *data = new byte[UncompSize];
if (!data) {
error("Error allocating buffer for file '%s'", Filename.c_str());
@@ -104,16 +104,16 @@ Common::SeekableReadStream *openDiskFile(const Common::String &Filename, CBFileM }
file->seek(DataOffset + prefixSize, SEEK_SET);
file->read(CompBuffer, CompSize);
-
+
if (Common::uncompress(data, (unsigned long *)&UncompSize, CompBuffer, CompSize) != true) {
error("Error uncompressing file '%s'", Filename.c_str());
delete [] CompBuffer;
delete file;
return NULL;
}
-
+
delete [] CompBuffer;
-
+
return new Common::MemoryReadStream(data, UncompSize, DisposeAfterUse::YES);
delete file;
file = NULL;
@@ -121,7 +121,7 @@ Common::SeekableReadStream *openDiskFile(const Common::String &Filename, CBFileM file->seek(0, SEEK_SET);
return file;
}
-
+
return file;
}
diff --git a/engines/wintermute/Base/file/BPkgFile.cpp b/engines/wintermute/Base/file/BPkgFile.cpp index ed3a24f313..02aec3419f 100644 --- a/engines/wintermute/Base/file/BPkgFile.cpp +++ b/engines/wintermute/Base/file/BPkgFile.cpp @@ -45,12 +45,24 @@ class CBPkgFile : public Common::SeekableReadStream { Common::SeekableReadStream *_stream;
public:
CBPkgFile(Common::SeekableReadStream *stream, uint32 knownLength) : _size(knownLength), _stream(stream) {}
- virtual ~CBPkgFile() { delete _stream; }
- virtual uint32 read(void *dataPtr, uint32 dataSize) { return _stream->read(dataPtr, dataSize); }
- virtual bool eos() const { return _stream->eos(); }
- virtual int32 pos() const { return _stream->pos(); }
- virtual int32 size() const { return _size; }
- virtual bool seek(int32 offset, int whence = SEEK_SET) { return _stream->seek(offset, whence); }
+ virtual ~CBPkgFile() {
+ delete _stream;
+ }
+ virtual uint32 read(void *dataPtr, uint32 dataSize) {
+ return _stream->read(dataPtr, dataSize);
+ }
+ virtual bool eos() const {
+ return _stream->eos();
+ }
+ virtual int32 pos() const {
+ return _stream->pos();
+ }
+ virtual int32 size() const {
+ return _size;
+ }
+ virtual bool seek(int32 offset, int whence = SEEK_SET) {
+ return _stream->seek(offset, whence);
+ }
};
Common::SeekableReadStream *openPkgFile(const Common::String &Filename, CBFileManager *fileManager) {
@@ -66,14 +78,14 @@ Common::SeekableReadStream *openPkgFile(const Common::String &Filename, CBFileMa fileEntry = fileManager->GetPackageEntry(fileName);
if (!fileEntry) return NULL;
-
+
file = fileEntry->_package->GetFilePointer();
if (!file) return NULL;
-
+
// TODO: Cleanup
bool compressed = (fileEntry->_compressedLength != 0);
/* _size = fileEntry->_length; */
-
+
if (compressed) {
// TODO: Really, most of this logic might be doable directly in the fileEntry?
// But for now, this should get us rolling atleast.
@@ -86,7 +98,7 @@ Common::SeekableReadStream *openPkgFile(const Common::String &Filename, CBFileMa }
file->seek(0);
-
+
return file;
}
diff --git a/engines/wintermute/Base/scriptables/SXDate.cpp b/engines/wintermute/Base/scriptables/SXDate.cpp index d046d88294..80905bba37 100644 --- a/engines/wintermute/Base/scriptables/SXDate.cpp +++ b/engines/wintermute/Base/scriptables/SXDate.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.
@@ -35,7 +35,7 @@ namespace WinterMute { IMPLEMENT_PERSISTENT(CSXDate, false)
CBScriptable *makeSXDate(CBGame *inGame, CScStack *stack) {
- return new CSXDate(inGame, stack);
+ return new CSXDate(inGame, stack);
}
//////////////////////////////////////////////////////////////////////////
diff --git a/engines/wintermute/Base/scriptables/SXFile.cpp b/engines/wintermute/Base/scriptables/SXFile.cpp index 7ebbf9fc50..cb883a9a7b 100644 --- a/engines/wintermute/Base/scriptables/SXFile.cpp +++ b/engines/wintermute/Base/scriptables/SXFile.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.
@@ -89,8 +89,8 @@ void CSXFile::Close() { Game->_fileManager->CloseFile(_readFile);
_readFile = NULL;
}
- if ((FILE*)_writeFile) {
- fclose((FILE*)_writeFile);
+ if ((FILE *)_writeFile) {
+ fclose((FILE *)_writeFile);
_writeFile = NULL;
}
_mode = 0;
@@ -312,9 +312,9 @@ HRESULT CSXFile::ScCallMethod(CScScript *Script, CScStack *Stack, CScStack *This return S_OK;
}
if (strcmp(Name, "WriteLine") == 0)
- fprintf((FILE*)_writeFile, "%s\n", Line);
+ fprintf((FILE *)_writeFile, "%s\n", Line);
else
- fprintf((FILE*)_writeFile, "%s", Line);
+ fprintf((FILE *)_writeFile, "%s", Line);
Stack->PushBool(true);
@@ -461,7 +461,7 @@ HRESULT CSXFile::ScCallMethod(CScScript *Script, CScStack *Stack, CScStack *This Stack->PushBool(false);
return S_OK;
}
- fwrite(&Val, sizeof(Val), 1, (FILE*)_writeFile);
+ fwrite(&Val, sizeof(Val), 1, (FILE *)_writeFile);
Stack->PushBool(true);
return S_OK;
@@ -479,7 +479,7 @@ HRESULT CSXFile::ScCallMethod(CScScript *Script, CScStack *Stack, CScStack *This Stack->PushBool(false);
return S_OK;
}
- fwrite(&Val, sizeof(Val), 1, (FILE*)_writeFile);
+ fwrite(&Val, sizeof(Val), 1, (FILE *)_writeFile);
Stack->PushBool(true);
return S_OK;
@@ -497,7 +497,7 @@ HRESULT CSXFile::ScCallMethod(CScScript *Script, CScStack *Stack, CScStack *This Stack->PushBool(false);
return S_OK;
}
- fwrite(&Val, sizeof(Val), 1, (FILE*)_writeFile);
+ fwrite(&Val, sizeof(Val), 1, (FILE *)_writeFile);
Stack->PushBool(true);
return S_OK;
@@ -515,7 +515,7 @@ HRESULT CSXFile::ScCallMethod(CScScript *Script, CScStack *Stack, CScStack *This Stack->PushBool(false);
return S_OK;
}
- fwrite(&Val, sizeof(Val), 1, (FILE*)_writeFile);
+ fwrite(&Val, sizeof(Val), 1, (FILE *)_writeFile);
Stack->PushBool(true);
return S_OK;
@@ -533,7 +533,7 @@ HRESULT CSXFile::ScCallMethod(CScScript *Script, CScStack *Stack, CScStack *This Stack->PushBool(false);
return S_OK;
}
- fwrite(&Val, sizeof(Val), 1, (FILE*)_writeFile);
+ fwrite(&Val, sizeof(Val), 1, (FILE *)_writeFile);
Stack->PushBool(true);
return S_OK;
@@ -551,7 +551,7 @@ HRESULT CSXFile::ScCallMethod(CScScript *Script, CScStack *Stack, CScStack *This Stack->PushBool(false);
return S_OK;
}
- fwrite(&Val, sizeof(Val), 1, (FILE*)_writeFile);
+ fwrite(&Val, sizeof(Val), 1, (FILE *)_writeFile);
Stack->PushBool(true);
return S_OK;
@@ -571,8 +571,8 @@ HRESULT CSXFile::ScCallMethod(CScScript *Script, CScStack *Stack, CScStack *This }
uint32 Size = strlen(Val);
- fwrite(&Size, sizeof(Size), 1, (FILE*)_writeFile);
- fwrite(Val, Size, 1, (FILE*)_writeFile);
+ fwrite(&Size, sizeof(Size), 1, (FILE *)_writeFile);
+ fwrite(Val, Size, 1, (FILE *)_writeFile);
Stack->PushBool(true);
@@ -665,14 +665,14 @@ HRESULT CSXFile::ScSetProperty(const char *Name, CScValue *Value) { //////////////////////////////////////////////////////////////////////////
uint32 CSXFile::GetPos() {
if (_mode == 1 && _readFile) return _readFile->pos();
- else if ((_mode == 2 || _mode == 3) && _writeFile) return ftell((FILE*)_writeFile);
+ else if ((_mode == 2 || _mode == 3) && _writeFile) return ftell((FILE *)_writeFile);
else return 0;
}
//////////////////////////////////////////////////////////////////////////
bool CSXFile::SetPos(uint32 pos, TSeek origin) {
if (_mode == 1 && _readFile) return _readFile->seek(pos, origin);
- else if ((_mode == 2 || _mode == 3) && _writeFile) return fseek((FILE*)_writeFile, pos, (int)origin) == 0;
+ else if ((_mode == 2 || _mode == 3) && _writeFile) return fseek((FILE *)_writeFile, pos, (int)origin) == 0;
else return false;
}
@@ -680,10 +680,10 @@ bool CSXFile::SetPos(uint32 pos, TSeek origin) { uint32 CSXFile::GetLength() {
if (_mode == 1 && _readFile) return _readFile->size();
else if ((_mode == 2 || _mode == 3) && _writeFile) {
- uint32 CurrentPos = ftell((FILE*)_writeFile);
- fseek((FILE*)_writeFile, 0, SEEK_END);
- int Ret = ftell((FILE*)_writeFile);
- fseek((FILE*)_writeFile, CurrentPos, SEEK_SET);
+ uint32 CurrentPos = ftell((FILE *)_writeFile);
+ fseek((FILE *)_writeFile, 0, SEEK_END);
+ int Ret = ftell((FILE *)_writeFile);
+ fseek((FILE *)_writeFile, CurrentPos, SEEK_SET);
return Ret;
} else return 0;
}
diff --git a/engines/wintermute/Base/scriptables/SXFile.h b/engines/wintermute/Base/scriptables/SXFile.h index 91cef4c1c5..8c37127f7b 100644 --- a/engines/wintermute/Base/scriptables/SXFile.h +++ b/engines/wintermute/Base/scriptables/SXFile.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/Base/scriptables/SXMath.cpp b/engines/wintermute/Base/scriptables/SXMath.cpp index 68bad8c7d9..351fed9fe3 100644 --- a/engines/wintermute/Base/scriptables/SXMath.cpp +++ b/engines/wintermute/Base/scriptables/SXMath.cpp @@ -42,7 +42,7 @@ namespace WinterMute { IMPLEMENT_PERSISTENT(CSXMath, true)
CBScriptable *makeSXMath(CBGame *inGame) {
- return new CSXMath(inGame);
+ return new CSXMath(inGame);
}
//////////////////////////////////////////////////////////////////////////
diff --git a/engines/wintermute/Base/scriptables/SXStore.cpp b/engines/wintermute/Base/scriptables/SXStore.cpp index 4192e2f8d4..0e13f5d738 100644 --- a/engines/wintermute/Base/scriptables/SXStore.cpp +++ b/engines/wintermute/Base/scriptables/SXStore.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/Base/scriptables/SXStore.h b/engines/wintermute/Base/scriptables/SXStore.h index f4ccaa3bb7..2eff4b065f 100644 --- a/engines/wintermute/Base/scriptables/SXStore.h +++ b/engines/wintermute/Base/scriptables/SXStore.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/Base/scriptables/SXString.cpp b/engines/wintermute/Base/scriptables/SXString.cpp index 7c0f11813a..65bf933d0a 100644 --- a/engines/wintermute/Base/scriptables/SXString.cpp +++ b/engines/wintermute/Base/scriptables/SXString.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.
@@ -271,7 +271,7 @@ HRESULT CSXString::ScCallMethod(CScScript *Script, CScStack *Stack, CScStack *Th Common::Array<WideString> parts;
-
+
Common::StringTokenizer tokenizer(str, delims);
while (!tokenizer.empty()) {
Common::String str2 = tokenizer.nextToken();
@@ -279,19 +279,19 @@ HRESULT CSXString::ScCallMethod(CScScript *Script, CScStack *Stack, CScStack *Th }
// TODO: Clean this up
/*do {
- pos = StringUtil::IndexOf(Common::String(str.c_str() + start), delims, start);
- //pos = str.find_first_of(delims, start);
- if (pos == start) {
- start = pos + 1;
- } else if (pos == str.size()) {
- parts.push_back(Common::String(str.c_str() + start));
- break;
- } else {
- parts.push_back(Common::String(str.c_str() + start, pos - start));
- start = pos + 1;
- }
- //start = str.find_first_not_of(delims, start);
- start = StringUtil::LastIndexOf(Common::String(str.c_str() + start), delims, start) + 1;
+ pos = StringUtil::IndexOf(Common::String(str.c_str() + start), delims, start);
+ //pos = str.find_first_of(delims, start);
+ if (pos == start) {
+ start = pos + 1;
+ } else if (pos == str.size()) {
+ parts.push_back(Common::String(str.c_str() + start));
+ break;
+ } else {
+ parts.push_back(Common::String(str.c_str() + start, pos - start));
+ start = pos + 1;
+ }
+ //start = str.find_first_not_of(delims, start);
+ start = StringUtil::LastIndexOf(Common::String(str.c_str() + start), delims, start) + 1;
} while (pos != str.size());*/
diff --git a/engines/wintermute/Base/scriptables/ScEngine.cpp b/engines/wintermute/Base/scriptables/ScEngine.cpp index a4bb951dc2..0083c55ee9 100644 --- a/engines/wintermute/Base/scriptables/ScEngine.cpp +++ b/engines/wintermute/Base/scriptables/ScEngine.cpp @@ -48,51 +48,51 @@ IMPLEMENT_PERSISTENT(CScEngine, true) CScEngine::CScEngine(CBGame *inGame): CBBase(inGame) {
Game->LOG(0, "Initializing scripting engine...");
-/*
-#ifdef __WIN32__
- char CompilerPath[MAX_PATH];
- strcpy(CompilerPath, COMPILER_DLL);
-
- _compilerDLL = ::LoadLibrary(CompilerPath);
- if (_compilerDLL == NULL) {
- char ModuleName[MAX_PATH];
- ::GetModuleFileName(NULL, ModuleName, MAX_PATH);
-
- // switch to exe's dir
- char *ExeDir = CBUtils::GetPath(ModuleName);
- sprintf(CompilerPath, "%s%s", ExeDir, COMPILER_DLL);
- _compilerDLL = ::LoadLibrary(CompilerPath);
-
- delete [] ExeDir;
- }
- if (_compilerDLL != NULL) {
- // bind compiler's functionality
- ExtCompileBuffer = (DLL_COMPILE_BUFFER) ::GetProcAddress(_compilerDLL, "CompileBuffer");
- ExtCompileFile = (DLL_COMPILE_FILE) ::GetProcAddress(_compilerDLL, "CompileFile");
- ExtReleaseBuffer = (DLL_RELEASE_BUFFER) ::GetProcAddress(_compilerDLL, "ReleaseBuffer");
- ExtSetCallbacks = (DLL_SET_CALLBACKS) ::GetProcAddress(_compilerDLL, "SetCallbacks");
- ExtDefineFunction = (DLL_DEFINE_FUNCTION)::GetProcAddress(_compilerDLL, "DefineFunction");
- ExtDefineVariable = (DLL_DEFINE_VARIABLE)::GetProcAddress(_compilerDLL, "DefineVariable");
-
- if (!ExtCompileBuffer || !ExtCompileFile || !ExtReleaseBuffer || !ExtSetCallbacks || !ExtDefineFunction || !ExtDefineVariable) {
- _compilerAvailable = false;
- ::FreeLibrary(_compilerDLL);
- _compilerDLL = NULL;
- } else {
- */ /*
- // publish external methods to the compiler
- CALLBACKS c;
- c.Dll_AddError = AddError;
- c.Dll_CloseFile = CloseFile;
- c.Dll_LoadFile = LoadFile;
- ExtSetCallbacks(&c, Game);
- */
-/*
- _compilerAvailable = true;
- }
- } else _compilerAvailable = false;
-#else
-*/
+ /*
+ #ifdef __WIN32__
+ char CompilerPath[MAX_PATH];
+ strcpy(CompilerPath, COMPILER_DLL);
+
+ _compilerDLL = ::LoadLibrary(CompilerPath);
+ if (_compilerDLL == NULL) {
+ char ModuleName[MAX_PATH];
+ ::GetModuleFileName(NULL, ModuleName, MAX_PATH);
+
+ // switch to exe's dir
+ char *ExeDir = CBUtils::GetPath(ModuleName);
+ sprintf(CompilerPath, "%s%s", ExeDir, COMPILER_DLL);
+ _compilerDLL = ::LoadLibrary(CompilerPath);
+
+ delete [] ExeDir;
+ }
+ if (_compilerDLL != NULL) {
+ // bind compiler's functionality
+ ExtCompileBuffer = (DLL_COMPILE_BUFFER) ::GetProcAddress(_compilerDLL, "CompileBuffer");
+ ExtCompileFile = (DLL_COMPILE_FILE) ::GetProcAddress(_compilerDLL, "CompileFile");
+ ExtReleaseBuffer = (DLL_RELEASE_BUFFER) ::GetProcAddress(_compilerDLL, "ReleaseBuffer");
+ ExtSetCallbacks = (DLL_SET_CALLBACKS) ::GetProcAddress(_compilerDLL, "SetCallbacks");
+ ExtDefineFunction = (DLL_DEFINE_FUNCTION)::GetProcAddress(_compilerDLL, "DefineFunction");
+ ExtDefineVariable = (DLL_DEFINE_VARIABLE)::GetProcAddress(_compilerDLL, "DefineVariable");
+
+ if (!ExtCompileBuffer || !ExtCompileFile || !ExtReleaseBuffer || !ExtSetCallbacks || !ExtDefineFunction || !ExtDefineVariable) {
+ _compilerAvailable = false;
+ ::FreeLibrary(_compilerDLL);
+ _compilerDLL = NULL;
+ } else {
+ */ /*
+ // publish external methods to the compiler
+ CALLBACKS c;
+ c.Dll_AddError = AddError;
+ c.Dll_CloseFile = CloseFile;
+ c.Dll_LoadFile = LoadFile;
+ ExtSetCallbacks(&c, Game);
+ */
+ /*
+ _compilerAvailable = true;
+ }
+ } else _compilerAvailable = false;
+ #else
+ */
_compilerAvailable = false;
_compilerDLL = NULL;
//#endif
@@ -776,7 +776,7 @@ HRESULT CScEngine::LoadBreakpoints() { int Count = Game->_registry->ReadInt("Debug", "NumBreakpoints", 0);
for (int i = 1; i <= Count; i++) {
- /* uint32 BufSize = 512; */
+ /* uint32 BufSize = 512; */
sprintf(Key, "Breakpoint%d", i);
AnsiString breakpoint = Game->_registry->ReadString("Debug", Key, "");
diff --git a/engines/wintermute/Base/scriptables/ScScript.cpp b/engines/wintermute/Base/scriptables/ScScript.cpp index 20dd8fb156..638f4ab816 100644 --- a/engines/wintermute/Base/scriptables/ScScript.cpp +++ b/engines/wintermute/Base/scriptables/ScScript.cpp @@ -471,7 +471,7 @@ HRESULT CScScript::ExecuteInstruction() { case II_DEF_GLOB_VAR:
case II_DEF_CONST_VAR: {
dw = GetDWORD();
-/* char *Temp = _symbols[dw]; // TODO delete */
+ /* char *Temp = _symbols[dw]; // TODO delete */
// only create global var if it doesn't exist
if (!_engine->_globals->PropExists(_symbols[dw])) {
_operand->SetNULL();
@@ -1544,7 +1544,7 @@ HRESULT CScScript::DbgSendVariables(IWmeDebugClient *Client) { // send scope variables
if (_scopeStack->_sP >= 0) {
for (int i = 0; i <= _scopeStack->_sP; i++) {
- // CScValue *Scope = _scopeStack->GetAt(i);
+ // CScValue *Scope = _scopeStack->GetAt(i);
//Scope->DbgSendVariables(Client, WME_DBGVAR_SCOPE, this, (unsigned int)Scope);
}
}
diff --git a/engines/wintermute/Base/scriptables/SxObject.cpp b/engines/wintermute/Base/scriptables/SxObject.cpp index a1760eeaa5..9e33abdb2e 100644 --- a/engines/wintermute/Base/scriptables/SxObject.cpp +++ b/engines/wintermute/Base/scriptables/SxObject.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/Base/scriptables/SxObject.h b/engines/wintermute/Base/scriptables/SxObject.h index 2a6ad36a58..35dab041d1 100644 --- a/engines/wintermute/Base/scriptables/SxObject.h +++ b/engines/wintermute/Base/scriptables/SxObject.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.
|