summary refs log tree commit diff stats
path: root/src/main.cpp
diff options
context:
space:
mode:
authorKelly Rauchenberger <fefferburbia@gmail.com>2021-01-30 04:46:44 -0500
committerKelly Rauchenberger <fefferburbia@gmail.com>2021-01-30 04:46:44 -0500
commitd92c7970df0d2e0a0c3f84037640336102c084a6 (patch)
tree162f27ff353ca1ae7a5df78a651c93e2e5865aac /src/main.cpp
parent2ff08dfdbb94d059a2c92da56c0266d38854df8a (diff)
downloadtanetane-d92c7970df0d2e0a0c3f84037640336102c084a6.tar.gz
tanetane-d92c7970df0d2e0a0c3f84037640336102c084a6.tar.bz2
tanetane-d92c7970df0d2e0a0c3f84037640336102c084a6.zip
Imported renderer stuff from Ether
Diffstat (limited to 'src/main.cpp')
-rw-r--r--src/main.cpp25
1 files changed, 24 insertions, 1 deletions
diff --git a/src/main.cpp b/src/main.cpp index 22bdf92..2da7d9a 100644 --- a/src/main.cpp +++ b/src/main.cpp
@@ -1,6 +1,29 @@
1#include <iostream> 1#include <iostream>
2#include "renderer.h"
3
4void loop(Renderer& renderer) {
5 for (;;) {
6 SDL_Event e;
7 while (SDL_PollEvent(&e))
8 {
9 if (e.type == SDL_QUIT)
10 {
11 return;
12 }
13 }
14 }
15}
2 16
3int main(int, char**) { 17int main(int, char**) {
4 std::cout << "hi" << std::endl; 18 try
19 {
20 Renderer renderer;
21
22 loop(renderer);
23 } catch (const sdl_error& ex)
24 {
25 std::cout << "SDL error (" << ex.what() << ")" << std::endl;
26 }
27
5 return 0; 28 return 0;
6} 29}