From 55bfff7cf6541caac172b43186cf14405185b14d Mon Sep 17 00:00:00 2001 From: Andrew Opalach Date: Sat, 13 Apr 2019 12:40:52 -0400 Subject: fix curses on linux --- core/include/input.h | 18 ++++++++--------- core/include/matrix.h | 30 +++++++++++++-------------- core/include/test.h | 16 +++++++-------- core/include/types.h | 56 +++++++++++++++++++++++++-------------------------- 4 files changed, 60 insertions(+), 60 deletions(-) (limited to 'core/include') 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 -#include - -struct cetris_game; - -bool handle_inputs(struct cetris_game* g); -void clear_held_key(struct cetris_game* g); +#pragma once + +#include +#include + +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 - -#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 + +#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 - -#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 + +#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; -- cgit v1.2.3-101-g0448