mirror of
https://github.com/isledecomp/isle.git
synced 2025-10-24 08:54:15 +00:00
cmake+ci: run clang-tidy (#512)
* cmake+ci: run clang-tidy
* Remove DESCRIPTION from LEGO1/LegoOmni.mingw.def
* Add initial .clang-tidy and fixes
* fix file perms
* Comment out DESCRIPTION
* Remove LegoEntity::~LegoEntity and MxPresenter::~MxPresenter from mingw's LEGO1.def
* Looks like clang is allergic to the libs in the directx5 SDK
* Update .clang-tidy
* Fix typo in .clang-tidy
* Attempt to generate an action error
* Revert "Attempt to generate an action error"
This reverts commit 96c4c65fed.
* cmake: test with -Wparentheses + optionally with -Werror
* ci: -k0 is a Ninja argument
* Use -Werror only for msys2 builds
* cmake: only emit warnings for specific warnings
* cmake: and don't do -Werror/-WX anymore
* Fix warnings
* Fix mingw warnings
---------
Co-authored-by: Christian Semmler <mail@csemmler.com>
This commit is contained in:
committed by
GitHub
parent
97d1ba7c71
commit
9e686e2a87
@@ -257,8 +257,9 @@ void PlayMusic(MxU32 p_index)
|
||||
// FUNCTION: LEGO1 0x100159c0
|
||||
void SetIsWorldActive(MxBool p_isWorldActive)
|
||||
{
|
||||
if (!p_isWorldActive)
|
||||
if (!p_isWorldActive) {
|
||||
LegoOmni::GetInstance()->GetInputManager()->SetCamera(NULL);
|
||||
}
|
||||
g_isWorldActive = p_isWorldActive;
|
||||
}
|
||||
|
||||
@@ -523,17 +524,20 @@ MxResult LegoOmni::Create(MxOmniCreateParam& p_param)
|
||||
p_param.CreateFlags().CreateSoundManager(FALSE);
|
||||
p_param.CreateFlags().CreateTickleManager(FALSE);
|
||||
|
||||
if (!(m_tickleManager = new MxTickleManager()))
|
||||
if (!(m_tickleManager = new MxTickleManager())) {
|
||||
return FAILURE;
|
||||
}
|
||||
|
||||
if (MxOmni::Create(p_param) != SUCCESS)
|
||||
if (MxOmni::Create(p_param) != SUCCESS) {
|
||||
return FAILURE;
|
||||
}
|
||||
|
||||
m_objectFactory = new LegoObjectFactory();
|
||||
if (m_objectFactory == NULL)
|
||||
if (m_objectFactory == NULL) {
|
||||
return FAILURE;
|
||||
}
|
||||
|
||||
if (m_soundManager = new LegoSoundManager()) {
|
||||
if ((m_soundManager = new LegoSoundManager())) {
|
||||
if (m_soundManager->Create(10, 0) != SUCCESS) {
|
||||
delete m_soundManager;
|
||||
m_soundManager = NULL;
|
||||
@@ -541,14 +545,14 @@ MxResult LegoOmni::Create(MxOmniCreateParam& p_param)
|
||||
}
|
||||
}
|
||||
|
||||
if (m_videoManager = new LegoVideoManager()) {
|
||||
if ((m_videoManager = new LegoVideoManager())) {
|
||||
if (m_videoManager->Create(p_param.GetVideoParam(), 100, 0) != SUCCESS) {
|
||||
delete m_videoManager;
|
||||
m_videoManager = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
if (m_inputMgr = new LegoInputManager()) {
|
||||
if ((m_inputMgr = new LegoInputManager())) {
|
||||
if (m_inputMgr->Create(p_param.GetWindowHandle()) != SUCCESS) {
|
||||
delete m_inputMgr;
|
||||
m_inputMgr = NULL;
|
||||
@@ -657,8 +661,9 @@ LegoWorld* LegoOmni::FindWorld(const MxAtomId& p_atom, MxS32 p_entityid)
|
||||
|
||||
while (cursor.Next(world)) {
|
||||
if ((p_entityid == -1 || world->GetEntityId() == p_entityid) &&
|
||||
(!p_atom.GetInternal() || world->GetAtom() == p_atom))
|
||||
(!p_atom.GetInternal() || world->GetAtom() == p_atom)) {
|
||||
return world;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -716,8 +721,9 @@ MxEntity* LegoOmni::AddToWorld(const char* p_id, MxS32 p_entityId, MxPresenter*
|
||||
// FUNCTION: LEGO1 0x1005b3a0
|
||||
void LegoOmni::NotifyCurrentEntity(MxNotificationParam* p_param)
|
||||
{
|
||||
if (m_currentWorld)
|
||||
if (m_currentWorld) {
|
||||
NotificationManager()->Send(m_currentWorld, p_param);
|
||||
}
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x1005b3c0
|
||||
@@ -767,8 +773,9 @@ void LegoOmni::FUN_1005b4f0(MxBool p_disable, MxU16 p_flags)
|
||||
// FUNCTION: LEGO1 0x1005b560
|
||||
void LegoOmni::CreateBackgroundAudio()
|
||||
{
|
||||
if (m_bkgAudioManager)
|
||||
if (m_bkgAudioManager) {
|
||||
m_bkgAudioManager->Create(*g_jukeboxScript, 100);
|
||||
}
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x1005b580
|
||||
|
||||
Reference in New Issue
Block a user