MXVK Vulkan Framework 0.24.0
C++20 Vulkan rendering framework for practical 2D and 3D application development with SDL3.
Loading...
Searching...
No Matches
common.hpp
Go to the documentation of this file.
1#ifndef MUTATRIS_COMMON_HPP
2#define MUTATRIS_COMMON_HPP
3
4#include <SDL3/SDL_stdinc.h>
5
6namespace mutatris {
7
8 constexpr int DESIGN_WIDTH = 1280;
9 constexpr int DESIGN_HEIGHT = 720;
10 constexpr int BLOCK_WIDTH = 16;
11 constexpr int BLOCK_HEIGHT = 16;
12 constexpr int BLOCK_DRAW_WIDTH = 14;
13 constexpr int BLOCK_DRAW_HEIGHT = 14;
14 constexpr int TOP_BOTTOM_GRID_PIXEL_WIDTH = 384;
15 constexpr int SIDE_GRID_PIXEL_WIDTH = 448;
17 constexpr int TOP_GRID_HEIGHT = (DESIGN_HEIGHT / BLOCK_HEIGHT / 2) + 1;
19 constexpr int SIDE_GRID_WIDTH = GRID_WIDTH + 1;
22 constexpr int TOP_GRID_Y = 0;
26 constexpr Uint32 STARTUP_FADE_MS = 2520;
27 constexpr Uint32 STARTUP_HOLD_MS = 900;
28 constexpr Uint32 KEY_REPEAT_MS = 120;
29 constexpr Uint32 CLEAR_ANIMATION_MS = 400;
30 constexpr int CLEAR_ANIMATION_FRAMES = 24;
31 constexpr int CLEARS_PER_LEVEL = 8;
32 constexpr int LEVEL_TIMEOUT_STEP_MS = 100;
33 constexpr unsigned int MIN_DROP_TIMEOUT_MS = 125;
34
42
43 struct Block {
44 int color = 0;
45 Uint32 clearElapsedMs = 0;
46 };
47
48} // namespace mutatris
49
50#endif
constexpr int GRID_WIDTH
Definition common.hpp:16
constexpr unsigned int MIN_DROP_TIMEOUT_MS
Definition common.hpp:33
constexpr Uint32 STARTUP_FADE_MS
Definition common.hpp:26
constexpr int BLOCK_HEIGHT
Definition common.hpp:11
constexpr int SIDE_GRID_Y
Definition common.hpp:24
constexpr int SIDE_GRID_WIDTH
Definition common.hpp:19
constexpr int CLEARS_PER_LEVEL
Definition common.hpp:31
constexpr int SIDE_GRID_PIXEL_WIDTH
Definition common.hpp:15
constexpr int CENTER_GRID_X
Definition common.hpp:21
constexpr Uint32 KEY_REPEAT_MS
Definition common.hpp:28
constexpr int BLOCK_DRAW_WIDTH
Definition common.hpp:12
constexpr int BOTTOM_GRID_Y
Definition common.hpp:23
constexpr Uint32 CLEAR_ANIMATION_MS
Definition common.hpp:29
constexpr int TOP_GRID_Y
Definition common.hpp:22
constexpr int TOP_BOTTOM_GRID_PIXEL_WIDTH
Definition common.hpp:14
constexpr int SIDE_GRID_HEIGHT
Definition common.hpp:20
constexpr int CLEAR_ANIMATION_FRAMES
Definition common.hpp:30
constexpr int BOTTOM_GRID_HEIGHT
Definition common.hpp:18
constexpr int DESIGN_WIDTH
Definition common.hpp:8
constexpr int DESIGN_HEIGHT
Definition common.hpp:9
constexpr int LEVEL_TIMEOUT_STEP_MS
Definition common.hpp:32
constexpr int TOP_GRID_HEIGHT
Definition common.hpp:17
constexpr int RIGHT_GRID_X
Definition common.hpp:25
constexpr Uint32 STARTUP_HOLD_MS
Definition common.hpp:27
constexpr int BLOCK_DRAW_HEIGHT
Definition common.hpp:13
constexpr int BLOCK_WIDTH
Definition common.hpp:10
Uint32 clearElapsedMs
Definition common.hpp:45