summaryrefslogtreecommitdiff
path: root/src/main.cpp
diff options
context:
space:
mode:
authorPaweł Redman <pawel.redman@gmail.com>2017-10-07 08:03:44 +0200
committerPaweł Redman <pawel.redman@gmail.com>2017-10-07 08:03:44 +0200
commit9e7d64d052eabcf40d85c3e903aaba44903a380a (patch)
tree0a3a2c7f53884bd035b54812a77d493be058f43c /src/main.cpp
Initial commit.
Diffstat (limited to 'src/main.cpp')
-rw-r--r--src/main.cpp23
1 files changed, 23 insertions, 0 deletions
diff --git a/src/main.cpp b/src/main.cpp
new file mode 100644
index 0000000..1f69582
--- /dev/null
+++ b/src/main.cpp
@@ -0,0 +1,23 @@
+#include "common.hpp"
+
+int main()
+{
+ sf::RenderWindow window(sf::VideoMode(800, 600), "SFML");
+ world::world_t world;
+ interface::state_t interface(&window, &world);
+
+ window.setVerticalSyncEnabled(true);
+
+ while (1) {
+ interface.tick();
+ if (!window.isOpen())
+ break;
+
+ window.clear();
+ world.render(&window);
+ interface.render();
+ window.display();
+ }
+
+ return 0;
+}