diff options
| author | SammygoodTunes <56520787+SammygoodTunes@users.noreply.github.com> | 2025-05-04 19:34:34 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-05-04 19:34:34 +0200 |
| commit | 48281b9f52d42a558fadebfd59c22cf69c6a9587 (patch) | |
| tree | af7a654465177181ef43f2ebf66a412ee4df0556 /src | |
| parent | 780ed17043d22941ce1a8142ffc8683d3a35159b (diff) | |
| parent | dc075c39db89c26073f1421ffe1939e6aff2449a (diff) | |
Merge branch 'main' into decomp/MapManager
Diffstat (limited to 'src')
| -rw-r--r-- | src/00_Core/Player/TouchControl.cpp | 34 |
1 files changed, 31 insertions, 3 deletions
diff --git a/src/00_Core/Player/TouchControl.cpp b/src/00_Core/Player/TouchControl.cpp index 5cae75a5..9630de1a 100644 --- a/src/00_Core/Player/TouchControl.cpp +++ b/src/00_Core/Player/TouchControl.cpp @@ -1,11 +1,39 @@ #include "Player/TouchControl.hpp" TouchControl::TouchControl() {} -void TouchControl::IncreaseSpeed(s16 increase) {} + +void TouchControl::IncreaseSpeed(s16 increase) { + this->mFlags = 0; + this->mSpeed += increase; +} + void TouchControl::UpdateFlags(u16 speed) {} void TouchControl::UpdateWithStateFlags(TouchStateFlags *state, u16 speed) {} void TouchControl::Update(TouchState *state, u16 speed) {} -bool TouchControl::func_ov00_0207aeac() {} +bool TouchControl::func_ov00_0207aeac() { + return ((*data_0207aecc & 0x8000) >> 15) == 1; +} void TouchControl::UpdateConditionally(TouchState *state, u16 speed) {} -void TouchControl::func_ov00_0207af38(u16 speed, bool param2) {} + +void TouchControl::func_ov00_0207af38(u16 speedIncrease, bool shouldIncrease) { + TouchStateFlags touchState; + + if (shouldIncrease) { + IncreaseSpeed(speedIncrease); /* TODO: IncreaseSpeed expects an s16 variable, + while speedIncrease is a u16. As a result, the function + performs a conversion that is not present in the binary. */ + return; + } + + u32 result = TouchControl::func_ov00_0207aeac(); + if (result != 0) { + Fill16(0, &touchState.touchX, 8); + } else { + + GetTouchStateFlags(&touchState); + } + + UpdateWithStateFlags(&touchState, speedIncrease); +} + TouchControl::~TouchControl() {} |
