MXVK Vulkan Framework 0.24.0
C++20 Vulkan rendering framework for practical 2D and 3D application development with SDL3.
Loading...
Searching...
No Matches
mutatris Namespace Reference

Namespaces

namespace  anonymous_namespace{mutatris_window.cpp}

Classes

struct  Block
class  GameGrid
class  MutatrisWindow
class  Piece
class  PuzzleGame

Enumerations

enum class  Screen {
  Startup , Title , Difficulty , Playing ,
  GameOver
}

Variables

constexpr int BLOCK_DRAW_HEIGHT = 14
constexpr int BLOCK_DRAW_WIDTH = 14
constexpr int BLOCK_HEIGHT = 16
constexpr int BLOCK_WIDTH = 16
constexpr int BOTTOM_GRID_HEIGHT = DESIGN_HEIGHT / BLOCK_HEIGHT / 2
constexpr int BOTTOM_GRID_Y = DESIGN_HEIGHT - (BOTTOM_GRID_HEIGHT * BLOCK_HEIGHT)
constexpr int CENTER_GRID_X = (DESIGN_WIDTH - TOP_BOTTOM_GRID_PIXEL_WIDTH) / 2
constexpr int CLEAR_ANIMATION_FRAMES = 24
constexpr Uint32 CLEAR_ANIMATION_MS = 400
constexpr int CLEARS_PER_LEVEL = 8
constexpr int DESIGN_HEIGHT = 720
constexpr int DESIGN_WIDTH = 1280
constexpr int GRID_WIDTH = TOP_BOTTOM_GRID_PIXEL_WIDTH / BLOCK_WIDTH
constexpr Uint32 KEY_REPEAT_MS = 120
constexpr int LEVEL_TIMEOUT_STEP_MS = 100
constexpr unsigned int MIN_DROP_TIMEOUT_MS = 125
constexpr int RIGHT_GRID_X = DESIGN_WIDTH - SIDE_GRID_PIXEL_WIDTH
constexpr int SIDE_GRID_HEIGHT = SIDE_GRID_PIXEL_WIDTH / BLOCK_HEIGHT
constexpr int SIDE_GRID_PIXEL_WIDTH = 448
constexpr int SIDE_GRID_WIDTH = GRID_WIDTH + 1
constexpr int SIDE_GRID_Y = (DESIGN_HEIGHT - (SIDE_GRID_WIDTH * BLOCK_WIDTH)) / 2
constexpr Uint32 STARTUP_FADE_MS = 2520
constexpr Uint32 STARTUP_HOLD_MS = 900
constexpr int TOP_BOTTOM_GRID_PIXEL_WIDTH = 384
constexpr int TOP_GRID_HEIGHT = (DESIGN_HEIGHT / BLOCK_HEIGHT / 2) + 1
constexpr int TOP_GRID_Y = 0

Enumeration Type Documentation

◆ Screen

enum class mutatris::Screen
strong
Enumerator
Startup 
Title 
Difficulty 
Playing 
GameOver 

Definition at line 35 of file common.hpp.

35 {
36 Startup,
37 Title,
39 Playing,
41 };
@ GameOver
Player has no remaining lives.
@ Playing
Active gameplay.

Variable Documentation

◆ BLOCK_DRAW_HEIGHT

int mutatris::BLOCK_DRAW_HEIGHT = 14
constexpr

Definition at line 13 of file common.hpp.

◆ BLOCK_DRAW_WIDTH

int mutatris::BLOCK_DRAW_WIDTH = 14
constexpr

Definition at line 12 of file common.hpp.

◆ BLOCK_HEIGHT

int mutatris::BLOCK_HEIGHT = 16
constexpr

Definition at line 11 of file common.hpp.

◆ BLOCK_WIDTH

int mutatris::BLOCK_WIDTH = 16
constexpr

Definition at line 10 of file common.hpp.

◆ BOTTOM_GRID_HEIGHT

int mutatris::BOTTOM_GRID_HEIGHT = DESIGN_HEIGHT / BLOCK_HEIGHT / 2
constexpr

Definition at line 18 of file common.hpp.

◆ BOTTOM_GRID_Y

int mutatris::BOTTOM_GRID_Y = DESIGN_HEIGHT - (BOTTOM_GRID_HEIGHT * BLOCK_HEIGHT)
constexpr

Definition at line 23 of file common.hpp.

◆ CENTER_GRID_X

int mutatris::CENTER_GRID_X = (DESIGN_WIDTH - TOP_BOTTOM_GRID_PIXEL_WIDTH) / 2
constexpr

Definition at line 21 of file common.hpp.

◆ CLEAR_ANIMATION_FRAMES

int mutatris::CLEAR_ANIMATION_FRAMES = 24
constexpr

Definition at line 30 of file common.hpp.

◆ CLEAR_ANIMATION_MS

Uint32 mutatris::CLEAR_ANIMATION_MS = 400
constexpr

Definition at line 29 of file common.hpp.

◆ CLEARS_PER_LEVEL

int mutatris::CLEARS_PER_LEVEL = 8
constexpr

Definition at line 31 of file common.hpp.

◆ DESIGN_HEIGHT

int mutatris::DESIGN_HEIGHT = 720
constexpr

Definition at line 9 of file common.hpp.

◆ DESIGN_WIDTH

int mutatris::DESIGN_WIDTH = 1280
constexpr

Definition at line 8 of file common.hpp.

◆ GRID_WIDTH

int mutatris::GRID_WIDTH = TOP_BOTTOM_GRID_PIXEL_WIDTH / BLOCK_WIDTH
constexpr

Definition at line 16 of file common.hpp.

◆ KEY_REPEAT_MS

Uint32 mutatris::KEY_REPEAT_MS = 120
constexpr

Definition at line 28 of file common.hpp.

◆ LEVEL_TIMEOUT_STEP_MS

int mutatris::LEVEL_TIMEOUT_STEP_MS = 100
constexpr

Definition at line 32 of file common.hpp.

◆ MIN_DROP_TIMEOUT_MS

unsigned int mutatris::MIN_DROP_TIMEOUT_MS = 125
constexpr

Definition at line 33 of file common.hpp.

◆ RIGHT_GRID_X

int mutatris::RIGHT_GRID_X = DESIGN_WIDTH - SIDE_GRID_PIXEL_WIDTH
constexpr

Definition at line 25 of file common.hpp.

◆ SIDE_GRID_HEIGHT

int mutatris::SIDE_GRID_HEIGHT = SIDE_GRID_PIXEL_WIDTH / BLOCK_HEIGHT
constexpr

Definition at line 20 of file common.hpp.

◆ SIDE_GRID_PIXEL_WIDTH

int mutatris::SIDE_GRID_PIXEL_WIDTH = 448
constexpr

Definition at line 15 of file common.hpp.

◆ SIDE_GRID_WIDTH

int mutatris::SIDE_GRID_WIDTH = GRID_WIDTH + 1
constexpr

Definition at line 19 of file common.hpp.

◆ SIDE_GRID_Y

int mutatris::SIDE_GRID_Y = (DESIGN_HEIGHT - (SIDE_GRID_WIDTH * BLOCK_WIDTH)) / 2
constexpr

Definition at line 24 of file common.hpp.

◆ STARTUP_FADE_MS

Uint32 mutatris::STARTUP_FADE_MS = 2520
constexpr

Definition at line 26 of file common.hpp.

◆ STARTUP_HOLD_MS

Uint32 mutatris::STARTUP_HOLD_MS = 900
constexpr

Definition at line 27 of file common.hpp.

◆ TOP_BOTTOM_GRID_PIXEL_WIDTH

int mutatris::TOP_BOTTOM_GRID_PIXEL_WIDTH = 384
constexpr

Definition at line 14 of file common.hpp.

◆ TOP_GRID_HEIGHT

int mutatris::TOP_GRID_HEIGHT = (DESIGN_HEIGHT / BLOCK_HEIGHT / 2) + 1
constexpr

Definition at line 17 of file common.hpp.

◆ TOP_GRID_Y

int mutatris::TOP_GRID_Y = 0
constexpr

Definition at line 22 of file common.hpp.