| 1 | #pragma once |
| 2 | |
| 3 | #include <math/seadVector.h> |
| 4 | |
| 5 | namespace sead { |
| 6 | class ControllerBase; |
| 7 | } |
| 8 | |
| 9 | namespace al { |
| 10 | class IUseCamera; |
| 11 | |
| 12 | bool isPadTypeJoySingle(s32 port = -1); |
| 13 | |
| 14 | bool isPadTrigger(s32 port, s32 button); |
| 15 | bool isPadTriggerA(s32 port = -1); |
| 16 | bool isPadTriggerB(s32 port = -1); |
| 17 | bool isPadTriggerX(s32 port = -1); |
| 18 | bool isPadTriggerY(s32 port = -1); |
| 19 | bool isPadTriggerZL(s32 port = -1); |
| 20 | bool isPadTriggerZR(s32 port = -1); |
| 21 | bool isPadTriggerL(s32 port = -1); |
| 22 | bool isPadTriggerR(s32 port = -1); |
| 23 | bool isPadTrigger1(s32 port = -1); |
| 24 | bool isPadTrigger2(s32 port = -1); |
| 25 | bool isPadTriggerUp(s32 port = -1); |
| 26 | bool isPadTriggerDown(s32 port = -1); |
| 27 | bool isPadTriggerLeft(s32 port = -1); |
| 28 | bool isPadTriggerRight(s32 port = -1); |
| 29 | bool isPadTriggerLeftUp(s32 port = -1); |
| 30 | bool isPadTriggerLeftDown(s32 port = -1); |
| 31 | bool isPadTriggerRightUp(s32 port = -1); |
| 32 | bool isPadTriggerRightDown(s32 port = -1); |
| 33 | bool isPadTriggerHome(s32 port = -1); |
| 34 | bool isPadTriggerStart(s32 port = -1); |
| 35 | bool isPadTriggerSelect(s32 port = -1); |
| 36 | bool isPadTriggerPlus(s32 port = -1); |
| 37 | bool isPadTriggerMinus(s32 port = -1); |
| 38 | bool isPadTriggerTouch(); |
| 39 | bool isPadTriggerUpLeftStick(s32 port = -1); |
| 40 | bool isPadTriggerDownLeftStick(s32 port = -1); |
| 41 | bool isPadTriggerLeftLeftStick(s32 port = -1); |
| 42 | bool isPadTriggerRightLeftStick(s32 port = -1); |
| 43 | bool isPadTriggerUpRightStick(s32 port = -1); |
| 44 | bool isPadTriggerDownRightStick(s32 port = -1); |
| 45 | bool isPadTriggerLeftRightStick(s32 port = -1); |
| 46 | bool isPadTriggerRightRightStick(s32 port = -1); |
| 47 | bool isPadTriggerAnyABXY(s32 port = -1); |
| 48 | bool isPadTriggerAny(s32 port = -1); |
| 49 | bool isPadTriggerLeftStick(s32 port = -1); |
| 50 | bool isPadTriggerRightStick(s32 port = -1); |
| 51 | bool isPadTriggerPressLeftStick(s32 port = -1); |
| 52 | bool isPadTriggerPressRightStick(s32 port = -1); |
| 53 | bool isPadTriggerUiCursorUp(s32 port = -1); // TODO implement below |
| 54 | bool isPadTriggerUiCursorDown(s32 port = -1); |
| 55 | bool isPadTriggerUiCursorLeft(s32 port = -1); |
| 56 | bool isPadTriggerUiCursorRight(s32 port = -1); |
| 57 | |
| 58 | bool isPadRepeatA(s32 port = -1); |
| 59 | bool isPadRepeatB(s32 port = -1); |
| 60 | bool isPadRepeatX(s32 port = -1); |
| 61 | bool isPadRepeatY(s32 port = -1); |
| 62 | bool isPadRepeatZL(s32 port = -1); |
| 63 | bool isPadRepeatZR(s32 port = -1); |
| 64 | bool isPadRepeatL(s32 port = -1); |
| 65 | bool isPadRepeatR(s32 port = -1); |
| 66 | bool isPadRepeat1(s32 port = -1); |
| 67 | bool isPadRepeat2(s32 port = -1); |
| 68 | bool isPadRepeatUp(s32 port = -1); |
| 69 | bool isPadRepeatDown(s32 port = -1); |
| 70 | bool isPadRepeatLeft(s32 port = -1); |
| 71 | bool isPadRepeatRight(s32 port = -1); |
| 72 | bool isPadRepeatHome(s32 port = -1); |
| 73 | bool isPadRepeatStart(s32 port = -1); |
| 74 | bool isPadRepeatSelect(s32 port = -1); |
| 75 | bool isPadRepeatPlus(s32 port = -1); |
| 76 | bool isPadRepeatMinus(s32 port = -1); |
| 77 | bool isPadRepeatTouch(); |
| 78 | bool isPadRepeatUpLeftStick(s32 port = -1); |
| 79 | bool isPadRepeatDownLeftStick(s32 port = -1); |
| 80 | bool isPadRepeatLeftLeftStick(s32 port = -1); |
| 81 | bool isPadRepeatRightLeftStick(s32 port = -1); |
| 82 | bool isPadRepeatUpRightStick(s32 port = -1); |
| 83 | bool isPadRepeatDownRightStick(s32 port = -1); |
| 84 | bool isPadRepeatLeftRightStick(s32 port = -1); |
| 85 | bool isPadRepeatRightRightStick(s32 port = -1); |
| 86 | bool isPadRepeatUiCursorUp(s32 port = -1); // TODO implement below |
| 87 | bool isPadRepeatUiCursorDown(s32 port = -1); |
| 88 | bool isPadRepeatUiCursorLeft(s32 port = -1); |
| 89 | bool isPadRepeatUiCursorRight(s32 port = -1); |
| 90 | |
| 91 | bool isPadHoldPressLeftStick(s32 port = -1); |
| 92 | bool isPadHoldPressRightStick(s32 port = -1); |
| 93 | bool isPadHold(s32, s32); |
| 94 | bool isPadHoldA(s32 port = -1); |
| 95 | bool isPadHoldB(s32 port = -1); |
| 96 | bool isPadHoldX(s32 port = -1); |
| 97 | bool isPadHoldY(s32 port = -1); |
| 98 | bool isPadHoldZL(s32 port = -1); |
| 99 | bool isPadHoldZR(s32 port = -1); |
| 100 | bool isPadHoldL(s32 port = -1); |
| 101 | bool isPadHoldR(s32 port = -1); |
| 102 | bool isPadHold1(s32 port = -1); |
| 103 | bool isPadHold2(s32 port = -1); |
| 104 | bool isPadHoldUp(s32 port = -1); |
| 105 | bool isPadHoldDown(s32 port = -1); |
| 106 | bool isPadHoldLeft(s32 port = -1); |
| 107 | bool isPadHoldRight(s32 port = -1); |
| 108 | bool isPadHoldLeftUp(s32 port = -1); |
| 109 | bool isPadHoldLeftDown(s32 port = -1); |
| 110 | bool isPadHoldRightUp(s32 port = -1); |
| 111 | bool isPadHoldRightDown(s32 port = -1); |
| 112 | bool isPadHoldHome(s32 port = -1); |
| 113 | bool isPadHoldStart(s32 port = -1); |
| 114 | bool isPadHoldSelect(s32 port = -1); |
| 115 | bool isPadHoldPlus(s32 port = -1); |
| 116 | bool isPadHoldMinus(s32 port = -1); |
| 117 | bool isPadHoldAny(s32 port = -1); |
| 118 | bool isPadHoldAnyWithoutStick(s32 port = -1); |
| 119 | bool isPadHoldTouch(); |
| 120 | bool isPadHoldUpLeftStick(s32 port = -1); |
| 121 | bool isPadHoldDownLeftStick(s32 port = -1); |
| 122 | bool isPadHoldLeftLeftStick(s32 port = -1); |
| 123 | bool isPadHoldRightLeftStick(s32 port = -1); |
| 124 | bool isPadHoldUpRightStick(s32 port = -1); |
| 125 | bool isPadHoldDownRightStick(s32 port = -1); |
| 126 | bool isPadHoldLeftRightStick(s32 port = -1); |
| 127 | bool isPadHoldRightRightStick(s32 port = -1); |
| 128 | bool isPadHoldLeftStick(s32 port = -1); |
| 129 | bool isPadHoldRightStick(s32 port = -1); |
| 130 | bool isPadHoldUiCursorUp(s32 port = -1); |
| 131 | bool isPadHoldUiCursorDown(s32 port = -1); |
| 132 | bool isPadHoldUiCursorLeft(s32 port = -1); |
| 133 | bool isPadHoldUiCursorRight(s32 port = -1); |
| 134 | |
| 135 | bool isPadRelease(s32, s32); |
| 136 | bool isPadReleaseA(s32 port = -1); |
| 137 | bool isPadReleaseB(s32 port = -1); |
| 138 | bool isPadReleaseX(s32 port = -1); |
| 139 | bool isPadReleaseY(s32 port = -1); |
| 140 | bool isPadReleaseZL(s32 port = -1); |
| 141 | bool isPadReleaseZR(s32 port = -1); |
| 142 | bool isPadReleaseL(s32 port = -1); |
| 143 | bool isPadReleaseR(s32 port = -1); |
| 144 | bool isPadRelease1(s32 port = -1); |
| 145 | bool isPadRelease2(s32 port = -1); |
| 146 | bool isPadReleaseUp(s32 port = -1); |
| 147 | bool isPadReleaseDown(s32 port = -1); |
| 148 | bool isPadReleaseLeft(s32 port = -1); |
| 149 | bool isPadReleaseRight(s32 port = -1); |
| 150 | bool isPadReleaseHome(s32 port = -1); |
| 151 | bool isPadReleaseStart(s32 port = -1); |
| 152 | bool isPadReleaseSelect(s32 port = -1); |
| 153 | bool isPadReleasePlus(s32 port = -1); |
| 154 | bool isPadReleaseMinus(s32 port = -1); |
| 155 | bool isPadReleaseTouch(); |
| 156 | bool isPadReleaseUpLeftStick(s32 port = -1); |
| 157 | bool isPadReleaseDownLeftStick(s32 port = -1); |
| 158 | bool isPadReleaseLeftLeftStick(s32 port = -1); |
| 159 | bool isPadReleaseRightLeftStick(s32 port = -1); |
| 160 | bool isPadReleaseUpRightStick(s32 port = -1); |
| 161 | bool isPadReleaseDownRightStick(s32 port = -1); |
| 162 | bool isPadReleaseLeftRightStick(s32 port = -1); |
| 163 | bool isPadReleaseRightRightStick(s32 port = -1); |
| 164 | bool isPadReleaseUiCursorUp(s32 port = -1); // TODO implement below |
| 165 | bool isPadReleaseUiCursorDown(s32 port = -1); |
| 166 | bool isPadReleaseUiCursorLeft(s32 port = -1); |
| 167 | bool isPadReleaseUiCursorRight(s32 port = -1); |
| 168 | |
| 169 | const sead::Vector2f& getLeftStick(s32 port = -1); |
| 170 | const sead::Vector2f& getRightStick(s32 port = -1); |
| 171 | |
| 172 | void getPadCrossDir(sead::Vector2f*, s32); |
| 173 | void getPadCrossDirSideways(sead::Vector2f*, s32); |
| 174 | |
| 175 | void calcTouchScreenPos(sead::Vector2f*); |
| 176 | void calcTouchLayoutPos(sead::Vector2f*); |
| 177 | |
| 178 | bool isTouchPosInRect(const sead::Vector2f&, const sead::Vector2f&); |
| 179 | bool isTouchPosInCircle(const sead::Vector2f&, f32); |
| 180 | bool isTouchPosInCircleByWorldPos(const sead::Vector2f&, const IUseCamera*, f32, f32); |
| 181 | bool isPadTouchRect(f32, f32, f32, f32); |
| 182 | |
| 183 | void setPadRepeat(s32, s32, s32, s32); |
| 184 | |
| 185 | s32 getPlayerControllerPort(s32 index); |
| 186 | s32 getTouchPanelPort(); |
| 187 | s32 getMainControllerPort(); |
| 188 | s32 getMainJoyPadDoublePort(); |
| 189 | s32 getMainJoyPadSingleRightPort(); |
| 190 | s32 getMainJoyPadSingleLeftPort(); |
| 191 | |
| 192 | bool isSameNpadId(u32, s32); // TODO implement |
| 193 | |
| 194 | } // namespace al |
| 195 | |