fixed static

This commit is contained in:
Rorikstr | Rust Dev 2025-09-27 17:22:52 +03:00
parent c4171dc5d5
commit f8ecb7be23
4 changed files with 9 additions and 8 deletions

3
.gitignore vendored
View file

@ -53,3 +53,6 @@ dkms.conf
src/project.md
src/tetris_bin
src/.gpskip
.gpskip
ginpee.toml
src/ginpee.toml

View file

@ -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

View file

@ -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);

View file

@ -28,14 +28,12 @@ typedef struct {
int rotation; // Поворот (03)
} 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);