mirror of
https://github.com/isledecomp/isle.git
synced 2025-10-24 00:44:21 +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
@@ -195,8 +195,9 @@ MxLong Infocenter::HandleEndAction(MxParam& p_param)
|
||||
|
||||
MxLong result = m_radio.Notify(p_param);
|
||||
|
||||
if (result || (action->GetAtomId() != m_atom && action->GetAtomId() != *g_introScript))
|
||||
if (result || (action->GetAtomId() != m_atom && action->GetAtomId() != *g_introScript)) {
|
||||
return result;
|
||||
}
|
||||
|
||||
if (action->GetObjectId() == c_returnBackGuidanceDialogue2) {
|
||||
ControlManager()->FUN_100293c0(0x10, action->GetAtomId().GetInternal(), 0);
|
||||
@@ -747,8 +748,9 @@ void Infocenter::FUN_10070d10(MxS32 p_x, MxS32 p_y)
|
||||
MxS32 left = m_mapAreas[i].m_area.GetLeft();
|
||||
MxS32 top = m_mapAreas[i].m_area.GetTop();
|
||||
|
||||
if (left <= p_x && p_x <= right && top <= p_y && p_y <= bottom)
|
||||
if (left <= p_x && p_x <= right && top <= p_y && p_y <= bottom) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (i == 7) {
|
||||
|
||||
@@ -32,8 +32,9 @@ MxBool Score::VTable0x5c()
|
||||
// FUNCTION: LEGO1 0x10001200
|
||||
Score::~Score()
|
||||
{
|
||||
if (InputManager()->GetWorld() == this)
|
||||
if (InputManager()->GetWorld() == this) {
|
||||
InputManager()->ClearWorld();
|
||||
}
|
||||
InputManager()->UnRegister(this);
|
||||
ControlManager()->Unregister(this);
|
||||
NotificationManager()->Unregister(this);
|
||||
@@ -87,8 +88,9 @@ MxLong Score::Notify(MxParam& p_param)
|
||||
ret = FUN_10001510((MxEndActionNotificationParam&) p_param);
|
||||
break;
|
||||
case c_notificationKeyPress:
|
||||
if (((LegoEventNotificationParam&) p_param).GetKey() == 0x20)
|
||||
if (((LegoEventNotificationParam&) p_param).GetKey() == 0x20) {
|
||||
DeleteScript(); // Shutting down
|
||||
}
|
||||
ret = 1;
|
||||
break;
|
||||
case c_notificationClick:
|
||||
@@ -96,8 +98,9 @@ MxLong Score::Notify(MxParam& p_param)
|
||||
break;
|
||||
case c_notificationTransitioned:
|
||||
DeleteObjects(g_infoscorScript, 7, 9);
|
||||
if (m_unk0xf8)
|
||||
if (m_unk0xf8) {
|
||||
GameState()->SwitchArea(m_unk0xf8);
|
||||
}
|
||||
ret = 1;
|
||||
break;
|
||||
default:
|
||||
@@ -145,8 +148,9 @@ void Score::ReadyWorld()
|
||||
action.SetAtomId(*g_infoscorScript);
|
||||
Start(&action);
|
||||
}
|
||||
else
|
||||
else {
|
||||
PlayMusic(JukeBox::e_informationCenter);
|
||||
}
|
||||
|
||||
FUN_10015820(FALSE, LegoOmni::c_disableInput | LegoOmni::c_disable3d | LegoOmni::c_clearScreen);
|
||||
}
|
||||
@@ -221,8 +225,9 @@ void Score::VTable0x68(MxBool p_add)
|
||||
InputManager()->SetWorld(this);
|
||||
SetIsWorldActive(FALSE);
|
||||
}
|
||||
else if (InputManager()->GetWorld() == this)
|
||||
else if (InputManager()->GetWorld() == this) {
|
||||
InputManager()->ClearWorld();
|
||||
}
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x100019d0
|
||||
@@ -249,25 +254,30 @@ void Score::Paint()
|
||||
for (MxU8 id = 1; id <= 5; id++) {
|
||||
m_surface = (MxU8*) desc.lpSurface;
|
||||
MxU16 color = 0;
|
||||
if (l70)
|
||||
if (l70) {
|
||||
color = l70->GetColor(id);
|
||||
}
|
||||
MxU32 row = id - 1;
|
||||
FillArea(0, row, color);
|
||||
color = 0;
|
||||
if (l78)
|
||||
if (l78) {
|
||||
color = l78->GetColor(id);
|
||||
}
|
||||
FillArea(1, row, color);
|
||||
color = 0;
|
||||
if (l74)
|
||||
if (l74) {
|
||||
color = l74->GetColor(id);
|
||||
}
|
||||
FillArea(2, row, color);
|
||||
color = 0;
|
||||
if (lesi)
|
||||
if (lesi) {
|
||||
color = lesi->GetColor(id);
|
||||
}
|
||||
FillArea(3, row, color);
|
||||
color = 0;
|
||||
if (lebp)
|
||||
if (lebp) {
|
||||
color = lebp->GetColor(id);
|
||||
}
|
||||
FillArea(4, row, color);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user