diff options
| author | 2019-04-13 12:40:52 -0400 | |
|---|---|---|
| committer | 2019-04-13 12:40:52 -0400 | |
| commit | 55bfff7cf6541caac172b43186cf14405185b14d (patch) | |
| tree | c1ae99d2b39f8df8933d81ec2e61e81050bdb410 /core/include | |
| parent | 761462861fc1228e65546c4e0f877d5212320082 (diff) | |
| download | cetris-55bfff7cf6541caac172b43186cf14405185b14d.tar.gz cetris-55bfff7cf6541caac172b43186cf14405185b14d.tar.bz2 cetris-55bfff7cf6541caac172b43186cf14405185b14d.zip | |
fix curses on linux
Diffstat (limited to 'core/include')
| -rw-r--r-- | core/include/input.h | 18 | ||||
| -rw-r--r-- | core/include/matrix.h | 30 | ||||
| -rw-r--r-- | core/include/test.h | 16 | ||||
| -rw-r--r-- | core/include/types.h | 56 |
4 files changed, 60 insertions, 60 deletions
diff --git a/core/include/input.h b/core/include/input.h index 1199991..3cfa947 100644 --- a/core/include/input.h +++ b/core/include/input.h @@ -1,9 +1,9 @@ -#pragma once - -#include <stdint.h> -#include <stdbool.h> - -struct cetris_game; - -bool handle_inputs(struct cetris_game* g); -void clear_held_key(struct cetris_game* g); +#pragma once
+
+#include <stdint.h>
+#include <stdbool.h>
+
+struct cetris_game;
+
+bool handle_inputs(struct cetris_game* g);
+void clear_held_key(struct cetris_game* g);
diff --git a/core/include/matrix.h b/core/include/matrix.h index 5b6a74c..658906c 100644 --- a/core/include/matrix.h +++ b/core/include/matrix.h @@ -1,15 +1,15 @@ -#pragma once - -#include <stdint.h> - -#include "types.h" -#include "cetris.h" - -extern const piece_matrix default_matrices[7]; -extern const vec2 basic_movements[4]; - -void move_current(struct cetris_game* g, vec2 offset); -void overlay_current_matrix(struct cetris_game* g); -void hard_drop(struct cetris_game* g); -void rotate_matrix(struct cetris_game* g, bool clockwise); -i8 check_new_matrix(struct cetris_game* g, piece_matrix m); +#pragma once
+
+#include <stdint.h>
+
+#include "types.h"
+#include "cetris.h"
+
+extern const piece_matrix default_matrices[7];
+extern const vec2 basic_movements[4];
+
+void move_current(struct cetris_game* g, vec2 offset);
+void overlay_current_matrix(struct cetris_game* g);
+void hard_drop(struct cetris_game* g);
+void rotate_matrix(struct cetris_game* g, bool clockwise);
+i8 check_new_matrix(struct cetris_game* g, piece_matrix m);
diff --git a/core/include/test.h b/core/include/test.h index 04fd09a..d700627 100644 --- a/core/include/test.h +++ b/core/include/test.h @@ -1,8 +1,8 @@ -struct cetris_game; - -enum tests { - TSPIN, - TSPIN_NO_LINES -}; - -void apply_test_board(struct cetris_game* g, enum tests t); +struct cetris_game;
+
+enum tests {
+ TSPIN,
+ TSPIN_NO_LINES
+};
+
+void apply_test_board(struct cetris_game* g, enum tests t);
diff --git a/core/include/types.h b/core/include/types.h index a20773b..0431de1 100644 --- a/core/include/types.h +++ b/core/include/types.h @@ -1,28 +1,28 @@ -#pragma once - -#include <stdint.h> - -#define u8 uint8_t -#define u16 uint16_t -#define u32 uint32_t -#define u64 uint64_t -#define i8 int8_t -#define i16 int16_t -#define i32 int32_t -#define i64 int64_t - -typedef struct { - i8 x; - i8 y; -} vec2; - -typedef u8 piece_matrix[4][4]; - -typedef enum { - DOWN = 1, - RIGHT = 2, - LEFT = 3, - ROTATE_CCW = 4, - ROTATE_CW = 5, - HARD_DROP = 6 -} input_t; +#pragma once
+
+#include <stdint.h>
+
+#define u8 uint8_t
+#define u16 uint16_t
+#define u32 uint32_t
+#define u64 uint64_t
+#define i8 int8_t
+#define i16 int16_t
+#define i32 int32_t
+#define i64 int64_t
+
+typedef struct {
+ i8 x;
+ i8 y;
+} vec2;
+
+typedef u8 piece_matrix[4][4];
+
+typedef enum {
+ DOWN = 1,
+ RIGHT = 2,
+ LEFT = 3,
+ ROTATE_CCW = 4,
+ ROTATE_CW = 5,
+ HARD_DROP = 6
+} input_t;
|