aboutsummaryrefslogtreecommitdiff
path: root/src/sdl/action.h
blob: 6e199bcf2cd771af1bece17059c450d9be5d8cdd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
#ifndef ACTION_H
#define ACTION_H

#include <SDL.h>
#include "game-state.h"

typedef enum {
  ACTION_NONE,
  ACTION_QUIT,
  ACTION_MOVE,
  ACTION_WARP,
  ACTION_WARP_BUF_PUSH,
  ACTION_WARP_BUF_POP,
  ACTION_ZOOM_IN,
  ACTION_ZOOM_OUT,
  ACTION_ZOOM_RESET,
  ACTION_UNDO,
  ACTION_NEXT,
  ACTION_SOLVE,
  ACTION_SOLVE_CANCEL,
  ACTION_SOLVE_EVENT_STEP,
  ACTION_SOLVE_EVENT_FAIL,
  ACTION_SOLVE_EVENT_DONE,
  ACTION_RESET,
  ACTION_FULLSCREEN,
  ACTION_RESIZE,
  ACTION_LAST,
} action_type_t;

typedef struct {
  action_type_t type;
  uint64_t data;
} action_t;

action_t get_action(
  const game_state_t,
  const SDL_Event * const,
  const Uint32
);

#endif /* ACTION_H */