summaryrefslogtreecommitdiff
path: root/src/include/common.h
blob: bc3911a359845268d00beb8697a4c4d9181c1b3c (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
42
43
44
#ifndef TCOMMON_H
#define TCOMMON_H

#include <SFML/Audio.h>
#include <SFML/Graphics.h>
#include <SFML/System.h>
#include <SFML/Window/Keyboard.h>
#include <stdio.h>
#include <stdlib.h>
#include <stdint.h>
#include <string.h>
#include <time.h>
#include "tet_conf.h"

struct tCell {
    uint8_t a; // active/empty state of cell
    sfColor fColor; // fill color
};
struct tCell fldCAtt[25][10];// fld cells attributes


/*
 * shape coords
 * y
 * ^. . . .
 * |. . . .
 * |. . . .
 * |. . . .
 * 0------->x
 *
 */

struct shapeSt {
    int x; // x coord of shape's left side
    int y; // y coord of shape's bottom
    int t; // shape type
    sfColor fColor; // shape color
    uint8_t c[4][4]; // array of shape cells
};

struct shapeSt actiSh;
struct shapeSt nxtShape;

#endif