summaryrefslogtreecommitdiff
path: root/include/common.h
blob: 36a2d2112f086ec93456aa97bb39110ab604f01f (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
struct field;
struct idlist;

enum game_state {
    GS_MAIN_MENU,
    GS_STARTED,
    GS_GAME_OVER,
    GS_GAME_OVER_WAIT,
    GS_PAUSED
};

struct game {
    enum game_state state;
    size_t      level;
    int         scoreCurrent;
    int         moveLatency;
    int         lines;
    sfClock    *gameTick;
    sfClock    *over_wait_tick;
    sfClock    *putTick;
    sfClock    *mTick;
    sfClock    *repPushDown;  // repeat latency when hold Down arrow
    sfClock    *repKeyLeft;   // repeat latency when hold Left arrow
    sfClock    *repKeyRight;  // repeat latency when hold Right arrow

    struct field *fld;
    struct field *nxt;
    struct idlist *texts;
};