remove vk_clickable from components

This commit is contained in:
jacekpoz 2024-08-13 00:45:13 +02:00
parent 7cc71d3177
commit 0788992af4
Signed by: poz
SSH key fingerprint: SHA256:JyLeVWE4bF3tDnFeUpUaJsPsNlJyBldDGV/dIKSLyN8

View file

@ -100,27 +100,6 @@ void vk_component(PtkHandle component) {
vk_transfer_vertex_data(); vk_transfer_vertex_data();
} }
void vk_clickable(PtkClickable *clickable) {
PTK_LIST_ADD(PtkHandle, m_components, clickable);
switch (clickable->hitbox->type) {
// case PTK_COMPONENT_TYPE_BOX: {
// _vk_box((PtkComponent *)clickable->hitbox);
// } break;
case PTK_COMPONENT_TYPE_TRIANGLE: {
triangle((PtkTriangle *)clickable->hitbox, 0);
} break;
case PTK_COMPONENT_TYPE_RECT: {
rect((PtkRect *)clickable->hitbox);
} break;
case PTK_COMPONENT_TYPE_ELLIPSE: {
ellipse((PtkEllipse *)clickable->hitbox);
} break;
default:
return;
}
}
inline bool triangle_intersects(PtkTriangle t, PtkPos p) { inline bool triangle_intersects(PtkTriangle t, PtkPos p) {
PtkPos p0 = t.vertices[0]; PtkPos p0 = t.vertices[0];
PtkPos p1 = t.vertices[1]; PtkPos p1 = t.vertices[1];