fixed static
This commit is contained in:
parent
c4171dc5d5
commit
f8ecb7be23
4 changed files with 9 additions and 8 deletions
3
.gitignore
vendored
3
.gitignore
vendored
|
|
@ -53,3 +53,6 @@ dkms.conf
|
|||
src/project.md
|
||||
src/tetris_bin
|
||||
src/.gpskip
|
||||
.gpskip
|
||||
ginpee.toml
|
||||
src/ginpee.toml
|
||||
|
|
|
|||
|
|
@ -1,4 +1,3 @@
|
|||
|
||||
.git/
|
||||
.vscode/
|
||||
.idea/
|
||||
|
|
@ -65,7 +64,9 @@ modules.order
|
|||
Module.symvers
|
||||
Mkfile.old
|
||||
dkms.conf
|
||||
project.md
|
||||
tetris_bin
|
||||
src/project.md
|
||||
src/tetris_bin
|
||||
src/.gpskip
|
||||
.gpskip
|
||||
ginpee.toml
|
||||
project.md
|
||||
|
||||
|
|
|
|||
|
|
@ -107,7 +107,7 @@ GameStateData* get_game_state() {
|
|||
return &game_state;
|
||||
}
|
||||
|
||||
static bool check_collision() {
|
||||
bool check_collision() {
|
||||
Figure* f = &game_state.current_figure;
|
||||
const int (*shape)[4] = get_figure_shape(f->type, f->rotation);
|
||||
|
||||
|
|
|
|||
|
|
@ -28,14 +28,12 @@ typedef struct {
|
|||
int rotation; // Поворот (0–3)
|
||||
} Figure;
|
||||
|
||||
// Структура состояния игры
|
||||
typedef struct {
|
||||
int field[FIELD_HEIGHT][FIELD_WIDTH]; // Игровое поле
|
||||
Figure current_figure; // Текущая фигура
|
||||
bool figure_active; // Есть активная фигура?
|
||||
} GameStateData;
|
||||
|
||||
// Ввод пользователя
|
||||
typedef enum {
|
||||
Undefined = -1,
|
||||
Start,
|
||||
|
|
@ -56,7 +54,6 @@ typedef enum {
|
|||
Figure7
|
||||
} UserAction_t;
|
||||
|
||||
// Основные функции библиотеки
|
||||
void user_input(UserAction_t action);
|
||||
static bool check_collision();
|
||||
GameStateData* get_game_state(void);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue