~ruther/CTU-FEE-B0B35APO-Semestral-project

ref: f9cc39006acbc2a7ea5bac86e175d021de92daca CTU-FEE-B0B35APO-Semestral-project/lib-pheripherals/src/direction.c -rw-r--r-- 308 bytes
f9cc3900 — František Boháček feat: add gui list commands for scrolling and clicking items 5 years ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#include "direction.h"

void direction_move_xy(direction_t direction, int32_t *x, int32_t *y, int16_t amount) {
  switch (direction) {
  case LEFT:
    *x -= amount;
    break;
  case RIGHT:
    *x += amount;
    break;
  case UP:
    *y -= amount;
    break;
  case DOWN:
    *y += amount;
    break;
  }
}