summaryrefslogtreecommitdiff
path: root/Source
diff options
context:
space:
mode:
authorMatthew Parlane <parlane@gmail.com>2014-07-22 12:16:34 +1200
committerMatthew Parlane <parlane@gmail.com>2014-07-22 12:16:34 +1200
commitcee07ff16e5a0bf62364fea0f232727a28acaf5a (patch)
treeaebce5fff6970defd7d087e1900e3fbdb1442e5f /Source
parent82ee68663fd59963a6c995cb5ee31a9af181c0b3 (diff)
Use new stick/trigger constants for Classic.cpp
Diffstat (limited to 'Source')
-rw-r--r--Source/Core/Core/HW/WiimoteEmu/Attachment/Classic.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/Source/Core/Core/HW/WiimoteEmu/Attachment/Classic.cpp b/Source/Core/Core/HW/WiimoteEmu/Attachment/Classic.cpp
index 80673c8f6a..a996cf44a7 100644
--- a/Source/Core/Core/HW/WiimoteEmu/Attachment/Classic.cpp
+++ b/Source/Core/Core/HW/WiimoteEmu/Attachment/Classic.cpp
@@ -92,8 +92,8 @@ void Classic::GetState(u8* const data)
double x, y;
m_left_stick->GetState(&x, &y);
- ccdata->lx = (x * 0x1F) + 0x20;
- ccdata->ly = (y * 0x1F) + 0x20;
+ ccdata->lx = Classic::LEFT_STICK_CENTER_X + (x * Classic::LEFT_STICK_RADIUS);
+ ccdata->ly = Classic::LEFT_STICK_CENTER_Y + (y * Classic::LEFT_STICK_RADIUS);
}
// right stick
@@ -102,8 +102,8 @@ void Classic::GetState(u8* const data)
u8 x_, y_;
m_right_stick->GetState(&x, &y);
- x_ = (x * 0x1F) + 0x20;
- y_ = (y * 0x1F) + 0x20;
+ x_ = Classic::RIGHT_STICK_CENTER_X + (x * Classic::RIGHT_STICK_RADIUS);
+ y_ = Classic::RIGHT_STICK_CENTER_Y + (y * Classic::RIGHT_STICK_RADIUS);
ccdata->rx1 = x_;
ccdata->rx2 = x_ >> 1;
@@ -117,8 +117,8 @@ void Classic::GetState(u8* const data)
u8 lt, rt;
m_triggers->GetState(&ccdata->bt, classic_trigger_bitmasks, trigs);
- lt = trigs[0] * 0x1F;
- rt = trigs[1] * 0x1F;
+ lt = trigs[0] * Classic::LEFT_TRIGGER_RANGE;
+ rt = trigs[1] * Classic::RIGHT_TRIGGER_RANGE;
ccdata->lt1 = lt;
ccdata->lt2 = lt >> 3;