summaryrefslogtreecommitdiff
path: root/src/main.cpp
blob: d1afc2fcb869a4449f629a7da1f75d2b1173c6aa (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#include "common.hpp"

int main()
{
	sf::RenderWindow window(sf::VideoMode(800, 600), "Minitrem");
	game::state_t game;
	interface::state_t interface(&window, &game);

	window.setVerticalSyncEnabled(true);

	while (1) {
		game.tick();
		interface.tick();
		if (!window.isOpen())
			break;
		 
		window.clear();
		game.render(&window);
		interface.render();
		window.display();
	}

	return 0;
}