mirror of
https://github.com/thepigeongenerator/tetris_clone.git
synced 2025-12-17 05:55:46 +01:00
reshape tetris window
This commit is contained in:
@@ -7,7 +7,7 @@
|
|||||||
|
|
||||||
// stores the data used in the game
|
// stores the data used in the game
|
||||||
#define COLUMNS ((int8_t)10)
|
#define COLUMNS ((int8_t)10)
|
||||||
#define ROWS ((int8_t)(COLUMNS * 2))
|
#define ROWS ((int8_t)24)
|
||||||
|
|
||||||
typedef const Colour8* CRow;
|
typedef const Colour8* CRow;
|
||||||
typedef Colour8* Row;
|
typedef Colour8* Row;
|
||||||
|
|||||||
@@ -5,14 +5,14 @@
|
|||||||
|
|
||||||
#include "../game/game.h"
|
#include "../game/game.h"
|
||||||
|
|
||||||
#define SCREEN_RESOLUTION 25 // pixels per block
|
#define PX_DENS 25 // pixel density; pixels per block
|
||||||
#define SCREEN_WIDTH ((COLUMNS) * 25) // window width
|
#define TET_PADDING 10 // padding around the tetris playing field
|
||||||
#define SCREEN_HEIGHT (SCREEN_WIDTH / COLUMNS * ROWS) // window height
|
#define TET_WIDTH (COLUMNS * PX_DENS - TET_PADDING) // tetris playing field width
|
||||||
#define TET_PADDING 10 // padding around the tetris playing field
|
#define TET_HEIGHT (TET_WIDTH / COLUMNS * ROWS) // tetris playing field height
|
||||||
#define TET_WIDTH (SCREEN_WIDTH - TET_PADDING * 2) // tetris playing field width
|
#define SCREEN_WIDTH ((COLUMNS + 4) * PX_DENS) // window width
|
||||||
#define TET_HEIGHT (SCREEN_HEIGHT - TET_PADDING * 2) // tetris playing field height
|
#define SCREEN_HEIGHT ((COLUMNS + 1) * PX_DENS / COLUMNS * ROWS) // window height
|
||||||
#define BLOCK_WIDTH (TET_WIDTH / COLUMNS) // width of a block
|
#define BLOCK_WIDTH (TET_WIDTH / COLUMNS) // width of a block
|
||||||
#define BLOCK_HEIGHT (TET_HEIGHT / ROWS) // height of a block
|
#define BLOCK_HEIGHT (TET_HEIGHT / ROWS) // height of a block
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
SDL_Window* window;
|
SDL_Window* window;
|
||||||
|
|||||||
Reference in New Issue
Block a user