чување bf8af47ba2d9456d65f1eb964946cbd129c39fed
родитељ f1923697e447f419b9bf497956ae68f1ef852390
Аутор: Страхиња Радић <sr@strahinja.org>
Датум: Wed, 20 Aug 2025 18:21:25 +0200
Replace several point assignments by calls to assign_point_*
Diffstat:
измењених датотека: 1, додавања: 3(+), брисања: 6(-)
diff --git a/linije.c b/linije.c
@@ -1804,18 +1804,15 @@ main(int argc, char** argv)
state.animation.active = 0;
SDL_GetMouseState(&px, &py);
- state.mouse.x = px;
- state.mouse.y = py;
+ assign_point_xyIF(px, py, &state.mouse);
last_time = SDL_GetTicks();
clock_getcpuclockid(getpid(), &cid);
clock_gettime(cid, &now);
srandom(now.tv_nsec);
- state.selection_start.x = -1;
- state.selection_start.y = -1;
- state.selection_end.x = -1;
- state.selection_end.y = -1;
+ assign_point_xyIF(-1, -1, &state.selection_start);
+ assign_point_xyIF(-1, -1, &state.selection_end);
fill_triplet(&state);
while (state.running)