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

Classes

struct  Block
struct  Cell
struct  CubeInstance
struct  FaceDraw
struct  GridCubePlacement
class  HighScores
struct  Layout
struct  Mesh
struct  MeshInstance
struct  MipLevel
struct  Piece
class  PongGame
struct  PoolBall
class  PuzzleDropWindow
struct  RasterVertex
struct  Score
struct  ScoreEntry
struct  SinkAnim
class  SoftwareRenderer
class  SurfaceDeleter
struct  Texture
struct  TextureLevel
struct  TexVertex
struct  Triangle

Typedefs

using SurfacePtr = std::unique_ptr<SDL_Surface, SurfaceDeleter>

Enumerations

enum class  BlockType {
  Null = 0 , Clear , Red1 , Red2 ,
  Red3 , Green1 , Green2 , Green3 ,
  Blue1 , Blue2 , Blue3 , Match
}
enum class  GamePhase {
  Aiming , Charging , Rolling , Placing ,
  GameOver
}
enum class  GameScreen { Intro , Scores , Game , Start }
enum class  Screen {
  Intro , Menu , Game , Scores ,
  Credits , NameEntry , Intro , Menu ,
  Game , Scores , Credits , NameEntry
}
enum class  Screen {
  Intro , Menu , Game , Scores ,
  Credits , NameEntry , Intro , Menu ,
  Game , Scores , Credits , NameEntry
}
enum class  ShiftDirection { Down , Up }

Functions

void build_mipmaps (Texture &texture)
SurfacePtr create_frame_surface (int width, int height)
SurfacePtr createFrameSurface (int width, int height)
bool crosses_horizontal_texture_seam (const std::array< mxvk::vec2D, 3 > &texcoords)
bool hasPoolAssets (const std::filesystem::path &root)
bool hasResolutionArgument (int argc, char **argv)
mxvk::MXCOLOR interpolate_color (mxvk::MXCOLOR first, mxvk::MXCOLOR second, float fraction)
bool is_play_block (BlockType type)
Texture load_texture (const std::string &filename, const std::string &asset_path, bool generate_mipmaps)
Texture load_texture (const std::string &path)
Texture load_texture (const std::string &path, bool generate_mipmaps=false)
std::filesystem::path model_path (const std::string &filename, const std::string &asset_path)
mxvk::MXCOLOR pack_color (std::uint32_t red, std::uint32_t green, std::uint32_t blue, std::uint32_t alpha)
std::filesystem::path pyramid_path (const std::string &asset_path)
float randFloat (float mn, float mx)
std::string resolve_texture_path (const Arguments &args)
std::filesystem::path resolveAssetRoot (const std::string &path)
std::filesystem::path resolvePuzzleAssetRoot (const std::filesystem::path &asset_root)
bool same_or_match (BlockType actual, BlockType expected)
std::filesystem::path scorePath (const std::filesystem::path &asset_root)
int texture_index (BlockType type)
std::filesystem::path texture_path (const std::string &filename, const std::string &asset_path)
std::array< mxvk::vec2D, 3 > unwrap_horizontal_texcoords (std::array< mxvk::vec2D, 3 > texcoords)

Variables

constexpr float AIM_LENGTH = 2.0f
constexpr float AIM_THICKNESS_Y = 0.008f
constexpr float AIM_THICKNESS_Z = 0.015f
constexpr std::string_view APP_NAME = "3dmath_plg_loader"
constexpr std::string_view BACKEND_NAME = "native"
constexpr mxvk::MXCOLOR BACKGROUND_COLOR = mxvk::MXVK_RGB(3, 4, 8)
const std::array< glm::vec3, NUM_BALLSBALL_COLORS
constexpr float BALL_RADIUS = 0.14f
constexpr int base_height = 1080
constexpr int base_width = 1440
constexpr float BLOCK_HALF_EXTENT = 0.064f
constexpr float BLOCK_SPACING = 0.145f
constexpr std::array< const char *, 10 > BLOCK_TEXTURE_FILES
constexpr int board_cols = 8
constexpr int BOARD_HEIGHT = 22
constexpr int board_rows = 18
constexpr int BOARD_WIDTH = 20
constexpr float CAM_BASE_TOTAL_SCALE = 1.359411f
constexpr float CAMERA_DISTANCE = 7.0f
constexpr float CAMERA_ZOOM_STEP = 0.45f
constexpr float COURT_HALF_HEIGHT = 1.45f
constexpr float COURT_HALF_WIDTH = 2.65f
constexpr float CUE_LENGTH = 2.5f
constexpr float CUE_THICKNESS = 0.03f
constexpr int DEFAULT_FRAME_HEIGHT = 240
constexpr int DEFAULT_FRAME_WIDTH = 320
constexpr std::string_view DEFAULT_MODEL = "sphere.plg"
constexpr std::array< float, 3 > FALL_SECONDS {0.86f, 0.68f, 0.50f}
constexpr int flash_time_ms = 180
constexpr float FRAME_GAP = 0.016f
constexpr float FRAME_HALF_EXTENT = BLOCK_HALF_EXTENT * 0.72f
constexpr float FRICTION = 0.9988f
constexpr int game_base_height = 480
constexpr int game_base_width = 640
constexpr int game_block_height = 14
constexpr int game_block_spacing = 1
constexpr int game_block_width = 31
constexpr int game_board_start_x = 184
constexpr int game_board_start_y = 78
constexpr int game_next_panel_x = 450
constexpr int game_next_panel_y = 180
constexpr float GRID_DEFAULT_CAMERA_DISTANCE = 2.45f
constexpr float GRID_MAX_CAMERA_DISTANCE = 9.0f
constexpr float GRID_MAX_PITCH = 70.0f
constexpr float GRID_MIN_CAMERA_DISTANCE = 1.65f
constexpr float GRID_MIN_PITCH = -70.0f
constexpr float GRID_PITCH_SPEED = 90.0f
constexpr int GRID_VERTICAL_GAP = 5
constexpr float GRID_YAW_SPEED = 115.0f
constexpr float GRID_ZOOM_SPEED = 3.2f
constexpr Uint32 joy_repeat_delay_ms = 180
constexpr Sint16 joystick_dead_zone = 16000
constexpr int LEVEL_COUNT = 8
constexpr int lines_per_speedup = 10
constexpr float MAX_CAMERA_DISTANCE = 12.0f
constexpr int max_name_length = 16
constexpr float MAX_PITCH_DEGREES = 89.0f
constexpr float MAX_POWER = 1.5f
constexpr int max_scores = 8
constexpr int menu_item_count = 4
constexpr float MIN_CAMERA_DISTANCE = 2.5f
constexpr float MIN_SPEED = 0.001f
constexpr std::string_view MODEL_FORMAT = "PLG"
constexpr float MODEL_SCALE = 2.0f
constexpr float MOUSE_ROTATION_SENSITIVITY = 0.35f
constexpr int NUM_BALLS = 16
constexpr float PADDLE_HALF_HEIGHT = 0.42f
constexpr float PADDLE_HALF_WIDTH = 0.12f
constexpr float PADDLE_X = 2.25f
constexpr float PI = 3.14159265358979323846f
constexpr int piece_height = 3
constexpr float POCKET_INSET = 0.25f
constexpr float POCKET_R = 0.25f
const std::array< glm::vec2, 6 > POCKETS
constexpr int score_points_per_match = 6
constexpr float SINK_DURATION = 0.45f
constexpr float TABLE_H = 6.0f
constexpr float TABLE_HALF_H = TABLE_H / 2.0f
constexpr float TABLE_HALF_W = TABLE_W / 2.0f
constexpr float TABLE_W = 12.0f
constexpr int title_screen_time_ms = 1500
constexpr mxvk::MXCOLOR transparent_black = 0x00000000U
constexpr int WINDOW_HEIGHT = 1080
constexpr std::string_view WINDOW_TITLE = "MXVK 3D Math PLG Loader"
constexpr int WINDOW_WIDTH = 1440

Typedef Documentation

◆ SurfacePtr

typedef std::unique_ptr< SDL_Surface, SurfaceDeleter > anonymous_namespace{main.cpp}::SurfacePtr = std::unique_ptr<SDL_Surface, SurfaceDeleter>

Definition at line 29 of file main.cpp.

Enumeration Type Documentation

◆ BlockType

◆ GamePhase

enum class anonymous_namespace{main.cpp}::GamePhase
strong
Enumerator
Aiming 
Charging 
Rolling 
Placing 
GameOver 

Definition at line 135 of file main.cpp.

◆ GameScreen

enum class anonymous_namespace{main.cpp}::GameScreen
strong
Enumerator
Intro 
Scores 
Game 
Start 

Definition at line 129 of file main.cpp.

◆ Screen [1/2]

enum class anonymous_namespace{main.cpp}::Screen
strong
Enumerator
Intro 
Menu 
Game 
Scores 
Credits 
NameEntry 
Intro 
Menu 
Game 
Scores 
Credits 
NameEntry 

Definition at line 64 of file main.cpp.

◆ Screen [2/2]

enum class anonymous_namespace{main.cpp}::Screen
strong
Enumerator
Intro 
Menu 
Game 
Scores 
Credits 
NameEntry 
Intro 
Menu 
Game 
Scores 
Credits 
NameEntry 

Definition at line 49 of file main.cpp.

49 {
50 Intro,
51 Menu,
52 Game,
53 Scores,
54 Credits,
56 };

◆ ShiftDirection

enum class anonymous_namespace{main.cpp}::ShiftDirection
strong
Enumerator
Down 
Up 

Definition at line 80 of file main.cpp.

Function Documentation

◆ build_mipmaps()

void anonymous_namespace{main.cpp}::build_mipmaps ( Texture & texture)

Definition at line 256 of file main.cpp.

256 {
257 int source_width = texture.width;
258 int source_height = texture.height;
259 const std::vector<mxvk::MXCOLOR> *source_pixels = &texture.pixels;
260 while (source_width > 1 || source_height > 1) {
261 TextureLevel level;
262 level.width = std::max(1, source_width / 2);
263 level.height = std::max(1, source_height / 2);
264 level.pixels.resize(static_cast<std::size_t>(level.width * level.height));
265 for (int y = 0; y < level.height; ++y) {
266 for (int x = 0; x < level.width; ++x) {
267 std::uint32_t red = 0;
268 std::uint32_t green = 0;
269 std::uint32_t blue = 0;
270 std::uint32_t alpha = 0;
271 for (int offset_y = 0; offset_y < 2; ++offset_y) {
272 for (int offset_x = 0; offset_x < 2; ++offset_x) {
273 const int source_x = std::min(x * 2 + offset_x, source_width - 1);
274 const int source_y = std::min(y * 2 + offset_y, source_height - 1);
275 const mxvk::MXCOLOR color = (*source_pixels)[static_cast<std::size_t>(source_y * source_width + source_x)];
276 red += mxvk::color_r(color);
277 green += mxvk::color_g(color);
278 blue += mxvk::color_b(color);
279 alpha += mxvk::color_a(color);
280 }
281 }
282 level.pixels[static_cast<std::size_t>(y * level.width + x)] =
283 ((alpha / 4U) << 24U) |
284 ((red / 4U) << 16U) |
285 ((green / 4U) << 8U) |
286 (blue / 4U);
287 }
288 }
289 texture.mipmaps.push_back(std::move(level));
290 source_width = texture.mipmaps.back().width;
291 source_height = texture.mipmaps.back().height;
292 source_pixels = &texture.mipmaps.back().pixels;
293 }
294 }
constexpr std::uint8_t color_r(MXCOLOR color)
Extract the red component from a packed ARGB color.
Definition mxvk_math.h:54
std::uint32_t MXCOLOR
Packed 32-bit color in ARGB byte order.
Definition mxvk_math.h:40
constexpr std::uint8_t color_g(MXCOLOR color)
Extract the green component from a packed ARGB color.
Definition mxvk_math.h:59
constexpr std::uint8_t color_a(MXCOLOR color)
Extract the alpha component from a packed ARGB color.
Definition mxvk_math.h:69
constexpr std::uint8_t color_b(MXCOLOR color)
Extract the blue component from a packed ARGB color.
Definition mxvk_math.h:64
std::vector< mxvk::MXCOLOR > pixels
Definition main.cpp:193
std::vector< TextureLevel > mipmaps
Definition main.cpp:200
std::vector< mxvk::MXCOLOR > pixels
Definition main.cpp:199

◆ create_frame_surface()

SurfacePtr anonymous_namespace{main.cpp}::create_frame_surface ( int width,
int height )
nodiscard

Definition at line 31 of file main.cpp.

31 {
32 SurfacePtr surface(SDL_CreateSurface(width, height, SDL_PIXELFORMAT_RGBA32));
33 if (!surface) {
34 throw mxvk::Exception(std::format("Failed to create 3dmath frame surface: {}", SDL_GetError()));
35 }
36 return surface;
37 }
std::unique_ptr< SDL_Surface, SurfaceDeleter > SurfacePtr
Definition main.cpp:29

◆ createFrameSurface()

SurfacePtr anonymous_namespace{main.cpp}::createFrameSurface ( int width,
int height )

Definition at line 120 of file main.cpp.

120 {
121 SurfacePtr surface(SDL_CreateSurface(width, height, SDL_PIXELFORMAT_RGBA32));
122 if (!surface) {
123 throw mxvk::Exception(std::format("Failed to create 3dmath_masterpiece frame surface: {}", SDL_GetError()));
124 }
125 return surface;
126 }

◆ crosses_horizontal_texture_seam()

bool anonymous_namespace{main.cpp}::crosses_horizontal_texture_seam ( const std::array< mxvk::vec2D, 3 > & texcoords)
nodiscard

Definition at line 259 of file main.cpp.

259 {
260 const auto [minimum, maximum] = std::minmax_element(
261 texcoords.begin(),
262 texcoords.end(),
263 [](const mxvk::vec2D &first, const mxvk::vec2D &second) {
264 return first.x < second.x;
265 });
266 const float span = maximum->x - minimum->x;
267 return span > 0.5f && span < 1.0f - mxvk::EPSILON;
268 }
Two-dimensional float vector with common arithmetic helpers.
Definition mxvk_math.h:177
constexpr float EPSILON
Default tolerance used for floating-point singularity and zero-length checks.
Definition mxvk_math.h:37

◆ hasPoolAssets()

bool anonymous_namespace{main.cpp}::hasPoolAssets ( const std::filesystem::path & root)

Definition at line 89 of file main.cpp.

89 {
90 const std::filesystem::path data = root / "data";
91 return std::filesystem::exists(data / "pooltable_felt.mxmod.z") &&
92 std::filesystem::exists(data / "pooltable_wood.mxmod.z") &&
93 std::filesystem::exists(data / "pooltable_pocket.mxmod.z") &&
94 std::filesystem::exists(data / "table.png");
95 }

◆ hasResolutionArgument()

bool anonymous_namespace{main.cpp}::hasResolutionArgument ( int argc,
char ** argv )

Definition at line 128 of file main.cpp.

128 {
129 for (int i = 1; i < argc; ++i) {
130 const std::string arg = argv[i] == nullptr ? std::string{} : std::string(argv[i]);
131 if (arg == "-r" || arg == "-R" || arg == "--resolution") {
132 return true;
133 }
134 }
135 return false;
136 }

◆ interpolate_color()

mxvk::MXCOLOR anonymous_namespace{main.cpp}::interpolate_color ( mxvk::MXCOLOR first,
mxvk::MXCOLOR second,
float fraction )
nodiscard

Definition at line 62 of file main.cpp.

62 {
63 const std::uint32_t second_weight = static_cast<std::uint32_t>(
64 std::clamp(static_cast<int>(fraction * 256.0f + 0.5f), 0, 256));
65 const std::uint32_t first_weight = 256U - second_weight;
66 const auto interpolate_channel = [first_weight, second_weight](std::uint8_t first_channel, std::uint8_t second_channel) {
67 return (static_cast<std::uint32_t>(first_channel) * first_weight +
68 static_cast<std::uint32_t>(second_channel) * second_weight +
69 128U) >>
70 8U;
71 };
72 return pack_color(
73 interpolate_channel(mxvk::color_r(first), mxvk::color_r(second)),
74 interpolate_channel(mxvk::color_g(first), mxvk::color_g(second)),
75 interpolate_channel(mxvk::color_b(first), mxvk::color_b(second)),
76 interpolate_channel(mxvk::color_a(first), mxvk::color_a(second)));
77 }
mxvk::MXCOLOR pack_color(std::uint32_t red, std::uint32_t green, std::uint32_t blue, std::uint32_t alpha)
Definition main.cpp:55

◆ is_play_block()

bool anonymous_namespace{main.cpp}::is_play_block ( BlockType type)
nodiscard

Definition at line 178 of file main.cpp.

178 {
179 return type >= BlockType::Red1 && type <= BlockType::Match;
180 }

◆ load_texture() [1/3]

Texture anonymous_namespace{main.cpp}::load_texture ( const std::string & filename,
const std::string & asset_path,
bool generate_mipmaps )
nodiscard

Definition at line 160 of file main.cpp.

160 {
161 if (filename.empty()) {
162 return {};
163 }
164
165 const std::filesystem::path path = texture_path(filename, asset_path);
166 SurfacePtr loaded(mxvk::LoadPNG(path.string().c_str()));
167 if (!loaded) {
168 throw mxvk::Exception(std::format("{}: failed to load texture '{}'", APP_NAME, path.string()));
169 }
170
171 SurfacePtr rgba(SDL_ConvertSurface(loaded.get(), SDL_PIXELFORMAT_RGBA32));
172 if (!rgba) {
173 throw mxvk::Exception(std::format("{}: failed to convert texture '{}': {}", APP_NAME, path.string(), SDL_GetError()));
174 }
175
176 const SDL_PixelFormatDetails *format = SDL_GetPixelFormatDetails(rgba->format);
177 if (format == nullptr) {
178 throw mxvk::Exception(std::format("{}: failed to query texture format '{}': {}", APP_NAME, path.string(), SDL_GetError()));
179 }
180
181 Texture texture;
182 MipLevel base_level;
183 base_level.width = rgba->w;
184 base_level.height = rgba->h;
185 base_level.pixels.resize(static_cast<std::size_t>(base_level.width) * static_cast<std::size_t>(base_level.height));
186 for (int y = 0; y < base_level.height; ++y) {
187 const auto *row = static_cast<const std::uint8_t *>(rgba->pixels) + static_cast<std::size_t>(y) * static_cast<std::size_t>(rgba->pitch);
188 const auto *source = reinterpret_cast<const std::uint32_t *>(row);
189 for (int x = 0; x < base_level.width; ++x) {
190 std::uint8_t red = 0;
191 std::uint8_t green = 0;
192 std::uint8_t blue = 0;
193 std::uint8_t alpha = 0;
194 SDL_GetRGBA(source[x], format, nullptr, &red, &green, &blue, &alpha);
195 base_level.pixels[static_cast<std::size_t>(y) * static_cast<std::size_t>(base_level.width) + static_cast<std::size_t>(x)] =
196 pack_color(red, green, blue, alpha);
197 }
198 }
199 texture.levels.push_back(std::move(base_level));
200
201 while (generate_mipmaps && (texture.levels.back().width > 1 || texture.levels.back().height > 1)) {
202 const MipLevel &source = texture.levels.back();
203 MipLevel destination;
204 destination.width = std::max(1, (source.width + 1) / 2);
205 destination.height = std::max(1, (source.height + 1) / 2);
206 destination.pixels.resize(static_cast<std::size_t>(destination.width) * static_cast<std::size_t>(destination.height));
207 for (int y = 0; y < destination.height; ++y) {
208 for (int x = 0; x < destination.width; ++x) {
209 const int first_x = std::min(x * 2, source.width - 1);
210 const int second_x = std::min(first_x + 1, source.width - 1);
211 const int first_y = std::min(y * 2, source.height - 1);
212 const int second_y = std::min(first_y + 1, source.height - 1);
213 const auto texel = [&source](int source_x, int source_y) {
214 return source.pixels[static_cast<std::size_t>(source_y) * static_cast<std::size_t>(source.width) + static_cast<std::size_t>(source_x)];
215 };
216 const std::array<mxvk::MXCOLOR, 4> colors = {
217 texel(first_x, first_y),
218 texel(second_x, first_y),
219 texel(first_x, second_y),
220 texel(second_x, second_y),
221 };
222 const auto average_channel = [&colors](auto component) {
223 std::uint32_t sum = 0;
224 for (const mxvk::MXCOLOR color : colors) {
225 sum += component(color);
226 }
227 return (sum + 2U) / 4U;
228 };
229 destination.pixels[static_cast<std::size_t>(y) * static_cast<std::size_t>(destination.width) + static_cast<std::size_t>(x)] =
231 average_channel(mxvk::color_r),
232 average_channel(mxvk::color_g),
233 average_channel(mxvk::color_b),
234 average_channel(mxvk::color_a));
235 }
236 }
237 texture.levels.push_back(std::move(destination));
238 }
239
240 std::cout << std::format(
241 "{}: loaded texture '{}' ({}x{}, {} mip levels)\n",
242 APP_NAME,
243 path.string(),
244 texture.width(),
245 texture.height(),
246 texture.levels.size());
247 return texture;
248 }
std::filesystem::path texture_path(const std::string &filename, const std::string &asset_path)
Definition main.cpp:147
constexpr std::string_view APP_NAME
Definition main.cpp:38
SDL_Surface * LoadPNG(const char *file)
Load a PNG file into an SDL_Surface.
Definition mxvk_png.cpp:103

◆ load_texture() [2/3]

Texture anonymous_namespace{main.cpp}::load_texture ( const std::string & path)
nodiscard

Definition at line 102 of file main.cpp.

102 {
103 SurfacePtr loaded(mxvk::LoadPNG(path.c_str()));
104 if (!loaded) {
105 throw mxvk::Exception(std::format("3dmath_texture: failed to load PNG '{}'", path));
106 }
107
108 SurfacePtr rgba(SDL_ConvertSurface(loaded.get(), SDL_PIXELFORMAT_RGBA32));
109 if (!rgba) {
110 throw mxvk::Exception(std::format("3dmath_texture: failed to convert PNG '{}': {}", path, SDL_GetError()));
111 }
112
113 const SDL_PixelFormatDetails *format = SDL_GetPixelFormatDetails(rgba->format);
114 if (format == nullptr) {
115 throw mxvk::Exception(std::format("3dmath_texture: failed to query PNG format '{}': {}", path, SDL_GetError()));
116 }
117
118 Texture texture;
119 texture.width = rgba->w;
120 texture.height = rgba->h;
121 texture.pixels.resize(static_cast<std::size_t>(texture.width * texture.height));
122
123 for (int y = 0; y < texture.height; ++y) {
124 const auto *row = static_cast<const std::uint8_t *>(rgba->pixels) + (static_cast<std::size_t>(y) * static_cast<std::size_t>(rgba->pitch));
125 const auto *src = reinterpret_cast<const std::uint32_t *>(row);
126 for (int x = 0; x < texture.width; ++x) {
127 std::uint8_t r = 0;
128 std::uint8_t g = 0;
129 std::uint8_t b = 0;
130 std::uint8_t a = 0;
131 SDL_GetRGBA(src[x], format, nullptr, &r, &g, &b, &a);
132 texture.pixels[static_cast<std::size_t>(y * texture.width + x)] =
133 (static_cast<mxvk::MXCOLOR>(a) << 24U) |
134 (static_cast<mxvk::MXCOLOR>(r) << 16U) |
135 (static_cast<mxvk::MXCOLOR>(g) << 8U) |
136 static_cast<mxvk::MXCOLOR>(b);
137 }
138 }
139
140 return texture;
141 }

◆ load_texture() [3/3]

Texture anonymous_namespace{main.cpp}::load_texture ( const std::string & path,
bool generate_mipmaps = false )
nodiscard

Definition at line 296 of file main.cpp.

296 {
297 SurfacePtr loaded(mxvk::LoadPNG(path.c_str()));
298 if (!loaded) {
299 throw mxvk::Exception(std::format("3dmath_puzzle_drop: failed to load PNG '{}'", path));
300 }
301 SurfacePtr rgba(SDL_ConvertSurface(loaded.get(), SDL_PIXELFORMAT_RGBA32));
302 if (!rgba) {
303 throw mxvk::Exception(std::format("3dmath_puzzle_drop: failed to convert PNG '{}': {}", path, SDL_GetError()));
304 }
305 const SDL_PixelFormatDetails *format = SDL_GetPixelFormatDetails(rgba->format);
306 if (format == nullptr) {
307 throw mxvk::Exception(std::format("3dmath_puzzle_drop: failed to query PNG format '{}'", path));
308 }
309
310 Texture texture;
311 texture.width = rgba->w;
312 texture.height = rgba->h;
313 texture.pixels.resize(static_cast<std::size_t>(texture.width * texture.height));
314 for (int y = 0; y < texture.height; ++y) {
315 const auto *row = static_cast<const std::uint8_t *>(rgba->pixels) + static_cast<std::size_t>(y * rgba->pitch);
316 const auto *source = reinterpret_cast<const std::uint32_t *>(row);
317 for (int x = 0; x < texture.width; ++x) {
318 std::uint8_t red = 0;
319 std::uint8_t green = 0;
320 std::uint8_t blue = 0;
321 std::uint8_t alpha = 0;
322 SDL_GetRGBA(source[x], format, nullptr, &red, &green, &blue, &alpha);
323 texture.pixels[static_cast<std::size_t>(y * texture.width + x)] =
324 (static_cast<mxvk::MXCOLOR>(alpha) << 24U) |
325 (static_cast<mxvk::MXCOLOR>(red) << 16U) |
326 (static_cast<mxvk::MXCOLOR>(green) << 8U) |
327 static_cast<mxvk::MXCOLOR>(blue);
328 }
329 }
330 if (generate_mipmaps) {
331 build_mipmaps(texture);
332 }
333 return texture;
334 }
void build_mipmaps(Texture &texture)
Definition main.cpp:256

◆ model_path()

std::filesystem::path anonymous_namespace{main.cpp}::model_path ( const std::string & filename,
const std::string & asset_path )
nodiscard

Definition at line 140 of file main.cpp.

140 {
141 if (!filename.empty()) {
142 return filename;
143 }
144 return std::filesystem::path(asset_path) / "data" / DEFAULT_MODEL;
145 }
constexpr std::string_view DEFAULT_MODEL
Definition main.cpp:40

◆ pack_color()

mxvk::MXCOLOR anonymous_namespace{main.cpp}::pack_color ( std::uint32_t red,
std::uint32_t green,
std::uint32_t blue,
std::uint32_t alpha )
nodiscard

Definition at line 55 of file main.cpp.

55 {
56 return ((alpha & 0xFFU) << 24U) |
57 ((red & 0xFFU) << 16U) |
58 ((green & 0xFFU) << 8U) |
59 (blue & 0xFFU);
60 }

◆ pyramid_path()

std::filesystem::path anonymous_namespace{main.cpp}::pyramid_path ( const std::string & asset_path)
nodiscard

Definition at line 43 of file main.cpp.

43 {
44 return std::filesystem::path(asset_path) / "data" / "pyramid.plg";
45 }

◆ randFloat()

float anonymous_namespace{main.cpp}::randFloat ( float mn,
float mx )

Definition at line 82 of file main.cpp.

82 {
83 static std::random_device rd;
84 static std::default_random_engine eng(rd());
85 std::uniform_real_distribution<float> dist(mn, mx);
86 return dist(eng);
87 }

◆ resolve_texture_path()

std::string anonymous_namespace{main.cpp}::resolve_texture_path ( const Arguments & args)
nodiscard

Definition at line 80 of file main.cpp.

80 {
81 std::string texture_path = !args.filename.empty() ? args.filename : args.texture;
82 if (texture_path.empty()) {
83 throw mxvk::Exception("3dmath_texture: pass a PNG with --filename <file.png> or --texture <file.png>");
84 }
85
86 namespace fs = std::filesystem;
87 fs::path requested(texture_path);
88 if (requested.is_absolute() || fs::exists(requested)) {
89 return requested.string();
90 }
91
92 if (!args.path.empty()) {
93 const fs::path from_asset_path = fs::path(args.path) / requested;
94 if (fs::exists(from_asset_path)) {
95 return from_asset_path.string();
96 }
97 }
98
99 return requested.string();
100 }
std::string texture
Optional texture file path (--texture).
Definition argz.hpp:764
std::string filename
Optional input filename (--filename).
Definition argz.hpp:738
std::string path
Asset root; proc_args() defaults it to the executable directory.
Definition argz.hpp:735

◆ resolveAssetRoot()

std::string anonymous_namespace{main.cpp}::resolveAssetRoot ( const std::string & path)

Definition at line 138 of file main.cpp.

138 {
139 if (!path.empty() && path != "." && path != "./") {
140 return std::filesystem::path(path);
141 }
142 return std::filesystem::path(MASTERPIECE_ASSET_DIR);
143 }

◆ resolvePuzzleAssetRoot()

std::filesystem::path anonymous_namespace{main.cpp}::resolvePuzzleAssetRoot ( const std::filesystem::path & asset_root)

Definition at line 145 of file main.cpp.

145 {
146 const std::filesystem::path shared_root = asset_root.parent_path() / "puzzle";
147 if (std::filesystem::exists(shared_root / "data" / "gamebg.png")) {
148 return shared_root;
149 }
150 return asset_root;
151 }

◆ same_or_match()

bool anonymous_namespace{main.cpp}::same_or_match ( BlockType actual,
BlockType expected )
nodiscard

Definition at line 186 of file main.cpp.

186 {
187 return actual == expected || actual == BlockType::Match;
188 }

◆ scorePath()

std::filesystem::path anonymous_namespace{main.cpp}::scorePath ( const std::filesystem::path & asset_root)

Definition at line 153 of file main.cpp.

153 {
154 return asset_root / "data" / "scores.dat";
155 }

◆ texture_index()

int anonymous_namespace{main.cpp}::texture_index ( BlockType type)
nodiscard

Definition at line 182 of file main.cpp.

182 {
183 return is_play_block(type) ? static_cast<int>(type) - static_cast<int>(BlockType::Red1) : 0;
184 }
bool is_play_block(BlockType type)
Definition main.cpp:178

◆ texture_path()

std::filesystem::path anonymous_namespace{main.cpp}::texture_path ( const std::string & filename,
const std::string & asset_path )
nodiscard

Definition at line 147 of file main.cpp.

147 {
148 const std::filesystem::path requested(filename);
149 if (requested.is_absolute() || std::filesystem::exists(requested)) {
150 return requested;
151 }
152
153 const std::filesystem::path from_asset_path = std::filesystem::path(asset_path) / requested;
154 if (std::filesystem::exists(from_asset_path)) {
155 return from_asset_path;
156 }
157 return requested;
158 }

◆ unwrap_horizontal_texcoords()

std::array< mxvk::vec2D, 3 > anonymous_namespace{main.cpp}::unwrap_horizontal_texcoords ( std::array< mxvk::vec2D, 3 > texcoords)
nodiscard

Definition at line 270 of file main.cpp.

270 {
271 if (!crosses_horizontal_texture_seam(texcoords)) {
272 return texcoords;
273 }
274
275 for (mxvk::vec2D &texcoord : texcoords) {
276 if (texcoord.x < 0.5f) {
277 texcoord.x += 1.0f;
278 }
279 }
280
281 for (std::size_t index = 0; index < texcoords.size(); ++index) {
282 if (texcoords[index].y > mxvk::EPSILON && texcoords[index].y < 1.0f - mxvk::EPSILON) {
283 continue;
284 }
285
286 const std::size_t next = (index + 1) % texcoords.size();
287 const std::size_t previous = (index + texcoords.size() - 1) % texcoords.size();
288 texcoords[index].x = (texcoords[next].x + texcoords[previous].x) * 0.5f;
289 }
290 return texcoords;
291 }
bool crosses_horizontal_texture_seam(const std::array< mxvk::vec2D, 3 > &texcoords)
Definition main.cpp:259

Variable Documentation

◆ AIM_LENGTH

float anonymous_namespace{main.cpp}::AIM_LENGTH = 2.0f
constexpr

Definition at line 42 of file main.cpp.

◆ AIM_THICKNESS_Y

float anonymous_namespace{main.cpp}::AIM_THICKNESS_Y = 0.008f
constexpr

Definition at line 43 of file main.cpp.

◆ AIM_THICKNESS_Z

float anonymous_namespace{main.cpp}::AIM_THICKNESS_Z = 0.015f
constexpr

Definition at line 44 of file main.cpp.

◆ APP_NAME

std::string_view anonymous_namespace{main.cpp}::APP_NAME = "3dmath_plg_loader"
constexpr

Definition at line 38 of file main.cpp.

◆ BACKEND_NAME

std::string_view anonymous_namespace{main.cpp}::BACKEND_NAME = "native"
constexpr

Definition at line 301 of file main.cpp.

◆ BACKGROUND_COLOR

mxvk::MXCOLOR anonymous_namespace{main.cpp}::BACKGROUND_COLOR = mxvk::MXVK_RGB(3, 4, 8)
constexpr

Definition at line 43 of file main.cpp.

◆ BALL_COLORS

const std::array<glm::vec3, NUM_BALLS> anonymous_namespace{main.cpp}::BALL_COLORS
Initial value:
= {
glm::vec3{1.0f, 1.0f, 1.0f},
glm::vec3{1.0f, 0.84f, 0.0f},
glm::vec3{0.0f, 0.0f, 0.8f},
glm::vec3{0.9f, 0.0f, 0.0f},
glm::vec3{0.5f, 0.0f, 0.5f},
glm::vec3{1.0f, 0.5f, 0.0f},
glm::vec3{0.0f, 0.5f, 0.0f},
glm::vec3{0.55f, 0.0f, 0.0f},
glm::vec3{0.1f, 0.1f, 0.1f},
glm::vec3{1.0f, 0.84f, 0.0f},
glm::vec3{0.0f, 0.0f, 0.8f},
glm::vec3{0.9f, 0.0f, 0.0f},
glm::vec3{0.5f, 0.0f, 0.5f},
glm::vec3{1.0f, 0.5f, 0.0f},
glm::vec3{0.0f, 0.5f, 0.0f},
glm::vec3{0.55f, 0.0f, 0.0f},
}

Definition at line 63 of file main.cpp.

63 {
64 glm::vec3{1.0f, 1.0f, 1.0f},
65 glm::vec3{1.0f, 0.84f, 0.0f},
66 glm::vec3{0.0f, 0.0f, 0.8f},
67 glm::vec3{0.9f, 0.0f, 0.0f},
68 glm::vec3{0.5f, 0.0f, 0.5f},
69 glm::vec3{1.0f, 0.5f, 0.0f},
70 glm::vec3{0.0f, 0.5f, 0.0f},
71 glm::vec3{0.55f, 0.0f, 0.0f},
72 glm::vec3{0.1f, 0.1f, 0.1f},
73 glm::vec3{1.0f, 0.84f, 0.0f},
74 glm::vec3{0.0f, 0.0f, 0.8f},
75 glm::vec3{0.9f, 0.0f, 0.0f},
76 glm::vec3{0.5f, 0.0f, 0.5f},
77 glm::vec3{1.0f, 0.5f, 0.0f},
78 glm::vec3{0.0f, 0.5f, 0.0f},
79 glm::vec3{0.55f, 0.0f, 0.0f},
80 };

◆ BALL_RADIUS

float anonymous_namespace{main.cpp}::BALL_RADIUS = 0.14f
constexpr

Definition at line 35 of file main.cpp.

◆ base_height

int anonymous_namespace{main.cpp}::base_height = 1080
constexpr

Definition at line 35 of file main.cpp.

◆ base_width

int anonymous_namespace{main.cpp}::base_width = 1440
constexpr

Definition at line 34 of file main.cpp.

◆ BLOCK_HALF_EXTENT

float anonymous_namespace{main.cpp}::BLOCK_HALF_EXTENT = 0.064f
constexpr

Definition at line 38 of file main.cpp.

◆ BLOCK_SPACING

float anonymous_namespace{main.cpp}::BLOCK_SPACING = 0.145f
constexpr

Definition at line 37 of file main.cpp.

◆ BLOCK_TEXTURE_FILES

std::array<const char *, 10> anonymous_namespace{main.cpp}::BLOCK_TEXTURE_FILES
constexpr
Initial value:
{
"red1.png",
"red2.png",
"red3.png",
"green1.png",
"green2.png",
"green3.png",
"blue1.png",
"blue2.png",
"blue3.png",
"red3.png",
}

Definition at line 43 of file main.cpp.

43 {
44 "red1.png",
45 "red2.png",
46 "red3.png",
47 "green1.png",
48 "green2.png",
49 "green3.png",
50 "blue1.png",
51 "blue2.png",
52 "blue3.png",
53 "red3.png",
54 };

◆ board_cols

int anonymous_namespace{main.cpp}::board_cols = 8
constexpr

Definition at line 31 of file main.cpp.

◆ BOARD_HEIGHT

int anonymous_namespace{main.cpp}::BOARD_HEIGHT = 22
constexpr

Definition at line 33 of file main.cpp.

◆ board_rows

int anonymous_namespace{main.cpp}::board_rows = 18
constexpr

Definition at line 30 of file main.cpp.

◆ BOARD_WIDTH

int anonymous_namespace{main.cpp}::BOARD_WIDTH = 20
constexpr

Definition at line 32 of file main.cpp.

◆ CAM_BASE_TOTAL_SCALE

float anonymous_namespace{main.cpp}::CAM_BASE_TOTAL_SCALE = 1.359411f
constexpr

Definition at line 49 of file main.cpp.

◆ CAMERA_DISTANCE

float anonymous_namespace{main.cpp}::CAMERA_DISTANCE = 7.0f
constexpr

Definition at line 36 of file main.cpp.

◆ CAMERA_ZOOM_STEP

float anonymous_namespace{main.cpp}::CAMERA_ZOOM_STEP = 0.45f
constexpr

Definition at line 295 of file main.cpp.

◆ COURT_HALF_HEIGHT

float anonymous_namespace{main.cpp}::COURT_HALF_HEIGHT = 1.45f
constexpr

Definition at line 31 of file main.cpp.

◆ COURT_HALF_WIDTH

float anonymous_namespace{main.cpp}::COURT_HALF_WIDTH = 2.65f
constexpr

Definition at line 30 of file main.cpp.

◆ CUE_LENGTH

float anonymous_namespace{main.cpp}::CUE_LENGTH = 2.5f
constexpr

Definition at line 40 of file main.cpp.

◆ CUE_THICKNESS

float anonymous_namespace{main.cpp}::CUE_THICKNESS = 0.03f
constexpr

Definition at line 41 of file main.cpp.

◆ DEFAULT_FRAME_HEIGHT

int anonymous_namespace{main.cpp}::DEFAULT_FRAME_HEIGHT = 240
constexpr

Definition at line 27 of file main.cpp.

◆ DEFAULT_FRAME_WIDTH

int anonymous_namespace{main.cpp}::DEFAULT_FRAME_WIDTH = 320
constexpr

Definition at line 26 of file main.cpp.

◆ DEFAULT_MODEL

std::string_view anonymous_namespace{main.cpp}::DEFAULT_MODEL = "sphere.plg"
constexpr

Definition at line 40 of file main.cpp.

◆ FALL_SECONDS

std::array<float, 3> anonymous_namespace{main.cpp}::FALL_SECONDS {0.86f, 0.68f, 0.50f}
constexpr

Definition at line 42 of file main.cpp.

42{0.86f, 0.68f, 0.50f};

◆ flash_time_ms

int anonymous_namespace{main.cpp}::flash_time_ms = 180
constexpr

Definition at line 48 of file main.cpp.

◆ FRAME_GAP

float anonymous_namespace{main.cpp}::FRAME_GAP = 0.016f
constexpr

Definition at line 40 of file main.cpp.

◆ FRAME_HALF_EXTENT

float anonymous_namespace{main.cpp}::FRAME_HALF_EXTENT = BLOCK_HALF_EXTENT * 0.72f
constexpr

Definition at line 39 of file main.cpp.

◆ FRICTION

float anonymous_namespace{main.cpp}::FRICTION = 0.9988f
constexpr

Definition at line 46 of file main.cpp.

◆ game_base_height

int anonymous_namespace{main.cpp}::game_base_height = 480
constexpr

Definition at line 37 of file main.cpp.

◆ game_base_width

int anonymous_namespace{main.cpp}::game_base_width = 640
constexpr

Definition at line 36 of file main.cpp.

◆ game_block_height

int anonymous_namespace{main.cpp}::game_block_height = 14
constexpr

Definition at line 41 of file main.cpp.

◆ game_block_spacing

int anonymous_namespace{main.cpp}::game_block_spacing = 1
constexpr

Definition at line 42 of file main.cpp.

◆ game_block_width

int anonymous_namespace{main.cpp}::game_block_width = 31
constexpr

Definition at line 40 of file main.cpp.

◆ game_board_start_x

int anonymous_namespace{main.cpp}::game_board_start_x = 184
constexpr

Definition at line 38 of file main.cpp.

◆ game_board_start_y

int anonymous_namespace{main.cpp}::game_board_start_y = 78
constexpr

Definition at line 39 of file main.cpp.

◆ game_next_panel_x

int anonymous_namespace{main.cpp}::game_next_panel_x = 450
constexpr

Definition at line 44 of file main.cpp.

◆ game_next_panel_y

int anonymous_namespace{main.cpp}::game_next_panel_y = 180
constexpr

Definition at line 45 of file main.cpp.

◆ GRID_DEFAULT_CAMERA_DISTANCE

float anonymous_namespace{main.cpp}::GRID_DEFAULT_CAMERA_DISTANCE = 2.45f
constexpr

Definition at line 62 of file main.cpp.

◆ GRID_MAX_CAMERA_DISTANCE

float anonymous_namespace{main.cpp}::GRID_MAX_CAMERA_DISTANCE = 9.0f
constexpr

Definition at line 61 of file main.cpp.

◆ GRID_MAX_PITCH

float anonymous_namespace{main.cpp}::GRID_MAX_PITCH = 70.0f
constexpr

Definition at line 59 of file main.cpp.

◆ GRID_MIN_CAMERA_DISTANCE

float anonymous_namespace{main.cpp}::GRID_MIN_CAMERA_DISTANCE = 1.65f
constexpr

Definition at line 60 of file main.cpp.

◆ GRID_MIN_PITCH

float anonymous_namespace{main.cpp}::GRID_MIN_PITCH = -70.0f
constexpr

Definition at line 58 of file main.cpp.

◆ GRID_PITCH_SPEED

float anonymous_namespace{main.cpp}::GRID_PITCH_SPEED = 90.0f
constexpr

Definition at line 56 of file main.cpp.

◆ GRID_VERTICAL_GAP

int anonymous_namespace{main.cpp}::GRID_VERTICAL_GAP = 5
constexpr

Definition at line 43 of file main.cpp.

◆ GRID_YAW_SPEED

float anonymous_namespace{main.cpp}::GRID_YAW_SPEED = 115.0f
constexpr

Definition at line 55 of file main.cpp.

◆ GRID_ZOOM_SPEED

float anonymous_namespace{main.cpp}::GRID_ZOOM_SPEED = 3.2f
constexpr

Definition at line 57 of file main.cpp.

◆ joy_repeat_delay_ms

Uint32 anonymous_namespace{main.cpp}::joy_repeat_delay_ms = 180
constexpr

Definition at line 52 of file main.cpp.

◆ joystick_dead_zone

Sint16 anonymous_namespace{main.cpp}::joystick_dead_zone = 16000
constexpr

Definition at line 53 of file main.cpp.

◆ LEVEL_COUNT

int anonymous_namespace{main.cpp}::LEVEL_COUNT = 8
constexpr

Definition at line 36 of file main.cpp.

◆ lines_per_speedup

int anonymous_namespace{main.cpp}::lines_per_speedup = 10
constexpr

Definition at line 49 of file main.cpp.

◆ MAX_CAMERA_DISTANCE

float anonymous_namespace{main.cpp}::MAX_CAMERA_DISTANCE = 12.0f
constexpr

Definition at line 294 of file main.cpp.

◆ max_name_length

int anonymous_namespace{main.cpp}::max_name_length = 16
constexpr

Definition at line 51 of file main.cpp.

◆ MAX_PITCH_DEGREES

float anonymous_namespace{main.cpp}::MAX_PITCH_DEGREES = 89.0f
constexpr

Definition at line 297 of file main.cpp.

◆ MAX_POWER

float anonymous_namespace{main.cpp}::MAX_POWER = 1.5f
constexpr

Definition at line 48 of file main.cpp.

◆ max_scores

int anonymous_namespace{main.cpp}::max_scores = 8
constexpr

Definition at line 33 of file main.cpp.

◆ menu_item_count

int anonymous_namespace{main.cpp}::menu_item_count = 4
constexpr

Definition at line 46 of file main.cpp.

◆ MIN_CAMERA_DISTANCE

float anonymous_namespace{main.cpp}::MIN_CAMERA_DISTANCE = 2.5f
constexpr

Definition at line 293 of file main.cpp.

◆ MIN_SPEED

float anonymous_namespace{main.cpp}::MIN_SPEED = 0.001f
constexpr

Definition at line 47 of file main.cpp.

◆ MODEL_FORMAT

std::string_view anonymous_namespace{main.cpp}::MODEL_FORMAT = "PLG"
constexpr

Definition at line 39 of file main.cpp.

◆ MODEL_SCALE

float anonymous_namespace{main.cpp}::MODEL_SCALE = 2.0f
constexpr

Definition at line 42 of file main.cpp.

◆ MOUSE_ROTATION_SENSITIVITY

float anonymous_namespace{main.cpp}::MOUSE_ROTATION_SENSITIVITY = 0.35f
constexpr

Definition at line 296 of file main.cpp.

◆ NUM_BALLS

int anonymous_namespace{main.cpp}::NUM_BALLS = 16
constexpr

Definition at line 45 of file main.cpp.

◆ PADDLE_HALF_HEIGHT

float anonymous_namespace{main.cpp}::PADDLE_HALF_HEIGHT = 0.42f
constexpr

Definition at line 34 of file main.cpp.

◆ PADDLE_HALF_WIDTH

float anonymous_namespace{main.cpp}::PADDLE_HALF_WIDTH = 0.12f
constexpr

Definition at line 33 of file main.cpp.

◆ PADDLE_X

float anonymous_namespace{main.cpp}::PADDLE_X = 2.25f
constexpr

Definition at line 32 of file main.cpp.

◆ PI

float anonymous_namespace{main.cpp}::PI = 3.14159265358979323846f
constexpr

Definition at line 51 of file main.cpp.

◆ piece_height

int anonymous_namespace{main.cpp}::piece_height = 3
constexpr

Definition at line 32 of file main.cpp.

◆ POCKET_INSET

float anonymous_namespace{main.cpp}::POCKET_INSET = 0.25f
constexpr

Definition at line 53 of file main.cpp.

◆ POCKET_R

float anonymous_namespace{main.cpp}::POCKET_R = 0.25f
constexpr

Definition at line 38 of file main.cpp.

◆ POCKETS

const std::array<glm::vec2, 6> anonymous_namespace{main.cpp}::POCKETS
Initial value:
= {
glm::vec2{0.0f, TABLE_HALF_H - 0.15f},
glm::vec2{0.0f, -TABLE_HALF_H + 0.15f},
}
constexpr float POCKET_INSET
Definition main.cpp:53
constexpr float TABLE_HALF_H
Definition main.cpp:37
constexpr float TABLE_HALF_W
Definition main.cpp:36

Definition at line 54 of file main.cpp.

54 {
56 glm::vec2{0.0f, TABLE_HALF_H - 0.15f},
59 glm::vec2{0.0f, -TABLE_HALF_H + 0.15f},
61 };

◆ score_points_per_match

int anonymous_namespace{main.cpp}::score_points_per_match = 6
constexpr

Definition at line 50 of file main.cpp.

◆ SINK_DURATION

float anonymous_namespace{main.cpp}::SINK_DURATION = 0.45f
constexpr

Definition at line 50 of file main.cpp.

◆ TABLE_H

float anonymous_namespace{main.cpp}::TABLE_H = 6.0f
constexpr

Definition at line 35 of file main.cpp.

◆ TABLE_HALF_H

float anonymous_namespace{main.cpp}::TABLE_HALF_H = TABLE_H / 2.0f
constexpr

Definition at line 37 of file main.cpp.

◆ TABLE_HALF_W

float anonymous_namespace{main.cpp}::TABLE_HALF_W = TABLE_W / 2.0f
constexpr

Definition at line 36 of file main.cpp.

◆ TABLE_W

float anonymous_namespace{main.cpp}::TABLE_W = 12.0f
constexpr

Definition at line 34 of file main.cpp.

◆ title_screen_time_ms

int anonymous_namespace{main.cpp}::title_screen_time_ms = 1500
constexpr

Definition at line 47 of file main.cpp.

◆ transparent_black

mxvk::MXCOLOR anonymous_namespace{main.cpp}::transparent_black = 0x00000000U
constexpr

Definition at line 54 of file main.cpp.

◆ WINDOW_HEIGHT

int anonymous_namespace{main.cpp}::WINDOW_HEIGHT = 1080
constexpr

Definition at line 29 of file main.cpp.

◆ WINDOW_TITLE

std::string_view anonymous_namespace{main.cpp}::WINDOW_TITLE = "MXVK 3D Math PLG Loader"
constexpr

Definition at line 41 of file main.cpp.

◆ WINDOW_WIDTH

int anonymous_namespace{main.cpp}::WINDOW_WIDTH = 1440
constexpr

Definition at line 28 of file main.cpp.