Files
fegger 1680388189 Add SDL2 GUI support and fix World surface logic
- Integrate SDL2 GUI rendering into the Game class
- Update World::getSurfaceLevel to correctly identify surface height
- Improve ASSERT_EQ macro to avoid multiple evaluation of arguments
- Fix typo in main_gui.cpp include
- Update CMakeLists.txt to include Threads package
2026-04-29 02:57:41 +02:00

24 lines
545 B
C++

#include "include/Game.h"
#include "include/Renderer.h"
#include <exception>
#include <iostream>
int main() {
try {
Renderer renderer;
if ( !renderer.init() ) {
std::cerr << "Could not initialize SDL2 renderer.\n";
return 1;
}
renderer.setAutoAdvanceMs( 900 );
Game game;
game.setRenderer( &renderer );
game.run();
return 0;
} catch ( const std::exception& e ) {
std::cerr << "Fatal error: " << e.what() << "\n";
return 1;
}
}