sdlterm/demo.cc
changeset 51 dce7325109c1
parent 50 c5b8b9d2da95
child 52 50a1857557da
--- a/sdlterm/demo.cc	Sat Jan 05 18:44:56 2013 +0100
+++ b/sdlterm/demo.cc	Sat Jan 05 18:56:45 2013 +0100
@@ -4,57 +4,57 @@
 class Application
 {
 public:
-	Terminal term;
-	bool done;
+    Terminal term;
+    bool done;
 
-	Application() : term(), done(false) {};
+    Application() : term(), done(false) {};
 
-	void init();
-	void wait_and_process_event();
+    void init();
+    void wait_and_process_event();
 };
 
 
 void Application::init()
 {
-	term.resize(800, 600);
-	term.select_font("font/DejaVuSansMono.ttf", "font/DejaVuSansMono-Bold.ttf", 12);
-	term.erase();
-	term.set_attr( term.prepare_attr(14, 1, 1) );
+    term.resize(800, 600);
+    term.select_font("font/DejaVuSansMono.ttf", "font/DejaVuSansMono-Bold.ttf", 12);
+    term.erase();
+    term.set_attr( term.prepare_attr(14, 1, 1) );
 
-	char hello[] = "Hello World!";
-	for (char *c = hello; *c; c++)
-	{
-		term.putch(5 + (c - hello), 5, *c);
-	}
-	term.commit();
+    char hello[] = "Hello World!";
+    for (char *c = hello; *c; c++)
+    {
+        term.putch(5 + (c - hello), 5, *c);
+    }
+    term.commit();
 }
 
 
 void Application::wait_and_process_event()
 {
-	Event event;
-	term.get_next_event(event);
+    Event event;
+    term.get_next_event(event);
 
-	switch (event.type)
-	{
-		case Event::QUIT:
-			done = true;
-			break;
+    switch (event.type)
+    {
+        case Event::QUIT:
+            done = true;
+            break;
 
-		default:
-			break;
-	}
+        default:
+            break;
+    }
 }
 
 
 int main(int argc, char *argv[])
 {
-	Application app;
-	app.init();
+    Application app;
+    app.init();
 
     while (!app.done)
     {
-    	app.wait_and_process_event();
+        app.wait_and_process_event();
     }
 
     return 0;