| 1 | #include "Library/Camera/SimpleCameraInput.h" |
|---|---|
| 2 | |
| 3 | #include "Library/Controller/InputFunction.h" |
| 4 | |
| 5 | namespace al { |
| 6 | |
| 7 | SimpleCameraInput::SimpleCameraInput(s32 port) : mPort(port) { |
| 8 | if (mPort < 0) |
| 9 | mPort = getTouchPanelPort(); |
| 10 | } |
| 11 | |
| 12 | void SimpleCameraInput::calcInputStick(sead::Vector2f* inputStick) const { |
| 13 | *inputStick = {0.0f, 0.0f}; |
| 14 | inputStick->set(getRightStick(port: mPort)); |
| 15 | } |
| 16 | |
| 17 | bool SimpleCameraInput::isTriggerReset() const { |
| 18 | return isPadTriggerL(port: mPort) || isPadTriggerR(port: mPort); |
| 19 | } |
| 20 | |
| 21 | bool SimpleCameraInput::isHoldZoom() const { |
| 22 | // has to be repeated here to avoid virtual calls |
| 23 | return isPadHoldZL(port: mPort) || isPadHoldZR(port: mPort); |
| 24 | } |
| 25 | |
| 26 | bool SimpleCameraInput::isHoldSnapShotZoomIn() const { |
| 27 | return isPadHoldZL(port: mPort); |
| 28 | } |
| 29 | |
| 30 | bool SimpleCameraInput::isHoldSnapShotZoomOut() const { |
| 31 | return isPadHoldZR(port: mPort); |
| 32 | } |
| 33 | |
| 34 | } // namespace al |
| 35 |