sdlterm/demo.cc
changeset 52 50a1857557da
parent 51 dce7325109c1
child 57 911927edbdde
--- a/sdlterm/demo.cc	Sat Jan 05 18:56:45 2013 +0100
+++ b/sdlterm/demo.cc	Sat Jan 05 23:00:41 2013 +0100
@@ -19,12 +19,18 @@
     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++)
+    for (int bg = 0; bg < 16; bg++)
     {
-        term.putch(5 + (c - hello), 5, *c);
+        for (int fg = 0; fg < 16; fg++)
+        {
+            for (char *c = hello; *c; c++)
+            {
+                term.set_attr( term.prepare_attr(fg, bg, 1) );
+                term.putch(5 + 6 * bg + (c - hello), 5 + fg, *c);
+            }
+        }
     }
     term.commit();
 }