diff --git a/apps/esmtool/record.cpp b/apps/esmtool/record.cpp index 6fd4b80fb4..be9b03e800 100644 --- a/apps/esmtool/record.cpp +++ b/apps/esmtool/record.cpp @@ -16,7 +16,7 @@ void printAIPackage(ESM::AIPackage p) std::cout << " Duration: " << p.mWander.mDuration << std::endl; std::cout << " Time of Day: " << (int)p.mWander.mTimeOfDay << std::endl; if (p.mWander.mShouldRepeat != 1) - std::cout << " Should repeat: " << (bool)p.mWander.mShouldRepeat << std::endl; + std::cout << " Should repeat: " << (bool)(p.mWander.mShouldRepeat != 0) << std::endl; std::cout << " Idle: "; for (int i = 0; i != 8; i++) diff --git a/apps/essimporter/convertacdt.cpp b/apps/essimporter/convertacdt.cpp index 718403a8c3..91dd8ef233 100644 --- a/apps/essimporter/convertacdt.cpp +++ b/apps/essimporter/convertacdt.cpp @@ -28,13 +28,13 @@ namespace ESSImport cStats.mAttributes[i].mCurrent = acdt.mAttributes[i][0]; } cStats.mGoldPool = acdt.mGoldPool; - cStats.mTalkedTo = acdt.mFlags & TalkedToPlayer; - cStats.mAttacked = acdt.mFlags & Attacked; + cStats.mTalkedTo = (acdt.mFlags & TalkedToPlayer) != 0; + cStats.mAttacked = (acdt.mFlags & Attacked) != 0; } void convertACSC (const ACSC& acsc, ESM::CreatureStats& cStats) { - cStats.mDead = acsc.mFlags & Dead; + cStats.mDead = (acsc.mFlags & Dead) != 0; } void convertNpcData (const ActorData& actorData, ESM::NpcStats& npcStats) diff --git a/apps/essimporter/importcellref.cpp b/apps/essimporter/importcellref.cpp index cca356b2a8..442a7781c7 100644 --- a/apps/essimporter/importcellref.cpp +++ b/apps/essimporter/importcellref.cpp @@ -43,7 +43,7 @@ namespace ESSImport { unsigned int deleted; esm.getHT(deleted); - mDeleted = (deleted >> 24) & 0x2; // the other 3 bytes seem to be uninitialized garbage + mDeleted = ((deleted >> 24) & 0x2) != 0; // the other 3 bytes seem to be uninitialized garbage } if (esm.isNextSub("MVRF")) diff --git a/apps/mwiniimporter/main.cpp b/apps/mwiniimporter/main.cpp index 3c48fedc9a..a3f115fcf5 100644 --- a/apps/mwiniimporter/main.cpp +++ b/apps/mwiniimporter/main.cpp @@ -110,7 +110,7 @@ int wmain(int argc, wchar_t *wargv[]) { std::cerr << "cfg file does not exist" << std::endl; MwIniImporter importer; - importer.setVerbose(vm.count("verbose")); + importer.setVerbose(vm.count("verbose") != 0); // Font encoding settings std::string encoding(vm["encoding"].as()); diff --git a/apps/openmw/mwbase/soundmanager.hpp b/apps/openmw/mwbase/soundmanager.hpp index f3381a8fda..e71558de0b 100644 --- a/apps/openmw/mwbase/soundmanager.hpp +++ b/apps/openmw/mwbase/soundmanager.hpp @@ -20,7 +20,7 @@ namespace MWWorld namespace MWSound { class Sound; - class Sound_Decoder; + struct Sound_Decoder; typedef boost::shared_ptr DecoderPtr; } diff --git a/apps/openmw/mwbase/world.hpp b/apps/openmw/mwbase/world.hpp index 9eb272e1b8..56f575d3ac 100644 --- a/apps/openmw/mwbase/world.hpp +++ b/apps/openmw/mwbase/world.hpp @@ -49,7 +49,7 @@ namespace MWRender namespace MWMechanics { - class Movement; + struct Movement; } namespace MWWorld diff --git a/apps/openmw/mwclass/apparatus.cpp b/apps/openmw/mwclass/apparatus.cpp index 316ba3ab6e..2abd071bd0 100644 --- a/apps/openmw/mwclass/apparatus.cpp +++ b/apps/openmw/mwclass/apparatus.cpp @@ -155,7 +155,7 @@ namespace MWClass bool Apparatus::canSell (const MWWorld::Ptr& item, int npcServices) const { - return npcServices & ESM::NPC::Apparatus; + return (npcServices & ESM::NPC::Apparatus) != 0; } float Apparatus::getWeight(const MWWorld::Ptr &ptr) const diff --git a/apps/openmw/mwclass/creature.cpp b/apps/openmw/mwclass/creature.cpp index e44f4ffc12..c59f8428cd 100644 --- a/apps/openmw/mwclass/creature.cpp +++ b/apps/openmw/mwclass/creature.cpp @@ -164,7 +164,7 @@ namespace MWClass MWWorld::LiveCellRef *ref = ptr.get(); MWRender::Actors& actors = renderingInterface.getActors(); - actors.insertCreature(ptr, model, ref->mBase->mFlags & ESM::Creature::Weapon); + actors.insertCreature(ptr, model, (ref->mBase->mFlags & ESM::Creature::Weapon) != 0); } void Creature::insertObject(const MWWorld::Ptr& ptr, const std::string& model, MWWorld::PhysicsSystem& physics) const @@ -493,7 +493,7 @@ namespace MWClass { MWWorld::LiveCellRef *ref = ptr.get(); - return (ref->mBase->mFlags & ESM::Creature::Weapon); + return (ref->mBase->mFlags & ESM::Creature::Weapon) != 0; } std::string Creature::getScript (const MWWorld::Ptr& ptr) const @@ -508,7 +508,7 @@ namespace MWClass MWWorld::LiveCellRef *ref = ptr.get(); - return ref->mBase->mFlags & ESM::Creature::Essential; + return (ref->mBase->mFlags & ESM::Creature::Essential) != 0; } void Creature::registerSelf() @@ -713,7 +713,7 @@ namespace MWClass MWWorld::LiveCellRef *ref = ptr.get(); - return ref->mBase->mFlags & ESM::Creature::Flies; + return (ref->mBase->mFlags & ESM::Creature::Flies) != 0; } bool Creature::canSwim(const MWWorld::Ptr &ptr) const diff --git a/apps/openmw/mwclass/ingredient.cpp b/apps/openmw/mwclass/ingredient.cpp index 9f662a60ea..de43e818e9 100644 --- a/apps/openmw/mwclass/ingredient.cpp +++ b/apps/openmw/mwclass/ingredient.cpp @@ -192,7 +192,7 @@ namespace MWClass bool Ingredient::canSell (const MWWorld::Ptr& item, int npcServices) const { - return npcServices & ESM::NPC::Ingredients; + return (npcServices & ESM::NPC::Ingredients) != 0; } diff --git a/apps/openmw/mwclass/light.cpp b/apps/openmw/mwclass/light.cpp index 35a21b63e4..032c402378 100644 --- a/apps/openmw/mwclass/light.cpp +++ b/apps/openmw/mwclass/light.cpp @@ -50,7 +50,7 @@ namespace MWClass assert (ref->mBase != NULL); if(!model.empty()) - physics.addObject(ptr, model, ref->mBase->mData.mFlags & ESM::Light::Carry); + physics.addObject(ptr, model, (ref->mBase->mData.mFlags & ESM::Light::Carry) != 0); if (!ref->mBase->mSound.empty() && !(ref->mBase->mData.mFlags & ESM::Light::OffDefault)) MWBase::Environment::get().getSoundManager()->playSound3D(ptr, ref->mBase->mSound, 1.0, 1.0, @@ -221,7 +221,7 @@ namespace MWClass bool Light::canSell (const MWWorld::Ptr& item, int npcServices) const { - return npcServices & ESM::NPC::Lights; + return (npcServices & ESM::NPC::Lights) != 0; } float Light::getWeight(const MWWorld::Ptr &ptr) const diff --git a/apps/openmw/mwclass/lockpick.cpp b/apps/openmw/mwclass/lockpick.cpp index e78c43eee3..478c50301d 100644 --- a/apps/openmw/mwclass/lockpick.cpp +++ b/apps/openmw/mwclass/lockpick.cpp @@ -173,7 +173,7 @@ namespace MWClass bool Lockpick::canSell (const MWWorld::Ptr& item, int npcServices) const { - return npcServices & ESM::NPC::Picks; + return (npcServices & ESM::NPC::Picks) != 0; } int Lockpick::getItemMaxHealth (const MWWorld::Ptr& ptr) const diff --git a/apps/openmw/mwclass/misc.cpp b/apps/openmw/mwclass/misc.cpp index f9cfd8e0b6..f5daafeec2 100644 --- a/apps/openmw/mwclass/misc.cpp +++ b/apps/openmw/mwclass/misc.cpp @@ -259,7 +259,7 @@ namespace MWClass { MWWorld::LiveCellRef *ref = ptr.get(); - return ref->mBase->mData.mIsKey; + return ref->mBase->mData.mIsKey != 0; } } diff --git a/apps/openmw/mwclass/npc.cpp b/apps/openmw/mwclass/npc.cpp index 52e5a0a957..d06d7cfe1e 100644 --- a/apps/openmw/mwclass/npc.cpp +++ b/apps/openmw/mwclass/npc.cpp @@ -993,7 +993,7 @@ namespace MWClass MWWorld::LiveCellRef *ref = ptr.get(); - return ref->mBase->mFlags & ESM::NPC::Essential; + return (ref->mBase->mFlags & ESM::NPC::Essential) != 0; } void Npc::registerSelf() diff --git a/apps/openmw/mwclass/npc.hpp b/apps/openmw/mwclass/npc.hpp index 9aece7368c..c00665eb39 100644 --- a/apps/openmw/mwclass/npc.hpp +++ b/apps/openmw/mwclass/npc.hpp @@ -5,7 +5,7 @@ namespace ESM { - class GameSetting; + struct GameSetting; } namespace MWClass diff --git a/apps/openmw/mwclass/potion.cpp b/apps/openmw/mwclass/potion.cpp index bd06f89fc8..ee299ab4f8 100644 --- a/apps/openmw/mwclass/potion.cpp +++ b/apps/openmw/mwclass/potion.cpp @@ -185,7 +185,7 @@ namespace MWClass bool Potion::canSell (const MWWorld::Ptr& item, int npcServices) const { - return npcServices & ESM::NPC::Potions; + return (npcServices & ESM::NPC::Potions) != 0; } float Potion::getWeight(const MWWorld::Ptr &ptr) const diff --git a/apps/openmw/mwclass/probe.cpp b/apps/openmw/mwclass/probe.cpp index a11725f267..da22e9be6c 100644 --- a/apps/openmw/mwclass/probe.cpp +++ b/apps/openmw/mwclass/probe.cpp @@ -172,7 +172,7 @@ namespace MWClass bool Probe::canSell (const MWWorld::Ptr& item, int npcServices) const { - return npcServices & ESM::NPC::Probes; + return (npcServices & ESM::NPC::Probes) != 0; } int Probe::getItemMaxHealth (const MWWorld::Ptr& ptr) const diff --git a/apps/openmw/mwclass/repair.cpp b/apps/openmw/mwclass/repair.cpp index e9c4ac9b19..c02146f122 100644 --- a/apps/openmw/mwclass/repair.cpp +++ b/apps/openmw/mwclass/repair.cpp @@ -172,7 +172,7 @@ namespace MWClass bool Repair::canSell (const MWWorld::Ptr& item, int npcServices) const { - return npcServices & ESM::NPC::RepairItem; + return (npcServices & ESM::NPC::RepairItem) != 0; } float Repair::getWeight(const MWWorld::Ptr &ptr) const diff --git a/apps/openmw/mwgui/bookpage.cpp b/apps/openmw/mwgui/bookpage.cpp index c9cfc8c2c1..57e1716598 100644 --- a/apps/openmw/mwgui/bookpage.cpp +++ b/apps/openmw/mwgui/bookpage.cpp @@ -16,8 +16,8 @@ namespace MWGui { struct TypesetBookImpl; -struct PageDisplay; -struct BookPageImpl; +class PageDisplay; +class BookPageImpl; static bool ucsSpace (int codePoint); static bool ucsLineBreak (int codePoint); diff --git a/apps/openmw/mwgui/savegamedialog.hpp b/apps/openmw/mwgui/savegamedialog.hpp index 11470a20f3..2192adbdec 100644 --- a/apps/openmw/mwgui/savegamedialog.hpp +++ b/apps/openmw/mwgui/savegamedialog.hpp @@ -6,7 +6,7 @@ namespace MWState { class Character; - class Slot; + struct Slot; } namespace MWGui diff --git a/apps/openmw/mwgui/spellcreationdialog.cpp b/apps/openmw/mwgui/spellcreationdialog.cpp index f4c9d021a5..2757b7cae3 100644 --- a/apps/openmw/mwgui/spellcreationdialog.cpp +++ b/apps/openmw/mwgui/spellcreationdialog.cpp @@ -114,7 +114,7 @@ namespace MWGui void EditEffectDialog::newEffect (const ESM::MagicEffect *effect) { - bool allowSelf = effect->mData.mFlags & ESM::MagicEffect::CastSelf; + bool allowSelf = (effect->mData.mFlags & ESM::MagicEffect::CastSelf) != 0; bool allowTouch = (effect->mData.mFlags & ESM::MagicEffect::CastTouch) && !mConstantEffect; bool allowTarget = (effect->mData.mFlags & ESM::MagicEffect::CastTarget) && !mConstantEffect; @@ -226,7 +226,7 @@ namespace MWGui // cycle through range types until we find something that's allowed // does not handle the case where nothing is allowed (this should be prevented before opening the Add Effect dialog) - bool allowSelf = mMagicEffect->mData.mFlags & ESM::MagicEffect::CastSelf; + bool allowSelf = (mMagicEffect->mData.mFlags & ESM::MagicEffect::CastSelf) != 0; bool allowTouch = (mMagicEffect->mData.mFlags & ESM::MagicEffect::CastTouch) && !mConstantEffect; bool allowTarget = (mMagicEffect->mData.mFlags & ESM::MagicEffect::CastTarget) && !mConstantEffect; if (mEffect.mRange == ESM::RT_Self && !allowSelf) diff --git a/apps/openmw/mwgui/tooltips.hpp b/apps/openmw/mwgui/tooltips.hpp index 4bd4d88aa2..71b4a560f5 100644 --- a/apps/openmw/mwgui/tooltips.hpp +++ b/apps/openmw/mwgui/tooltips.hpp @@ -9,7 +9,7 @@ namespace ESM { - class Class; + struct Class; struct Race; } diff --git a/apps/openmw/mwgui/widgets.cpp b/apps/openmw/mwgui/widgets.cpp index 26fe315679..79c0f93f01 100644 --- a/apps/openmw/mwgui/widgets.cpp +++ b/apps/openmw/mwgui/widgets.cpp @@ -239,7 +239,7 @@ namespace MWGui params.mMagnMin = it->mMagnMin; params.mMagnMax = it->mMagnMax; params.mRange = it->mRange; - params.mIsConstant = (flags & MWEffectList::EF_Constant); + params.mIsConstant = (flags & MWEffectList::EF_Constant) != 0; params.mNoTarget = (flags & MWEffectList::EF_NoTarget); effect->setSpellEffect(params); effects.push_back(effect); diff --git a/apps/openmw/mwgui/windowmanagerimp.cpp b/apps/openmw/mwgui/windowmanagerimp.cpp index c74cff31c0..d8074a5d88 100644 --- a/apps/openmw/mwgui/windowmanagerimp.cpp +++ b/apps/openmw/mwgui/windowmanagerimp.cpp @@ -565,11 +565,11 @@ namespace MWGui int eff = mShown & mAllowed & ~mForceHidden; // Show the windows we want - mMap ->setVisible(eff & GW_Map); - mStatsWindow ->setVisible(eff & GW_Stats); - mInventoryWindow->setVisible(eff & GW_Inventory); + mMap ->setVisible((eff & GW_Map) != 0); + mStatsWindow ->setVisible((eff & GW_Stats) != 0); + mInventoryWindow->setVisible((eff & GW_Inventory) != 0); mInventoryWindow->setGuiMode(mode); - mSpellWindow ->setVisible(eff & GW_Magic); + mSpellWindow ->setVisible((eff & GW_Magic) != 0); break; } case GM_Container: @@ -1301,7 +1301,7 @@ namespace MWGui bool WindowManager::isAllowed (GuiWindow wnd) const { - return mAllowed & wnd; + return (mAllowed & wnd) != 0; } void WindowManager::allow (GuiWindow wnd) diff --git a/apps/openmw/mwgui/windowmanagerimp.hpp b/apps/openmw/mwgui/windowmanagerimp.hpp index 735b02d2d6..fbbc295b34 100644 --- a/apps/openmw/mwgui/windowmanagerimp.hpp +++ b/apps/openmw/mwgui/windowmanagerimp.hpp @@ -65,7 +65,7 @@ namespace MWGui class MainMenu; class StatsWindow; class InventoryWindow; - class JournalWindow; + struct JournalWindow; class CharacterCreation; class DragAndDrop; class ToolTips; @@ -277,7 +277,7 @@ namespace MWGui virtual void enableRest() { mRestAllowed = true; } virtual bool getRestEnabled(); - virtual bool getJournalAllowed() { return (mAllowed & GW_Magic); } + virtual bool getJournalAllowed() { return (mAllowed & GW_Magic) != 0; } virtual bool getPlayerSleeping(); virtual void wakeUpPlayer(); diff --git a/apps/openmw/mwinput/inputmanagerimp.cpp b/apps/openmw/mwinput/inputmanagerimp.cpp index 284919f643..04d79cd9ef 100644 --- a/apps/openmw/mwinput/inputmanagerimp.cpp +++ b/apps/openmw/mwinput/inputmanagerimp.cpp @@ -250,7 +250,7 @@ namespace MWInput if (mControlSwitch["playercontrols"]) { if (action == A_Use) - mPlayer->getPlayer().getClass().getCreatureStats(mPlayer->getPlayer()).setAttackingOrSpell(currentValue); + mPlayer->getPlayer().getClass().getCreatureStats(mPlayer->getPlayer()).setAttackingOrSpell(currentValue != 0); else if (action == A_Jump) mAttemptJump = (currentValue == 1.0 && previousValue == 0.0); } diff --git a/apps/openmw/mwinput/inputmanagerimp.hpp b/apps/openmw/mwinput/inputmanagerimp.hpp index c533296ff4..39091b7b11 100644 --- a/apps/openmw/mwinput/inputmanagerimp.hpp +++ b/apps/openmw/mwinput/inputmanagerimp.hpp @@ -39,7 +39,7 @@ namespace ICS namespace MyGUI { - class MouseButton; + struct MouseButton; } namespace Files diff --git a/apps/openmw/mwmechanics/aipackage.hpp b/apps/openmw/mwmechanics/aipackage.hpp index 80b48fc378..179ae440bb 100644 --- a/apps/openmw/mwmechanics/aipackage.hpp +++ b/apps/openmw/mwmechanics/aipackage.hpp @@ -16,7 +16,7 @@ namespace ESM { namespace AiSequence { - class AiSequence; + struct AiSequence; } } diff --git a/apps/openmw/mwmechanics/aisequence.cpp b/apps/openmw/mwmechanics/aisequence.cpp index 533bcd17cc..bb078f8834 100644 --- a/apps/openmw/mwmechanics/aisequence.cpp +++ b/apps/openmw/mwmechanics/aisequence.cpp @@ -294,7 +294,7 @@ void AiSequence::fill(const ESM::AIPackageList &list) idles.reserve(8); for (int i=0; i<8; ++i) idles.push_back(data.mIdle[i]); - package = new MWMechanics::AiWander(data.mDistance, data.mDuration, data.mTimeOfDay, idles, data.mShouldRepeat); + package = new MWMechanics::AiWander(data.mDistance, data.mDuration, data.mTimeOfDay, idles, data.mShouldRepeat != 0); } else if (it->mType == ESM::AI_Escort) { diff --git a/apps/openmw/mwmechanics/aisequence.hpp b/apps/openmw/mwmechanics/aisequence.hpp index e43ce72f1f..19f1e14545 100644 --- a/apps/openmw/mwmechanics/aisequence.hpp +++ b/apps/openmw/mwmechanics/aisequence.hpp @@ -15,7 +15,7 @@ namespace ESM { namespace AiSequence { - class AiSequence; + struct AiSequence; } } diff --git a/apps/openmw/mwmechanics/aiwander.cpp b/apps/openmw/mwmechanics/aiwander.cpp index fbb147b341..738facb135 100644 --- a/apps/openmw/mwmechanics/aiwander.cpp +++ b/apps/openmw/mwmechanics/aiwander.cpp @@ -785,7 +785,7 @@ namespace MWMechanics , mDuration(wander->mData.mDuration) , mStartTime(MWWorld::TimeStamp(wander->mStartTime)) , mTimeOfDay(wander->mData.mTimeOfDay) - , mRepeat(wander->mData.mShouldRepeat) + , mRepeat(wander->mData.mShouldRepeat != 0) , mStoredInitialActorPosition(wander->mStoredInitialActorPosition) { if (mStoredInitialActorPosition) diff --git a/apps/openmw/mwmechanics/aiwander.hpp b/apps/openmw/mwmechanics/aiwander.hpp index 5e1b418139..54e215cb9c 100644 --- a/apps/openmw/mwmechanics/aiwander.hpp +++ b/apps/openmw/mwmechanics/aiwander.hpp @@ -17,7 +17,7 @@ namespace ESM { - class Cell; + struct Cell; namespace AiSequence { struct AiWander; diff --git a/apps/openmw/mwmechanics/alchemy.cpp b/apps/openmw/mwmechanics/alchemy.cpp index f3d376a700..6e54b6f835 100644 --- a/apps/openmw/mwmechanics/alchemy.cpp +++ b/apps/openmw/mwmechanics/alchemy.cpp @@ -67,7 +67,7 @@ void MWMechanics::Alchemy::applyTools (int flags, float& value) const { bool magnitude = !(flags & ESM::MagicEffect::NoMagnitude); bool duration = !(flags & ESM::MagicEffect::NoDuration); - bool negative = flags & (ESM::MagicEffect::Harmful); + bool negative = (flags & ESM::MagicEffect::Harmful) != 0; int tool = negative ? ESM::Apparatus::Retort : ESM::Apparatus::Albemic; diff --git a/apps/openmw/mwmechanics/character.hpp b/apps/openmw/mwmechanics/character.hpp index 8a77494b97..da74b2a33f 100644 --- a/apps/openmw/mwmechanics/character.hpp +++ b/apps/openmw/mwmechanics/character.hpp @@ -21,7 +21,7 @@ namespace MWRender namespace MWMechanics { -class Movement; +struct Movement; class CreatureStats; enum Priority { diff --git a/apps/openmw/mwmechanics/creaturestats.cpp b/apps/openmw/mwmechanics/creaturestats.cpp index 05ea9fb5e4..1947ad8397 100644 --- a/apps/openmw/mwmechanics/creaturestats.cpp +++ b/apps/openmw/mwmechanics/creaturestats.cpp @@ -439,7 +439,7 @@ namespace MWMechanics bool CreatureStats::getMovementFlag (Flag flag) const { - return mMovementFlags & flag; + return (mMovementFlags & flag) != 0; } void CreatureStats::setMovementFlag (Flag flag, bool state) diff --git a/apps/openmw/mwmechanics/levelledlist.hpp b/apps/openmw/mwmechanics/levelledlist.hpp index 691996410c..db13c1a45a 100644 --- a/apps/openmw/mwmechanics/levelledlist.hpp +++ b/apps/openmw/mwmechanics/levelledlist.hpp @@ -35,7 +35,7 @@ namespace MWMechanics } // For levelled creatures, the flags are swapped. This file format just makes so much sense. - bool allLevels = levItem->mFlags & ESM::ItemLevList::AllLevels; + bool allLevels = (levItem->mFlags & ESM::ItemLevList::AllLevels) != 0; if (creature) allLevels = levItem->mFlags & ESM::CreatureLevList::AllLevels; diff --git a/apps/openmw/mwmechanics/pathgrid.hpp b/apps/openmw/mwmechanics/pathgrid.hpp index 2742957a68..67fbacdeda 100644 --- a/apps/openmw/mwmechanics/pathgrid.hpp +++ b/apps/openmw/mwmechanics/pathgrid.hpp @@ -6,7 +6,7 @@ namespace ESM { - class Cell; + struct Cell; } namespace MWWorld diff --git a/apps/openmw/mwmechanics/spellcasting.cpp b/apps/openmw/mwmechanics/spellcasting.cpp index b91ea99840..06a3c1dfd9 100644 --- a/apps/openmw/mwmechanics/spellcasting.cpp +++ b/apps/openmw/mwmechanics/spellcasting.cpp @@ -573,7 +573,7 @@ namespace MWMechanics castStatic = MWBase::Environment::get().getWorld()->getStore().get().find ("VFX_DefaultHit"); // TODO: VFX are no longer active after saving/reloading the game - bool loop = magicEffect->mData.mFlags & ESM::MagicEffect::ContinuousVfx; + bool loop = (magicEffect->mData.mFlags & ESM::MagicEffect::ContinuousVfx) != 0; // Note: in case of non actor, a free effect should be fine as well MWRender::Animation* anim = MWBase::Environment::get().getWorld()->getAnimation(target); if (anim) diff --git a/apps/openmw/mwmechanics/spellcasting.hpp b/apps/openmw/mwmechanics/spellcasting.hpp index dca4f0192f..f50584edf2 100644 --- a/apps/openmw/mwmechanics/spellcasting.hpp +++ b/apps/openmw/mwmechanics/spellcasting.hpp @@ -17,7 +17,7 @@ namespace ESM namespace MWMechanics { - class EffectKey; + struct EffectKey; class MagicEffects; ESM::Skill::SkillEnum spellSchoolToSkill(int school); diff --git a/apps/openmw/mwrender/globalmap.hpp b/apps/openmw/mwrender/globalmap.hpp index b3ae85b115..a162ab68fb 100644 --- a/apps/openmw/mwrender/globalmap.hpp +++ b/apps/openmw/mwrender/globalmap.hpp @@ -12,7 +12,7 @@ namespace Loading namespace ESM { - class GlobalMap; + struct GlobalMap; } namespace MWRender diff --git a/apps/openmw/mwrender/localmap.hpp b/apps/openmw/mwrender/localmap.hpp index 7cfa388146..014c67f164 100644 --- a/apps/openmw/mwrender/localmap.hpp +++ b/apps/openmw/mwrender/localmap.hpp @@ -14,7 +14,7 @@ namespace MWWorld namespace ESM { - class FogTexture; + struct FogTexture; } namespace MWRender diff --git a/apps/openmw/mwrender/npcanimation.cpp b/apps/openmw/mwrender/npcanimation.cpp index 66ba25859f..a2ad1e02c2 100644 --- a/apps/openmw/mwrender/npcanimation.cpp +++ b/apps/openmw/mwrender/npcanimation.cpp @@ -377,7 +377,7 @@ void NpcAnimation::updateParts() }; static const size_t slotlistsize = sizeof(slotlist)/sizeof(slotlist[0]); - bool wasArrowAttached = (mAmmunition.get()); + bool wasArrowAttached = (mAmmunition.get() != NULL); MWWorld::InventoryStore& inv = mPtr.getClass().getInventoryStore(mPtr); for(size_t i = 0;i < slotlistsize && mViewMode != VM_HeadOnly;i++) @@ -941,7 +941,7 @@ void NpcAnimation::permanentEffectAdded(const ESM::MagicEffect *magicEffect, boo if (!magicEffect->mHit.empty()) { const ESM::Static* castStatic = MWBase::Environment::get().getWorld()->getStore().get().find (magicEffect->mHit); - bool loop = magicEffect->mData.mFlags & ESM::MagicEffect::ContinuousVfx; + bool loop = (magicEffect->mData.mFlags & ESM::MagicEffect::ContinuousVfx) != 0; // Don't play particle VFX unless the effect is new or it should be looping. if (isNew || loop) addEffect("meshes\\" + castStatic->mModel, magicEffect->mIndex, loop, ""); diff --git a/apps/openmw/mwscript/globalscripts.hpp b/apps/openmw/mwscript/globalscripts.hpp index 9f009db98f..9b7aa0514e 100644 --- a/apps/openmw/mwscript/globalscripts.hpp +++ b/apps/openmw/mwscript/globalscripts.hpp @@ -21,7 +21,7 @@ namespace Loading namespace MWWorld { - struct ESMStore; + class ESMStore; } namespace MWScript diff --git a/apps/openmw/mwscript/interpretercontext.hpp b/apps/openmw/mwscript/interpretercontext.hpp index 698df62c2a..d3841befdf 100644 --- a/apps/openmw/mwscript/interpretercontext.hpp +++ b/apps/openmw/mwscript/interpretercontext.hpp @@ -20,7 +20,7 @@ namespace MWInput namespace MWScript { - struct Locals; + class Locals; class InterpreterContext : public Interpreter::Context { diff --git a/apps/openmw/mwscript/locals.hpp b/apps/openmw/mwscript/locals.hpp index bd95835ac1..a9fcf317c8 100644 --- a/apps/openmw/mwscript/locals.hpp +++ b/apps/openmw/mwscript/locals.hpp @@ -7,7 +7,7 @@ namespace ESM { - struct Script; + class Script; struct Locals; } diff --git a/apps/openmw/mwscript/miscextensions.cpp b/apps/openmw/mwscript/miscextensions.cpp index 507b278076..e0e61fedff 100644 --- a/apps/openmw/mwscript/miscextensions.cpp +++ b/apps/openmw/mwscript/miscextensions.cpp @@ -81,7 +81,7 @@ namespace MWScript std::string name = runtime.getStringLiteral (runtime[0].mInteger); runtime.pop(); - bool allowSkipping = runtime[0].mInteger; + bool allowSkipping = runtime[0].mInteger != 0; runtime.pop(); MWBase::Environment::get().getWindowManager()->playVideo (name, allowSkipping); diff --git a/apps/openmw/mwscript/scriptmanagerimp.hpp b/apps/openmw/mwscript/scriptmanagerimp.hpp index 6026f6aba2..e4a123b864 100644 --- a/apps/openmw/mwscript/scriptmanagerimp.hpp +++ b/apps/openmw/mwscript/scriptmanagerimp.hpp @@ -16,7 +16,7 @@ namespace MWWorld { - struct ESMStore; + class ESMStore; } namespace Compiler diff --git a/apps/openmw/mwsound/openal_output.hpp b/apps/openmw/mwsound/openal_output.hpp index be12bfbecb..1a95d61505 100644 --- a/apps/openmw/mwsound/openal_output.hpp +++ b/apps/openmw/mwsound/openal_output.hpp @@ -69,7 +69,7 @@ namespace MWSound OpenAL_Output(SoundManager &mgr); virtual ~OpenAL_Output(); - class StreamThread; + struct StreamThread; std::auto_ptr mStreamThread; friend class OpenAL_Sound; diff --git a/apps/openmw/mwsound/sound_output.hpp b/apps/openmw/mwsound/sound_output.hpp index a9a999a5cb..4f5c210bbe 100644 --- a/apps/openmw/mwsound/sound_output.hpp +++ b/apps/openmw/mwsound/sound_output.hpp @@ -13,7 +13,7 @@ namespace MWSound { class SoundManager; - class Sound_Decoder; + struct Sound_Decoder; class Sound; class Sound_Output diff --git a/apps/openmw/mwworld/localscripts.hpp b/apps/openmw/mwworld/localscripts.hpp index 840243fffc..9d612cb33c 100644 --- a/apps/openmw/mwworld/localscripts.hpp +++ b/apps/openmw/mwworld/localscripts.hpp @@ -8,7 +8,7 @@ namespace MWWorld { - struct ESMStore; + class ESMStore; class CellStore; class RefData; diff --git a/apps/openmw/mwworld/ptr.hpp b/apps/openmw/mwworld/ptr.hpp index 4d928dacf1..c97d2e6d1e 100644 --- a/apps/openmw/mwworld/ptr.hpp +++ b/apps/openmw/mwworld/ptr.hpp @@ -12,7 +12,7 @@ namespace MWWorld { class ContainerStore; class CellStore; - class LiveCellRefBase; + struct LiveCellRefBase; /// \brief Pointer to a LiveCellRef diff --git a/apps/openmw/mwworld/refdata.cpp b/apps/openmw/mwworld/refdata.cpp index c2a5e5f837..14a315a81b 100644 --- a/apps/openmw/mwworld/refdata.cpp +++ b/apps/openmw/mwworld/refdata.cpp @@ -59,7 +59,7 @@ namespace MWWorld } RefData::RefData (const ESM::ObjectState& objectState) - : mBaseNode (0), mHasLocals (false), mEnabled (objectState.mEnabled), + : mBaseNode (0), mHasLocals (false), mEnabled (objectState.mEnabled != 0), mCount (objectState.mCount), mPosition (objectState.mPosition), mCustomData (0), mChanged(true), // Loading from a savegame -> assume changed mDeleted(false) diff --git a/apps/openmw/mwworld/timestamp.hpp b/apps/openmw/mwworld/timestamp.hpp index 54cd40baf7..36d11cee06 100644 --- a/apps/openmw/mwworld/timestamp.hpp +++ b/apps/openmw/mwworld/timestamp.hpp @@ -3,7 +3,7 @@ namespace ESM { - class TimeStamp; + struct TimeStamp; } namespace MWWorld diff --git a/components/esm/loadcrea.cpp b/components/esm/loadcrea.cpp index 2e9f924b7c..86eede34e5 100644 --- a/components/esm/loadcrea.cpp +++ b/components/esm/loadcrea.cpp @@ -10,7 +10,7 @@ namespace ESM { void Creature::load(ESMReader &esm) { - mPersistent = esm.getRecordFlags() & 0x0400; + mPersistent = (esm.getRecordFlags() & 0x0400) != 0; mAiPackage.mList.clear(); mInventory.mList.clear(); diff --git a/components/esm/loadnpc.cpp b/components/esm/loadnpc.cpp index d90b4816dd..98cedbe426 100644 --- a/components/esm/loadnpc.cpp +++ b/components/esm/loadnpc.cpp @@ -10,7 +10,7 @@ namespace ESM void NPC::load(ESMReader &esm) { - mPersistent = esm.getRecordFlags() & 0x0400; + mPersistent = (esm.getRecordFlags() & 0x0400) != 0; mSpells.mList.clear(); mInventory.mList.clear(); diff --git a/components/esm/loadstat.cpp b/components/esm/loadstat.cpp index 2bb817332d..ed90b04751 100644 --- a/components/esm/loadstat.cpp +++ b/components/esm/loadstat.cpp @@ -10,7 +10,7 @@ namespace ESM void Static::load(ESMReader &esm) { - mPersistent = esm.getRecordFlags() & 0x0400; + mPersistent = (esm.getRecordFlags() & 0x0400) != 0; mModel = esm.getHNString("MODL"); } diff --git a/components/nif/data.hpp b/components/nif/data.hpp index d9de12fb54..1fa94d9c2a 100644 --- a/components/nif/data.hpp +++ b/components/nif/data.hpp @@ -234,7 +234,7 @@ class NiVisData : public Record public: struct VisData { float time; - char isSet; + bool isSet; }; std::vector mVis; @@ -245,7 +245,7 @@ public: for(size_t i = 0;i < mVis.size();i++) { mVis[i].time = nif->getFloat(); - mVis[i].isSet = nif->getChar(); + mVis[i].isSet = nif->getChar() != 0; } } }; diff --git a/components/nif/node.hpp b/components/nif/node.hpp index a26480d591..e6edf64320 100644 --- a/components/nif/node.hpp +++ b/components/nif/node.hpp @@ -14,7 +14,7 @@ namespace Nif { -class NiNode; +struct NiNode; /** A Node is an object that's part of the main NIF tree. It has parent node (unless it's the root), and transformation (location diff --git a/components/nif/recordptr.hpp b/components/nif/recordptr.hpp index 5eac277d02..25beaf098b 100644 --- a/components/nif/recordptr.hpp +++ b/components/nif/recordptr.hpp @@ -122,10 +122,10 @@ class Controller; class Controlled; class NiSkinData; class NiFloatData; -class NiMorphData; +struct NiMorphData; class NiPixelData; class NiColorData; -class NiKeyframeData; +struct NiKeyframeData; class NiTriShapeData; class NiSkinInstance; class NiSourceTexture; diff --git a/components/nifbullet/bulletnifloader.hpp b/components/nifbullet/bulletnifloader.hpp index 56d98834da..0d81d84b6b 100644 --- a/components/nifbullet/bulletnifloader.hpp +++ b/components/nifbullet/bulletnifloader.hpp @@ -38,8 +38,8 @@ namespace Nif { class Node; - class Transformation; - class NiTriShape; + struct Transformation; + struct NiTriShape; } namespace NifBullet diff --git a/components/nifogre/mesh.hpp b/components/nifogre/mesh.hpp index 731e49c903..69b3f2f78b 100644 --- a/components/nifogre/mesh.hpp +++ b/components/nifogre/mesh.hpp @@ -10,7 +10,7 @@ namespace Nif { - class NiTriShape; + struct NiTriShape; } namespace NifOgre diff --git a/components/nifogre/ogrenifloader.cpp b/components/nifogre/ogrenifloader.cpp index 17df7a3cdc..0009c9f836 100644 --- a/components/nifogre/ogrenifloader.cpp +++ b/components/nifogre/ogrenifloader.cpp @@ -379,7 +379,7 @@ public: return mData.back().isSet; } - static void setVisible(Ogre::Node *node, int vis) + static void setVisible(Ogre::Node *node, bool vis) { // Skinned meshes are attached to the scene node, not the bone. // We use the Node's user data to connect it with the mesh. @@ -746,16 +746,17 @@ private: { if (ctrl->flags & Nif::NiNode::ControllerFlag_Active) { + bool isAnimationAutoPlay = (animflags & Nif::NiNode::AnimFlag_AutoPlay) != 0; if(ctrl->recType == Nif::RC_NiUVController) { const Nif::NiUVController *uv = static_cast(ctrl.getPtr()); - Ogre::ControllerValueRealPtr srcval((animflags&Nif::NiNode::AnimFlag_AutoPlay) ? + Ogre::ControllerValueRealPtr srcval(isAnimationAutoPlay ? Ogre::ControllerManager::getSingleton().getFrameTimeSource() : Ogre::ControllerValueRealPtr()); Ogre::ControllerValueRealPtr dstval(OGRE_NEW UVController::Value(entity, uv->data.getPtr(), &scene->mMaterialControllerMgr)); - UVController::Function* function = OGRE_NEW UVController::Function(uv, (animflags&Nif::NiNode::AnimFlag_AutoPlay)); + UVController::Function* function = OGRE_NEW UVController::Function(uv, isAnimationAutoPlay); scene->mMaxControllerLength = std::max(function->mStopTime, scene->mMaxControllerLength); Ogre::ControllerFunctionRealPtr func(function); @@ -765,13 +766,13 @@ private: { const Nif::NiGeomMorpherController *geom = static_cast(ctrl.getPtr()); - Ogre::ControllerValueRealPtr srcval((animflags&Nif::NiNode::AnimFlag_AutoPlay) ? + Ogre::ControllerValueRealPtr srcval(isAnimationAutoPlay ? Ogre::ControllerManager::getSingleton().getFrameTimeSource() : Ogre::ControllerValueRealPtr()); Ogre::ControllerValueRealPtr dstval(OGRE_NEW GeomMorpherController::Value( entity, geom->data.getPtr(), geom->recIndex)); - GeomMorpherController::Function* function = OGRE_NEW GeomMorpherController::Function(geom, (animflags&Nif::NiNode::AnimFlag_AutoPlay)); + GeomMorpherController::Function* function = OGRE_NEW GeomMorpherController::Function(geom, isAnimationAutoPlay); scene->mMaxControllerLength = std::max(function->mStopTime, scene->mMaxControllerLength); Ogre::ControllerFunctionRealPtr func(function); @@ -796,7 +797,8 @@ private: const Nif::NiStencilProperty *stencilprop = NULL; node->getProperties(texprop, matprop, alphaprop, vertprop, zprop, specprop, wireprop, stencilprop); - Ogre::ControllerValueRealPtr srcval((animflags&Nif::NiNode::AnimFlag_AutoPlay) ? + bool isAnimationAutoPlay = (animflags & Nif::NiNode::AnimFlag_AutoPlay) != 0; + Ogre::ControllerValueRealPtr srcval(isAnimationAutoPlay ? Ogre::ControllerManager::getSingleton().getFrameTimeSource() : Ogre::ControllerValueRealPtr()); @@ -809,7 +811,7 @@ private: { const Nif::NiAlphaController *alphaCtrl = static_cast(ctrls.getPtr()); Ogre::ControllerValueRealPtr dstval(OGRE_NEW AlphaController::Value(movable, alphaCtrl->data.getPtr(), &scene->mMaterialControllerMgr)); - AlphaController::Function* function = OGRE_NEW AlphaController::Function(alphaCtrl, (animflags&Nif::NiNode::AnimFlag_AutoPlay)); + AlphaController::Function* function = OGRE_NEW AlphaController::Function(alphaCtrl, isAnimationAutoPlay); scene->mMaxControllerLength = std::max(function->mStopTime, scene->mMaxControllerLength); Ogre::ControllerFunctionRealPtr func(function); scene->mControllers.push_back(Ogre::Controller(srcval, dstval, func)); @@ -818,7 +820,7 @@ private: { const Nif::NiMaterialColorController *matCtrl = static_cast(ctrls.getPtr()); Ogre::ControllerValueRealPtr dstval(OGRE_NEW MaterialColorController::Value(movable, matCtrl->data.getPtr(), &scene->mMaterialControllerMgr)); - MaterialColorController::Function* function = OGRE_NEW MaterialColorController::Function(matCtrl, (animflags&Nif::NiNode::AnimFlag_AutoPlay)); + MaterialColorController::Function* function = OGRE_NEW MaterialColorController::Function(matCtrl, isAnimationAutoPlay); scene->mMaxControllerLength = std::max(function->mStopTime, scene->mMaxControllerLength); Ogre::ControllerFunctionRealPtr func(function); scene->mControllers.push_back(Ogre::Controller(srcval, dstval, func)); @@ -839,7 +841,7 @@ private: Ogre::ControllerValueRealPtr dstval(OGRE_NEW FlipController::Value( movable, flipCtrl, &scene->mMaterialControllerMgr)); - FlipController::Function* function = OGRE_NEW FlipController::Function(flipCtrl, (animflags&Nif::NiNode::AnimFlag_AutoPlay)); + FlipController::Function* function = OGRE_NEW FlipController::Function(flipCtrl, isAnimationAutoPlay); scene->mMaxControllerLength = std::max(function->mStopTime, scene->mMaxControllerLength); Ogre::ControllerFunctionRealPtr func(function); scene->mControllers.push_back(Ogre::Controller(srcval, dstval, func)); @@ -967,7 +969,7 @@ private: partsys->setCullIndividually(false); partsys->setParticleQuota(particledata->numParticles); - partsys->setKeepParticlesInLocalSpace(partflags & (Nif::NiNode::ParticleFlag_LocalSpace)); + partsys->setKeepParticlesInLocalSpace((partflags & Nif::NiNode::ParticleFlag_LocalSpace) != 0); int trgtid = NIFSkeletonLoader::lookupOgreBoneHandle(name, partnode->recIndex); Ogre::Bone *trgtbone = scene->mSkelBase->getSkeleton()->getBone(trgtid); @@ -1017,13 +1019,14 @@ private: createParticleInitialState(partsys, particledata, partctrl); - Ogre::ControllerValueRealPtr srcval((partflags&Nif::NiNode::ParticleFlag_AutoPlay) ? + bool isParticleAutoPlay = (partflags&Nif::NiNode::ParticleFlag_AutoPlay) != 0; + Ogre::ControllerValueRealPtr srcval(isParticleAutoPlay ? Ogre::ControllerManager::getSingleton().getFrameTimeSource() : Ogre::ControllerValueRealPtr()); Ogre::ControllerValueRealPtr dstval(OGRE_NEW ParticleSystemController::Value(partsys, partctrl)); ParticleSystemController::Function* function = - OGRE_NEW ParticleSystemController::Function(partctrl, (partflags&Nif::NiNode::ParticleFlag_AutoPlay)); + OGRE_NEW ParticleSystemController::Function(partctrl, isParticleAutoPlay); scene->mMaxControllerLength = std::max(function->mStopTime, scene->mMaxControllerLength); Ogre::ControllerFunctionRealPtr func(function); @@ -1032,7 +1035,7 @@ private: // Emitting state will be overwritten on frame update by the ParticleSystemController, // but set up an initial value anyway so the user can fast-forward particle systems // immediately after creation if desired. - partsys->setEmitting(partflags&Nif::NiNode::ParticleFlag_AutoPlay); + partsys->setEmitting(isParticleAutoPlay); } ctrl = ctrl->next; } @@ -1094,18 +1097,19 @@ private: do { if (ctrl->flags & Nif::NiNode::ControllerFlag_Active) { + bool isAnimationAutoPlay = (animflags & Nif::NiNode::AnimFlag_AutoPlay) != 0; if(ctrl->recType == Nif::RC_NiVisController) { const Nif::NiVisController *vis = static_cast(ctrl.getPtr()); int trgtid = NIFSkeletonLoader::lookupOgreBoneHandle(name, ctrl->target->recIndex); Ogre::Bone *trgtbone = scene->mSkelBase->getSkeleton()->getBone(trgtid); - Ogre::ControllerValueRealPtr srcval((animflags&Nif::NiNode::AnimFlag_AutoPlay) ? + Ogre::ControllerValueRealPtr srcval(isAnimationAutoPlay ? Ogre::ControllerManager::getSingleton().getFrameTimeSource() : Ogre::ControllerValueRealPtr()); Ogre::ControllerValueRealPtr dstval(OGRE_NEW VisController::Value(trgtbone, vis->data.getPtr())); - VisController::Function* function = OGRE_NEW VisController::Function(vis, (animflags&Nif::NiNode::AnimFlag_AutoPlay)); + VisController::Function* function = OGRE_NEW VisController::Function(vis, isAnimationAutoPlay); scene->mMaxControllerLength = std::max(function->mStopTime, scene->mMaxControllerLength); Ogre::ControllerFunctionRealPtr func(function); @@ -1120,11 +1124,11 @@ private: Ogre::Bone *trgtbone = scene->mSkelBase->getSkeleton()->getBone(trgtid); // The keyframe controller will control this bone manually trgtbone->setManuallyControlled(true); - Ogre::ControllerValueRealPtr srcval((animflags&Nif::NiNode::AnimFlag_AutoPlay) ? + Ogre::ControllerValueRealPtr srcval(isAnimationAutoPlay ? Ogre::ControllerManager::getSingleton().getFrameTimeSource() : Ogre::ControllerValueRealPtr()); Ogre::ControllerValueRealPtr dstval(OGRE_NEW KeyframeController::Value(trgtbone, nif, key->data.getPtr())); - KeyframeController::Function* function = OGRE_NEW KeyframeController::Function(key, (animflags&Nif::NiNode::AnimFlag_AutoPlay)); + KeyframeController::Function* function = OGRE_NEW KeyframeController::Function(key, isAnimationAutoPlay); scene->mMaxControllerLength = std::max(function->mStopTime, scene->mMaxControllerLength); Ogre::ControllerFunctionRealPtr func(function); diff --git a/components/terrain/material.hpp b/components/terrain/material.hpp index f35080e7c6..b79df9f48c 100644 --- a/components/terrain/material.hpp +++ b/components/terrain/material.hpp @@ -35,7 +35,7 @@ namespace Terrain MaterialGenerator (); void setLayerList (const std::vector& layerList) { mLayerList = layerList; } - bool hasLayers() { return mLayerList.size(); } + bool hasLayers() { return mLayerList.size() > 0; } void setBlendmapList (const std::vector& blendmapList) { mBlendmapList = blendmapList; } const std::vector& getBlendmapList() { return mBlendmapList; } void setCompositeMap (const std::string& name) { mCompositeMap = name; } diff --git a/extern/sdl4ogre/sdlinputwrapper.cpp b/extern/sdl4ogre/sdlinputwrapper.cpp index 439c4c1313..aaf669ff43 100644 --- a/extern/sdl4ogre/sdlinputwrapper.cpp +++ b/extern/sdl4ogre/sdlinputwrapper.cpp @@ -201,12 +201,12 @@ namespace SFO bool InputWrapper::isModifierHeld(SDL_Keymod mod) { - return SDL_GetModState() & mod; + return (SDL_GetModState() & mod) != 0; } bool InputWrapper::isKeyDown(SDL_Scancode key) { - return SDL_GetKeyboardState(NULL)[key]; + return (SDL_GetKeyboardState(NULL)[key]) != 0; } /// \brief Moves the mouse to the specified point within the viewport diff --git a/libs/openengine/bullet/physic.cpp b/libs/openengine/bullet/physic.cpp index b3e9f13954..e0482104a6 100644 --- a/libs/openengine/bullet/physic.cpp +++ b/libs/openengine/bullet/physic.cpp @@ -283,14 +283,14 @@ namespace Physic } } - void PhysicEngine::setDebugRenderingMode(int mode) + void PhysicEngine::setDebugRenderingMode(bool isDebug) { if(!isDebugCreated) { createDebugRendering(); } - mDebugDrawer->setDebugMode(mode); - mDebugActive = mode; + mDebugDrawer->setDebugMode(isDebug); + mDebugActive = isDebug; } bool PhysicEngine::toggleDebugRendering() diff --git a/libs/openengine/bullet/physic.hpp b/libs/openengine/bullet/physic.hpp index f497150f9c..1a16ff4e82 100644 --- a/libs/openengine/bullet/physic.hpp +++ b/libs/openengine/bullet/physic.hpp @@ -283,7 +283,7 @@ namespace Physic * Set the debug rendering mode. 0 to turn it off. * Important Note: this will crash if the Render is not yet initialise! */ - void setDebugRenderingMode(int mode); + void setDebugRenderingMode(bool isDebug); bool toggleDebugRendering();