use new error files

This commit is contained in:
2025-03-22 12:08:19 +01:00
parent fccf1c6276
commit 7fb624311f
9 changed files with 20 additions and 89 deletions

View File

@@ -7,7 +7,7 @@
#include <string.h>
#include <time.h>
#include "../main.h"
#include "../error.h"
#include "../window/audio.h"
#include "../window/colour8.h"
#include "./tetromino/shapes.h"
@@ -71,7 +71,7 @@ void game_init(game_data* const dat) {
// called every time the game's state is updated
void game_update(game_data* const dat, uint8_t const* const keys) {
if (keys[SDL_SCANCODE_ESCAPE])
stop();
set_gamestatus(STATUS_SUCCESS);
input_data move = MOVE_NONE; // contains the move data
uint32_t ctime = SDL_GetTicks();

View File

@@ -2,7 +2,7 @@
#include <stdint.h>
#include "../../main.h"
#include "../../error.h"
#include "../../window/colour8.h"
#include "../game.h"
#include "shapes.h"
@@ -116,7 +116,7 @@ void place_update(game_data* const game_data, input_data const move) {
next_shape(game_data);
if (shape_intersects(game_data->rows, game_data->curr_idx, game_data->sel_x, game_data->sel_y))
stop();
set_gamestatus(STATUS_SUCCESS);
return;
}