MCPcopy Create free account
hub / github.com/ClassiCube/ClassiCube / Input_AddTouch

Function Input_AddTouch

src/Input.c:77–97  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

75}
76
77void Input_AddTouch(long id, int x, int y) {
78 int i;
79 /* Check if already existing pointer with same ID */
80 if (TryUpdateTouch(id, x, y)) return;
81
82 for (i = 0; i < INPUT_MAX_POINTERS; i++)
83 {
84 if (touches[i].type) continue;
85
86 touches[i].id = id;
87 touches[i].type = TOUCH_TYPE_ALL;
88 touches[i].begX = x;
89 touches[i].begY = y;
90 touches[i].start = Game.Time;
91
92 if (i == Pointers_Count) Pointers_Count++;
93 Pointer_SetPosition(i, x, y);
94 Pointer_SetPressed(i, true);
95 return;
96 }
97}
98void Input_UpdateTouch(long id, int x, int y) { TryUpdateTouch(id, x, y); }
99
100void Input_RemoveTouch(long id, int x, int y) {

Callers 9

Window_ProcedureFunction · 0.85
OnTouchStartFunction · 0.85
ProcessTouchInputFunction · 0.85
ProcessTouchInputFunction · 0.85
java_processPointerDownFunction · 0.85
ProcessTouchInputFunction · 0.85
Window_ProcessEventsFunction · 0.85
ProcessTouchInputFunction · 0.85
ProcessVpadTouchFunction · 0.85

Calls 3

TryUpdateTouchFunction · 0.85
Pointer_SetPositionFunction · 0.85
Pointer_SetPressedFunction · 0.85

Tested by

no test coverage detected