From 5c4ac052c3eadf70cfb4810341ccfbbba22869e2 Mon Sep 17 00:00:00 2001 From: Erin Moon Date: Sun, 3 Jan 2021 00:04:15 -0600 Subject: decomp some small files, do some cleanup (#42) * remove leftover asm: JSUList.s * d_save_init: decomp * JMath/random: decomp * J3DUDL: fixup label * JAUClusterSound: decomp * c_API_controller_pad: decomp, elaborate globals/types * clang-format * don't add guards to functions.h * semantic merge of m_cpadInfo stuff * fix undef symbols Co-authored-by: Pheenoh --- src/d/d_lib.cpp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'src/d/d_lib.cpp') diff --git a/src/d/d_lib.cpp b/src/d/d_lib.cpp index a341f4a556..6e4faf0575 100644 --- a/src/d/d_lib.cpp +++ b/src/d/d_lib.cpp @@ -1,6 +1,7 @@ #include "d/d_lib/d_lib.h" #include "JSystem/JUtility/JUTGamePad/JUTGamePad.h" #include "d/d_event/d_event/d_event.h" +#include "global.h" #include "m_Do/m_Do_controller_pad/m_Do_controller_pad.h" #include "os/OS.h" @@ -63,19 +64,19 @@ asm void STControl::Yinit(void) { #endif double STControl::getValueStick() { - return m_cpadInfo.interface.length_from_neutral; + return (double)m_cpadInfo[0].mMainStickValue; } s16 STControl::getAngleStick() { - return m_cpadInfo.interface.controlStick_angle; + return m_cpadInfo[0].mMainStickAngle; } double CSTControl::getValueStick() { - return m_cpadInfo.interface.cStick_length_from_neutral; + return (double)m_cpadInfo[0].mCStickValue; } s16 CSTControl::getAngleStick() { - return m_cpadInfo.interface.cStick_angle; + return m_cpadInfo[0].mCStickAngle; } asm u32 STControl::checkTrigger() { -- cgit v1.2.3