mirror of
https://github.com/thepigeongenerator/tetris_clone.git
synced 2025-12-17 14:05:45 +01:00
use new error files
This commit is contained in:
@@ -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();
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user