2
0
mirror of https://github.com/AxioDL/metaforce.git synced 2025-12-10 17:47:42 +00:00

CFinalInput: Use std::array where applicable

Allows simplifying copies and gets rid of hardcoded size values.
This commit is contained in:
Lioncash
2019-10-01 01:25:19 -04:00
parent 81a019b1e0
commit dc565969e6
8 changed files with 106 additions and 81 deletions

View File

@@ -158,8 +158,8 @@ void CInventoryScreen::ProcessControllerInput(const CFinalInput& input) {
m_lastMouseCoord = mouseCoord;
mouseDelta.x() *= g_Viewport.aspect;
mouseDelta *= 100.f;
if (kbm->m_mouseButtons[int(boo::EMouseButton::Middle)] ||
kbm->m_mouseButtons[int(boo::EMouseButton::Secondary)]) {
if (kbm->m_mouseButtons[size_t(boo::EMouseButton::Middle)] ||
kbm->m_mouseButtons[size_t(boo::EMouseButton::Secondary)]) {
if (float(mouseDelta.x()) < 0.f)
moveRight += -mouseDelta.x();
else if (float(mouseDelta.x()) > 0.f)
@@ -169,7 +169,7 @@ void CInventoryScreen::ProcessControllerInput(const CFinalInput& input) {
else if (float(mouseDelta.y()) > 0.f)
moveBack += mouseDelta.y();
}
if (kbm->m_mouseButtons[int(boo::EMouseButton::Primary)]) {
if (kbm->m_mouseButtons[size_t(boo::EMouseButton::Primary)]) {
if (float(mouseDelta.x()) < 0.f)
circleRight += -mouseDelta.x();
else if (float(mouseDelta.x()) > 0.f)