Files
hk21/game/main.cpp
2025-01-20 22:32:30 +01:00

34 lines
701 B
C++

#include <asl/print.hpp>
#include <SDL3/SDL.h>
#include <SDL3/SDL_main.h>
int SDL_main(int /* argc */, char* /* argv */[])
{
SDL_Init(SDL_INIT_VIDEO);
SDL_Window* window = SDL_CreateWindow("HK-21 - 460nm", 1280, 720, SDL_WINDOW_VULKAN);
SDL_ShowWindow(window);
bool running = true;
while (running)
{
SDL_Event e;
while (SDL_PollEvent(&e))
{
if (e.type == SDL_EVENT_QUIT || (e.type == SDL_EVENT_KEY_DOWN && e.key.key == SDLK_ESCAPE))
{
running = false;
}
}
SDL_Delay(16);
}
SDL_DestroyWindow(window);
SDL_Quit();
return 0;
}