diff options
Diffstat (limited to 'engines/wintermute/Base')
-rw-r--r-- | engines/wintermute/Base/BFileManager.cpp | 2 | ||||
-rw-r--r-- | engines/wintermute/Base/BFontStorage.cpp | 4 | ||||
-rw-r--r-- | engines/wintermute/Base/BFrame.cpp | 3 | ||||
-rw-r--r-- | engines/wintermute/Base/BGame.cpp | 39 | ||||
-rw-r--r-- | engines/wintermute/Base/BKeyboardState.cpp | 4 | ||||
-rw-r--r-- | engines/wintermute/Base/BPersistMgr.cpp | 2 | ||||
-rw-r--r-- | engines/wintermute/Base/BRenderer.cpp | 5 |
7 files changed, 26 insertions, 33 deletions
diff --git a/engines/wintermute/Base/BFileManager.cpp b/engines/wintermute/Base/BFileManager.cpp index 9b0789fd1b..ecccb04493 100644 --- a/engines/wintermute/Base/BFileManager.cpp +++ b/engines/wintermute/Base/BFileManager.cpp @@ -127,7 +127,7 @@ byte *CBFileManager::ReadWholeFile(const Common::String &Filename, uint32 *Size, }
/*
- if(File->GetSize()>MAX_FILE_SIZE){
+ if (File->GetSize() > MAX_FILE_SIZE) {
Game->LOG(0, "File '%s' exceeds the maximum size limit (%d bytes)", Filename, MAX_FILE_SIZE);
CloseFile(File);
return NULL;
diff --git a/engines/wintermute/Base/BFontStorage.cpp b/engines/wintermute/Base/BFontStorage.cpp index b34e24c286..0d00f89e60 100644 --- a/engines/wintermute/Base/BFontStorage.cpp +++ b/engines/wintermute/Base/BFontStorage.cpp @@ -102,9 +102,9 @@ CBFont *CBFontStorage::AddFont(const char *Filename) { /*
CBFont* font = new CBFont(Game);
- if(!font) return NULL;
+ if (!font) return NULL;
- if(FAILED(font->LoadFile(Filename))){
+ if (FAILED(font->LoadFile(Filename))) {
delete font;
return NULL;
}
diff --git a/engines/wintermute/Base/BFrame.cpp b/engines/wintermute/Base/BFrame.cpp index 6fa61b5d51..fa1ed5484e 100644 --- a/engines/wintermute/Base/BFrame.cpp +++ b/engines/wintermute/Base/BFrame.cpp @@ -93,8 +93,7 @@ HRESULT CBFrame::OneTimeDisplay(CBObject *Owner, bool Muted) { if (Owner) Owner->UpdateOneSound(_sound);
_sound->Play();
/*
- if(Game->_state==GAME_FROZEN)
- {
+ if (Game->_state == GAME_FROZEN) {
_sound->Pause(true);
}
*/
diff --git a/engines/wintermute/Base/BGame.cpp b/engines/wintermute/Base/BGame.cpp index 24dc8d357a..f5ac836624 100644 --- a/engines/wintermute/Base/BGame.cpp +++ b/engines/wintermute/Base/BGame.cpp @@ -459,7 +459,7 @@ HRESULT CBGame::Initialize1() { 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;
@@ -1420,7 +1420,7 @@ HRESULT CBGame::ScCallMethod(CScScript *Script, CScStack *Stack, CScStack *ThisS warning("PlayVideo: %s - not implemented yet", Filename);
CScValue* valType = Stack->Pop();
int Type;
- if(valType->IsNULL()) Type = (int)VID_PLAY_STRETCH;
+ if (valType->IsNULL()) Type = (int)VID_PLAY_STRETCH;
else Type = valType->GetInt();
int X = Stack->Pop()->GetInt();
@@ -1430,12 +1430,11 @@ HRESULT CBGame::ScCallMethod(CScScript *Script, CScStack *Stack, CScStack *ThisS 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 (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)))
- {
+ if (SUCCEEDED(Game->_videoPlayer->initialize(Filename, SubtitleFile))) {
+ if (SUCCEEDED(Game->_videoPlayer->play((TVideoPlayback)Type, X, Y, FreezeMusic))) {
Stack->PushBool(true);
Script->Sleep(0);
}
@@ -1461,7 +1460,8 @@ HRESULT CBGame::ScCallMethod(CScScript *Script, CScStack *Stack, CScStack *ThisS warning("PlayTheora: %s - not implemented yet", Filename);
CScValue* valType = Stack->Pop();
int Type;
- if(valType->IsNULL()) Type = (int)VID_PLAY_STRETCH;
+ if (valType->IsNULL())
+ Type = (int)VID_PLAY_STRETCH;
else Type = valType->GetInt();
int X = Stack->Pop()->GetInt();
@@ -1471,17 +1471,14 @@ HRESULT CBGame::ScCallMethod(CScScript *Script, CScStack *Stack, CScStack *ThisS 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 (Type < (int)VID_PLAY_POS || Type > (int)VID_PLAY_CENTER) Type = (int)VID_PLAY_STRETCH;
delete _theoraPlayer;
_theoraPlayer = new CVidTheoraPlayer(this);
- if(_theoraPlayer && SUCCEEDED(_theoraPlayer->initialize(Filename, SubtitleFile)))
- {
+ if (_theoraPlayer && SUCCEEDED(_theoraPlayer->initialize(Filename, SubtitleFile))) {
_theoraPlayer->_dontDropFrames = !DropFrames;
- if(SUCCEEDED(_theoraPlayer->play((TVideoPlayback)Type, X, Y, true, FreezeMusic)))
- {
+ if (SUCCEEDED(_theoraPlayer->play((TVideoPlayback)Type, X, Y, true, FreezeMusic))) {
Stack->PushBool(true);
Script->Sleep(0);
}
@@ -4239,17 +4236,16 @@ HRESULT CBGame::SetWaitCursor(const char *Filename) { //////////////////////////////////////////////////////////////////////////
bool CBGame::IsVideoPlaying()
{
- if(_videoPlayer->isPlaying()) return true;
- if(_theoraPlayer && _theoraPlayer->isPlaying()) return true;
+ if (_videoPlayer->isPlaying()) return true;
+ if (_theoraPlayer && _theoraPlayer->isPlaying()) return true;
return false;
}
//////////////////////////////////////////////////////////////////////////
HRESULT CBGame::StopVideo()
{
- if(_videoPlayer->isPlaying()) _videoPlayer->stop();
- if(_theoraPlayer && _theoraPlayer->isPlaying())
- {
+ if (_videoPlayer->isPlaying()) _videoPlayer->stop();
+ if (_theoraPlayer && _theoraPlayer->isPlaying()) {
_theoraPlayer->stop();
delete _theoraPlayer;
_theoraPlayer = NULL;
@@ -4484,8 +4480,7 @@ void CBGame::GetMousePos(POINT *Pos) { /*
// Windows can squish maximized window if it's larger than desktop
// so we need to modify mouse position appropriately (tnx mRax)
- if(_renderer->_windowed && ::IsZoomed(_renderer->_window))
- {
+ if (_renderer->_windowed && ::IsZoomed(_renderer->_window)) {
RECT rc;
::GetClientRect(_renderer->_window, &rc);
Pos->x *= Game->_renderer->_realWidth;
diff --git a/engines/wintermute/Base/BKeyboardState.cpp b/engines/wintermute/Base/BKeyboardState.cpp index b81803e0ce..17d27712ad 100644 --- a/engines/wintermute/Base/BKeyboardState.cpp +++ b/engines/wintermute/Base/BKeyboardState.cpp @@ -163,9 +163,9 @@ HRESULT CBKeyboardState::ScSetProperty(const char *Name, CScValue *Value) { //////////////////////////////////////////////////////////////////////////
// Name
//////////////////////////////////////////////////////////////////////////
- if(strcmp(Name, "Name")==0){
+ if (strcmp(Name, "Name") == 0) {
SetName(Value->GetString());
- if(_renderer) SetWindowText(_renderer->_window, _name);
+ if (_renderer) SetWindowText(_renderer->_window, _name);
return S_OK;
}
diff --git a/engines/wintermute/Base/BPersistMgr.cpp b/engines/wintermute/Base/BPersistMgr.cpp index 7c5505bd4a..3372e05ba1 100644 --- a/engines/wintermute/Base/BPersistMgr.cpp +++ b/engines/wintermute/Base/BPersistMgr.cpp @@ -267,7 +267,7 @@ HRESULT CBPersistMgr::InitLoad(const char *Filename) { }
/*
- if( _savedVerMajor != DCGF_VER_MAJOR || _savedVerMinor != DCGF_VER_MINOR)
+ if ( _savedVerMajor != DCGF_VER_MAJOR || _savedVerMinor != DCGF_VER_MINOR)
{
Game->LOG(0, "ERROR: Saved game is created by other WME version");
goto init_fail;
diff --git a/engines/wintermute/Base/BRenderer.cpp b/engines/wintermute/Base/BRenderer.cpp index c8de494097..fa9bec5f4f 100644 --- a/engines/wintermute/Base/BRenderer.cpp +++ b/engines/wintermute/Base/BRenderer.cpp @@ -221,8 +221,7 @@ CBImage *CBRenderer::TakeScreenshot() { //////////////////////////////////////////////////////////////////////////
HRESULT CBRenderer::ClipCursor() {
/*
- if(!_windowed)
- {
+ if (!_windowed) {
RECT rc;
GetWindowRect(_window, &rc);
@@ -241,7 +240,7 @@ HRESULT CBRenderer::ClipCursor() { //////////////////////////////////////////////////////////////////////////
HRESULT CBRenderer::UnclipCursor() {
/*
- if(!_windowed) ::ClipCursor(NULL);
+ if (!_windowed) ::ClipCursor(NULL);
*/
return S_OK;
}
|