#include "asteroids3d_window.hpp"
#include "mxvk/argz.hpp"
#include "mxvk/mxvk_exception.hpp"
#include <SDL3/SDL.h>
#include <cstdlib>
#include <format>
#include <iostream>
#include <string>
Go to the source code of this file.
|
| int | main (int argc, char **argv) |
◆ main()
| int main |
( |
int | argc, |
|
|
char ** | argv ) |
Definition at line 13 of file main.cpp.
13 {
14 try {
15 if (!SDL_SetAppMetadata("Asteroids Net", nullptr, "asteroids-net")) {
16 std::cerr << std::format("asteroids-net: could not set SDL application metadata: {}\n", SDL_GetError());
17 }
18
22 std::cerr << std::format(
"mxvk: Exception: {}\n", e.
text());
23 return EXIT_FAILURE;
25 std::cerr << std::format(
"mxvk: Argument Exception: {}\n", e.
text());
26 return EXIT_FAILURE;
27 }
28
29 return EXIT_SUCCESS;
30}
Arguments proc_args(int &argc, char **argv)
Parse standard libmx2 command-line options from main()'s argv.
Exception thrown by Argz::proc() on unrecognised or malformed options.
void run_asteroids3d(const Arguments &args)
Runs the Asteroids application.
Plain data structure returned by proc_args() with all common libmx2 CLI options.