diff options
23 files changed, 63 insertions, 70 deletions
diff --git a/engines/wintermute/ad/ad_entity.cpp b/engines/wintermute/ad/ad_entity.cpp index a4b94d062f..98fb296bf5 100644 --- a/engines/wintermute/ad/ad_entity.cpp +++ b/engines/wintermute/ad/ad_entity.cpp @@ -650,7 +650,7 @@ bool AdEntity::scCallMethod(ScScript *script, ScStack *stack, ScStack *thisStack if (_theora && DID_SUCCEED(_theora->initialize(filename))) {
if (!valAlpha->isNULL()) _theora->setAlphaImage(valAlpha->getString());
_theora->play(VID_PLAY_POS, 0, 0, false, false, looping, startTime, _scale >= 0.0f ? _scale : -1.0f, _sFXVolume);
- //if(m_Scale>=0) m_Theora->m_PlayZoom = m_Scale;
+ //if (_scale>=0) _theora->_playZoom = _scale;
stack->pushBool(true);
} else {
script->runtimeError("Entity.PlayTheora - error playing video '%s'", filename);
diff --git a/engines/wintermute/ad/ad_game.cpp b/engines/wintermute/ad/ad_game.cpp index 1df34e74bd..259fc175ae 100644 --- a/engines/wintermute/ad/ad_game.cpp +++ b/engines/wintermute/ad/ad_game.cpp @@ -335,7 +335,7 @@ bool AdGame::scCallMethod(ScScript *script, ScStack *stack, ScStack *thisStack, //bool ret = ChangeScene(stack->pop()->getString());
- //if(DID_FAIL(ret)) stack->pushBool(false);
+ //if (DID_FAIL(ret)) stack->pushBool(false);
//else stack->pushBool(true);
return STATUS_OK;
@@ -821,7 +821,7 @@ ScValue *AdGame::scGetProperty(const char *name) { // SelectedItem
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "SelectedItem") == 0) {
- //if(_selectedItem) _scValue->setString(_selectedItem->_name);
+ //if (_selectedItem) _scValue->setString(_selectedItem->_name);
if (_selectedItem) _scValue->setNative(_selectedItem, true);
else _scValue->setNULL();
diff --git a/engines/wintermute/ad/ad_scene.cpp b/engines/wintermute/ad/ad_scene.cpp index dd69db3d68..85c2341268 100644 --- a/engines/wintermute/ad/ad_scene.cpp +++ b/engines/wintermute/ad/ad_scene.cpp @@ -2491,7 +2491,7 @@ bool AdScene::persistState(bool saving) { nodeState = state->getNodeState(node->_entity->getName(), saving);
if (nodeState) {
nodeState->transferEntity(node->_entity, _persistentStateSprites, saving);
- //if(Saving) NodeState->_active = node->_entity->_active;
+ //if (Saving) NodeState->_active = node->_entity->_active;
//else node->_entity->_active = NodeState->_active;
}
break;
@@ -2517,7 +2517,7 @@ bool AdScene::persistState(bool saving) { nodeState = state->getNodeState(_objects[i]->getName(), saving);
if (nodeState) {
nodeState->transferEntity((AdEntity *)_objects[i], _persistentStateSprites, saving);
- //if(Saving) NodeState->_active = _objects[i]->_active;
+ //if (Saving) NodeState->_active = _objects[i]->_active;
//else _objects[i]->_active = NodeState->_active;
}
}
@@ -2684,7 +2684,7 @@ bool AdScene::getSceneObjects(BaseArray<AdObject *, AdObject *> &objects, bool i }
if (!found) objects.add(regionObj[newIndex]);
}
- //if(RegionObj.getSize() > 0) Objects.Append(RegionObj);
+ //if (RegionObj.getSize() > 0) Objects.Append(RegionObj);
}
break;
default:
diff --git a/engines/wintermute/ad/ad_talk_holder.cpp b/engines/wintermute/ad/ad_talk_holder.cpp index db13e0a549..359215ee8f 100644 --- a/engines/wintermute/ad/ad_talk_holder.cpp +++ b/engines/wintermute/ad/ad_talk_holder.cpp @@ -320,7 +320,7 @@ bool AdTalkHolder::scSetProperty(const char *name, ScValue *value) { //////////////////////////////////////////////////////////////////////////
// Item
//////////////////////////////////////////////////////////////////////////
- if(strcmp(name, "Item")==0){
+ if (strcmp(name, "Item")==0){
SetItem(value->getString());
return STATUS_OK;
}
diff --git a/engines/wintermute/base/base_game.cpp b/engines/wintermute/base/base_game.cpp index b11915afc7..63040f2db2 100644 --- a/engines/wintermute/base/base_game.cpp +++ b/engines/wintermute/base/base_game.cpp @@ -3242,7 +3242,7 @@ bool BaseGame::loadGame(const char *filename) { BasePersistenceManager *pm = new BasePersistenceManager(_gameRef);
if (DID_FAIL(ret = pm->initLoad(filename))) goto load_finish;
- //if(DID_FAIL(ret = cleanup())) goto load_finish;
+ //if (DID_FAIL(ret = cleanup())) goto load_finish;
if (DID_FAIL(ret = SystemClassRegistry::getInstance()->loadTable(_gameRef, pm))) goto load_finish;
if (DID_FAIL(ret = SystemClassRegistry::getInstance()->loadInstances(_gameRef, pm))) goto load_finish;
@@ -3873,7 +3873,7 @@ bool BaseGame::setActiveObject(BaseObject *obj) { if (obj == _activeObject) return STATUS_OK;
if (_activeObject) _activeObject->applyEvent("MouseLeave");
- //if(ValidObject(_activeObject)) _activeObject->applyEvent("MouseLeave");
+ //if (ValidObject(_activeObject)) _activeObject->applyEvent("MouseLeave");
_activeObject = obj;
if (_activeObject) {
_activeObject->applyEvent("MouseEntry");
diff --git a/engines/wintermute/base/base_keyboard_state.cpp b/engines/wintermute/base/base_keyboard_state.cpp index db0f1db94d..a85ec3e972 100644 --- a/engines/wintermute/base/base_keyboard_state.cpp +++ b/engines/wintermute/base/base_keyboard_state.cpp @@ -215,7 +215,7 @@ bool BaseKeyboardState::readKey(Common::Event *event) { //////////////////////////////////////////////////////////////////////////
bool BaseKeyboardState::persist(BasePersistenceManager *persistMgr) {
- //if(!persistMgr->getIsSaving()) cleanup();
+ //if (!persistMgr->getIsSaving()) cleanup();
BaseScriptable::persist(persistMgr);
persistMgr->transfer(TMEMBER(_currentAlt));
diff --git a/engines/wintermute/base/base_scriptable.cpp b/engines/wintermute/base/base_scriptable.cpp index 40aa2871b5..4059abde3d 100644 --- a/engines/wintermute/base/base_scriptable.cpp +++ b/engines/wintermute/base/base_scriptable.cpp @@ -49,7 +49,7 @@ BaseScriptable::BaseScriptable(BaseGame *inGame, bool noValue, bool persistable) //////////////////////////////////////////////////////////////////////////
BaseScriptable::~BaseScriptable() {
- //if(_refCount>0) _gameRef->LOG(0, "Warning: Destroying object, _refCount=%d", _refCount);
+ //if (_refCount>0) _gameRef->LOG(0, "Warning: Destroying object, _refCount=%d", _refCount);
delete _scValue;
delete _scProp;
_scValue = NULL;
diff --git a/engines/wintermute/base/base_sprite.cpp b/engines/wintermute/base/base_sprite.cpp index 3514504824..03b0ef3615 100644 --- a/engines/wintermute/base/base_sprite.cpp +++ b/engines/wintermute/base/base_sprite.cpp @@ -329,7 +329,7 @@ void BaseSprite::reset() { //////////////////////////////////////////////////////////////////////
bool BaseSprite::GetCurrentFrame(float zoomX, float zoomY) {
- //if(_owner && _owner->_freezable && _gameRef->_state == GAME_FROZEN) return true;
+ //if (_owner && _owner->_freezable && _gameRef->_state == GAME_FROZEN) return true;
if (_currentFrame == -1) return false;
diff --git a/engines/wintermute/base/base_sub_frame.cpp b/engines/wintermute/base/base_sub_frame.cpp index 2ac011917c..0b87dd2b7a 100644 --- a/engines/wintermute/base/base_sub_frame.cpp +++ b/engines/wintermute/base/base_sub_frame.cpp @@ -189,7 +189,7 @@ bool BaseSubFrame::loadBuffer(byte *buffer, int lifeTime, bool keepLoaded) { if (custoTrans) _transparent = BYTETORGBA(r, g, b, 0xFF);
/*
- if(_surface == NULL)
+ if (_surface == NULL)
{
_gameRef->LOG(0, "Error parsing sub-frame. Image not set.");
return STATUS_FAILED;
@@ -217,7 +217,7 @@ bool BaseSubFrame::draw(int x, int y, BaseObject *registerOwner, float zoomX, fl bool res;
- //if(Alpha==0xFFFFFFFF) Alpha = _alpha; // TODO: better (combine owner's and self alpha)
+ //if (Alpha==0xFFFFFFFF) Alpha = _alpha; // TODO: better (combine owner's and self alpha)
if (_alpha != 0xFFFFFFFF) alpha = _alpha;
if (rotate != 0.0f) {
diff --git a/engines/wintermute/base/base_surface_storage.cpp b/engines/wintermute/base/base_surface_storage.cpp index 0dd10f6bdc..d8ba0cbbce 100644 --- a/engines/wintermute/base/base_surface_storage.cpp +++ b/engines/wintermute/base/base_surface_storage.cpp @@ -147,7 +147,7 @@ bool BaseSurfaceStorage::restoreAll() { bool BaseSurfaceStorage::persist(BasePersistenceManager *persistMgr)
{
- if(!persistMgr->getIsSaving()) cleanup(false);
+ if (!persistMgr->getIsSaving()) cleanup(false);
persistMgr->transfer(TMEMBER(_gameRef));
diff --git a/engines/wintermute/base/font/base_font.cpp b/engines/wintermute/base/font/base_font.cpp index 7bffbc35c8..d576b834a2 100644 --- a/engines/wintermute/base/font/base_font.cpp +++ b/engines/wintermute/base/font/base_font.cpp @@ -73,7 +73,7 @@ int BaseFont::getTextWidth(byte *text, int maxLength) { bool BaseFont::loadFile(const char * Filename)
{
BYTE* Buffer = _gameRef->_fileManager->readWholeFile(filename);
- if(Buffer==NULL){
+ if (Buffer==NULL){
_gameRef->LOG(0, "BaseFont::LoadFile failed for file '%s'", filename);
return STATUS_FAILED;
}
@@ -83,7 +83,7 @@ bool BaseFont::loadFile(const char * Filename) _filename = new char [strlen(filename)+1];
strcpy(_filename, filename);
- if(DID_FAIL(ret = loadBuffer(Buffer))) _gameRef->LOG(0, "Error parsing FONT file '%s'", filename);
+ if (DID_FAIL(ret = loadBuffer(Buffer))) _gameRef->LOG(0, "Error parsing FONT file '%s'", filename);
delete[] Buffer;
@@ -105,7 +105,7 @@ bool BaseFont::loadBuffer(byte * Buffer) int cmd;
BaseParser parser(_gameRef);
- if(parser.GetCommand ((char**)&Buffer, commands, (char**)¶ms)!=TOKEN_FONT){
+ if (parser.GetCommand ((char**)&Buffer, commands, (char**)¶ms)!=TOKEN_FONT){
_gameRef->LOG(0, "'FONT' keyword expected.");
return STATUS_FAILED;
}
diff --git a/engines/wintermute/base/scriptables/script.cpp b/engines/wintermute/base/scriptables/script.cpp index 57e08135ed..a519da5832 100644 --- a/engines/wintermute/base/scriptables/script.cpp +++ b/engines/wintermute/base/scriptables/script.cpp @@ -591,11 +591,11 @@ bool ScScript::executeInstruction() { }
/*
ScValue* val = var->getProp(MethodName);
- if(val){
+ if (val){
dw = GetFuncPos(val->getString());
- if(dw==0){
+ if (dw==0){
TExternalFunction* f = GetExternal(val->getString());
- if(f){
+ if (f){
ExternalCall(_stack, _thisStack, f);
}
else{
@@ -776,7 +776,7 @@ bool ScScript::executeInstruction() { case II_JMP_FALSE: {
dw = getDWORD();
- //if(!_stack->pop()->getBool()) _iP = dw;
+ //if (!_stack->pop()->getBool()) _iP = dw;
ScValue *val = _stack->pop();
if (!val) {
runtimeError("Script corruption detected. Did you use '=' instead of '==' for comparison?");
@@ -864,7 +864,7 @@ bool ScScript::executeInstruction() { case II_NOT:
op1 = _stack->pop();
- //if(op1->isNULL()) _operand->setNULL();
+ //if (op1->isNULL()) _operand->setNULL();
if (op1->isNULL()) _operand->setBool(true);
else _operand->setBool(!op1->getBool());
_stack->push(_operand);
@@ -900,14 +900,14 @@ bool ScScript::executeInstruction() { op1 = _stack->pop();
/*
- if((op1->isNULL() && !op2->isNULL()) || (!op1->isNULL() && op2->isNULL())) _operand->setBool(false);
- else if(op1->isNative() && op2->isNative()){
+ if ((op1->isNULL() && !op2->isNULL()) || (!op1->isNULL() && op2->isNULL())) _operand->setBool(false);
+ else if (op1->isNative() && op2->isNative()){
_operand->setBool(op1->getNative() == op2->getNative());
}
- else if(op1->getType()==VAL_STRING || op2->getType()==VAL_STRING){
+ else if (op1->getType()==VAL_STRING || op2->getType()==VAL_STRING){
_operand->setBool(scumm_stricmp(op1->getString(), op2->getString())==0);
}
- else if(op1->getType()==VAL_FLOAT && op2->getType()==VAL_FLOAT){
+ else if (op1->getType()==VAL_FLOAT && op2->getType()==VAL_FLOAT){
_operand->setBool(op1->getFloat() == op2->getFloat());
}
else{
@@ -924,14 +924,14 @@ bool ScScript::executeInstruction() { op1 = _stack->pop();
/*
- if((op1->isNULL() && !op2->isNULL()) || (!op1->isNULL() && op2->isNULL())) _operand->setBool(true);
- else if(op1->isNative() && op2->isNative()){
+ if ((op1->isNULL() && !op2->isNULL()) || (!op1->isNULL() && op2->isNULL())) _operand->setBool(true);
+ else if (op1->isNative() && op2->isNative()){
_operand->setBool(op1->getNative() != op2->getNative());
}
- else if(op1->getType()==VAL_STRING || op2->getType()==VAL_STRING){
+ else if (op1->getType()==VAL_STRING || op2->getType()==VAL_STRING){
_operand->setBool(scumm_stricmp(op1->getString(), op2->getString())!=0);
}
- else if(op1->getType()==VAL_FLOAT && op2->getType()==VAL_FLOAT){
+ else if (op1->getType()==VAL_FLOAT && op2->getType()==VAL_FLOAT){
_operand->setBool(op1->getFloat() != op2->getFloat());
}
else{
@@ -948,7 +948,7 @@ bool ScScript::executeInstruction() { op1 = _stack->pop();
/*
- if(op1->getType()==VAL_FLOAT && op2->getType()==VAL_FLOAT){
+ if (op1->getType()==VAL_FLOAT && op2->getType()==VAL_FLOAT){
_operand->setBool(op1->getFloat() < op2->getFloat());
}
else _operand->setBool(op1->getInt() < op2->getInt());
@@ -963,7 +963,7 @@ bool ScScript::executeInstruction() { op1 = _stack->pop();
/*
- if(op1->getType()==VAL_FLOAT && op2->getType()==VAL_FLOAT){
+ if (op1->getType()==VAL_FLOAT && op2->getType()==VAL_FLOAT){
_operand->setBool(op1->getFloat() > op2->getFloat());
}
else _operand->setBool(op1->getInt() > op2->getInt());
@@ -978,7 +978,7 @@ bool ScScript::executeInstruction() { op1 = _stack->pop();
/*
- if(op1->getType()==VAL_FLOAT && op2->getType()==VAL_FLOAT){
+ if (op1->getType()==VAL_FLOAT && op2->getType()==VAL_FLOAT){
_operand->setBool(op1->getFloat() <= op2->getFloat());
}
else _operand->setBool(op1->getInt() <= op2->getInt());
@@ -993,7 +993,7 @@ bool ScScript::executeInstruction() { op1 = _stack->pop();
/*
- if(op1->getType()==VAL_FLOAT && op2->getType()==VAL_FLOAT){
+ if (op1->getType()==VAL_FLOAT && op2->getType()==VAL_FLOAT){
_operand->setBool(op1->getFloat() >= op2->getFloat());
}
else _operand->setBool(op1->getInt() >= op2->getInt());
@@ -1257,7 +1257,7 @@ bool ScScript::persist(BasePersistenceManager *persistMgr) { //////////////////////////////////////////////////////////////////////////
ScScript *ScScript::invokeEventHandler(const char *eventName, bool unbreakable) {
- //if(_state!=SCRIPT_PERSISTENT) return NULL;
+ //if (_state!=SCRIPT_PERSISTENT) return NULL;
uint32 pos = getEventPos(eventName);
if (!pos) return NULL;
diff --git a/engines/wintermute/base/scriptables/script_engine.cpp b/engines/wintermute/base/scriptables/script_engine.cpp index c33d844aa1..792dfd4589 100644 --- a/engines/wintermute/base/scriptables/script_engine.cpp +++ b/engines/wintermute/base/scriptables/script_engine.cpp @@ -257,14 +257,14 @@ bool ScEngine::tick() { bool obj_found=false;
for(int j=0; j<_gameRef->_regObjects.getSize(); j++)
{
- if(_gameRef->_regObjects[j] == _scripts[i]->_waitObject)
+ if (_gameRef->_regObjects[j] == _scripts[i]->_waitObject)
{
- if(_gameRef->_regObjects[j]->IsReady()) _scripts[i]->Run();
+ if (_gameRef->_regObjects[j]->IsReady()) _scripts[i]->Run();
obj_found = true;
break;
}
}
- if(!obj_found) _scripts[i]->finish(); // _waitObject no longer exists
+ if (!obj_found) _scripts[i]->finish(); // _waitObject no longer exists
*/
if (_gameRef->validObject(_scripts[i]->_waitObject)) {
if (_scripts[i]->_waitObject->isReady()) _scripts[i]->run();
diff --git a/engines/wintermute/base/scriptables/script_ext_date.cpp b/engines/wintermute/base/scriptables/script_ext_date.cpp index 322fb9bc5b..d2fd3663c7 100644 --- a/engines/wintermute/base/scriptables/script_ext_date.cpp +++ b/engines/wintermute/base/scriptables/script_ext_date.cpp @@ -228,7 +228,7 @@ bool SXDate::scSetProperty(const char *name, ScValue *value) { //////////////////////////////////////////////////////////////////////////
// Name
//////////////////////////////////////////////////////////////////////////
- if(strcmp(name, "Name")==0){
+ if (strcmp(name, "Name")==0){
setName(value->getString());
return STATUS_OK;
}
diff --git a/engines/wintermute/base/scriptables/script_ext_file.cpp b/engines/wintermute/base/scriptables/script_ext_file.cpp index 01179bb3ad..7da1601bdc 100644 --- a/engines/wintermute/base/scriptables/script_ext_file.cpp +++ b/engines/wintermute/base/scriptables/script_ext_file.cpp @@ -663,12 +663,12 @@ bool SXFile::scSetProperty(const char *name, ScValue *value) { //////////////////////////////////////////////////////////////////////////
// Length
//////////////////////////////////////////////////////////////////////////
- if(strcmp(name, "Length")==0){
+ if (strcmp(name, "Length")==0){
int OrigLength = _length;
_length = max(value->getInt(0), 0);
char PropName[20];
- if(_length < OrigLength){
+ if (_length < OrigLength){
for(int i=_length; i<OrigLength; i++){
sprintf(PropName, "%d", i);
_values->DeleteProp(PropName);
diff --git a/engines/wintermute/base/scriptables/script_ext_mem_buffer.cpp b/engines/wintermute/base/scriptables/script_ext_mem_buffer.cpp index 6b791871ad..3d3f0b218b 100644 --- a/engines/wintermute/base/scriptables/script_ext_mem_buffer.cpp +++ b/engines/wintermute/base/scriptables/script_ext_mem_buffer.cpp @@ -462,12 +462,12 @@ bool SXMemBuffer::scSetProperty(const char *name, ScValue *value) { //////////////////////////////////////////////////////////////////////////
// Length
//////////////////////////////////////////////////////////////////////////
- if(strcmp(name, "Length")==0){
+ if (strcmp(name, "Length")==0){
int OrigLength = _length;
_length = max(value->getInt(0), 0);
char PropName[20];
- if(_length < OrigLength){
+ if (_length < OrigLength){
for(int i=_length; i<OrigLength; i++){
sprintf(PropName, "%d", i);
_values->DeleteProp(PropName);
diff --git a/engines/wintermute/base/scriptables/script_value.cpp b/engines/wintermute/base/scriptables/script_value.cpp index 59e0965f5e..5e824cd10c 100644 --- a/engines/wintermute/base/scriptables/script_value.cpp +++ b/engines/wintermute/base/scriptables/script_value.cpp @@ -240,7 +240,7 @@ bool ScValue::setProp(const char *name, ScValue *val, bool copyWhole, bool setAs val->_isConstVar = SetAsConst;
_valObject[Name] = val;
- if(_type!=VAL_NATIVE) _type = VAL_OBJECT;
+ if (_type!=VAL_NATIVE) _type = VAL_OBJECT;
*/
}
diff --git a/engines/wintermute/base/sound/base_sound_buffer.cpp b/engines/wintermute/base/sound/base_sound_buffer.cpp index 0b7fc840bf..27276f4fa7 100644 --- a/engines/wintermute/base/sound/base_sound_buffer.cpp +++ b/engines/wintermute/base/sound/base_sound_buffer.cpp @@ -148,22 +148,22 @@ bool BaseSoundBuffer::loadFromFile(const char *filename, bool forceReload) { bool res;
bool NewlyCreated = false;
- if(!_soundBuffer || ForceReload || _streamed){
- if(!_file) _file = _gameRef->_fileManager->openFile(filename);
- if(!_file){
+ if (!_soundBuffer || ForceReload || _streamed){
+ if (!_file) _file = _gameRef->_fileManager->openFile(filename);
+ if (!_file){
_gameRef->LOG(0, "Error opening sound file '%s'", filename);
return STATUS_FAILED;
}
// switch to streamed for big files
- if(!_streamed && (_file->GetSize() > MAX_NONSTREAMED_FILE_SIZE && !_gameRef->_forceNonStreamedSounds)) SetStreaming(true);
+ if (!_streamed && (_file->GetSize() > MAX_NONSTREAMED_FILE_SIZE && !_gameRef->_forceNonStreamedSounds)) SetStreaming(true);
}
// create buffer
- if(!_soundBuffer){
+ if (!_soundBuffer){
NewlyCreated = true;
res = InitializeBuffer(_file);
- if(DID_FAIL(res)){
+ if (DID_FAIL(res)){
_gameRef->LOG(res, "Error creating sound buffer for file '%s'", filename);
return res;
}
@@ -172,13 +172,13 @@ bool BaseSoundBuffer::loadFromFile(const char *filename, bool forceReload) { // store filename
- if(!_filename){
+ if (!_filename){
_filename = new char[strlen(filename)+1];
strcpy(_filename, filename);
}
// close file (if not streaming)
- if(!_streamed && _file){
+ if (!_streamed && _file){
_gameRef->_fileManager->closeFile(_file);
_file = NULL;
}
diff --git a/engines/wintermute/dcgf.h b/engines/wintermute/dcgf.h index 8e222cfce3..f8213570e4 100644 --- a/engines/wintermute/dcgf.h +++ b/engines/wintermute/dcgf.h @@ -48,11 +48,4 @@ #define COMPRESSED_FILE_MAGIC 0x504D435A // ZCMP
-#ifdef GetClassName
-#undef GetClassName
-#endif
-
-// macros
-#define RELEASE(obj) if(obj) { obj->Release(); obj = NULL; } else 0
-
#endif // _DCGF_H_
diff --git a/engines/wintermute/ui/ui_button.cpp b/engines/wintermute/ui/ui_button.cpp index fab724eb06..2c4cecdc85 100644 --- a/engines/wintermute/ui/ui_button.cpp +++ b/engines/wintermute/ui/ui_button.cpp @@ -627,7 +627,7 @@ bool UIButton::display(int offsetX, int offsetY) { }
if (back) back->display(offsetX + _posX, offsetY + _posY, _width, _height);
- //if(image) image->Draw(ImageX +((_press||_oneTimePress)&&back?1:0), ImageY +((_press||_oneTimePress)&&back?1:0), NULL);
+ //if (image) image->Draw(ImageX +((_press||_oneTimePress)&&back?1:0), ImageY +((_press||_oneTimePress)&&back?1:0), NULL);
if (image) image->draw(imageX + ((_press || _oneTimePress) && back ? 1 : 0), imageY + ((_press || _oneTimePress) && back ? 1 : 0), _pixelPerfect ? this : NULL);
if (font && _text) {
diff --git a/engines/wintermute/video/video_player.cpp b/engines/wintermute/video/video_player.cpp index ac16104268..464cbec7ff 100644 --- a/engines/wintermute/video/video_player.cpp +++ b/engines/wintermute/video/video_player.cpp @@ -217,11 +217,11 @@ bool VideoPlayer::update() { DWORD CurrentTime; // current playing time (in ms) /* - if(m_SoundAvailable && m_Sound){ + if (m_SoundAvailable && m_Sound){ CurrentTime = m_Sound->GetPosition(); // in samples CurrentTime /= (m_Sound->m_Format.wf.nSamplesPerSec / 1000); - if(!m_Sound->IsPlaying()) CurrentTime = m_TotalVideoTime; + if (!m_Sound->IsPlaying()) CurrentTime = m_TotalVideoTime; } else CurrentTime = timeGetTime() - m_StartTime; diff --git a/engines/wintermute/video/video_theora_player.cpp b/engines/wintermute/video/video_theora_player.cpp index 97fba01201..91703e40b7 100644 --- a/engines/wintermute/video/video_theora_player.cpp +++ b/engines/wintermute/video/video_theora_player.cpp @@ -547,7 +547,7 @@ bool VideoTheoraPlayer::update() { // If playback has begun, top audio buffer off immediately. - //if(m_Sound) WriteAudio(); + //if (m_Sound) WriteAudio(); // are we at or past time for this video frame? if (m_PlaybackStarted && m_VideoFrameReady && (!m_FrameRendered || m_VideobufTime <= GetMovieTime())) { diff --git a/engines/wintermute/wintermute.cpp b/engines/wintermute/wintermute.cpp index d797972e40..55204bcc74 100644 --- a/engines/wintermute/wintermute.cpp +++ b/engines/wintermute/wintermute.cpp @@ -165,7 +165,7 @@ int WinterMuteEngine::init() { bool windowedMode = !ConfMan.getBool("fullscreen"); // parse command line - char *SaveGame = NULL; + char *saveGame = NULL; /* for (int i = 0; i < argc; i++) { strcpy(param, argv[i]); @@ -268,9 +268,9 @@ int WinterMuteEngine::init() { _game->loadGame(str.c_str()); } - if (SaveGame) { - _game->loadGame(SaveGame); - delete[] SaveGame; + if (saveGame) { + _game->loadGame(saveGame); + delete[] saveGame; } // all set, ready to go @@ -314,9 +314,9 @@ int WinterMuteEngine::messageLoop() { if (_game) { // remember previous window position /* - if(_game->_renderer && _game->_renderer->_windowed) + if (_game->_renderer && _game->_renderer->_windowed) { - if(!::IsIconic(_game->_renderer->_window)) + if (!::IsIconic(_game->_renderer->_window)) { int PosX = _game->_renderer->_windowRect.left; int PosY = _game->_renderer->_windowRect.top; |