<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Recent changes to Tutorial</title><link>https://sourceforge.net/p/hassegamelib/wiki/Tutorial/</link><description>Recent changes to Tutorial</description><atom:link href="https://sourceforge.net/p/hassegamelib/wiki/Tutorial/feed" rel="self"/><language>en</language><lastBuildDate>Fri, 30 Dec 2011 15:02:42 -0000</lastBuildDate><atom:link href="https://sourceforge.net/p/hassegamelib/wiki/Tutorial/feed" rel="self" type="application/rss+xml"/><item><title>WikiPage Tutorial modified by &lt;REDACTED&gt;</title><link>https://sourceforge.net/p/hassegamelib/wiki/Tutorial/</link><description>&lt;pre&gt;--- v16 
+++ v17 
@@ -234,4 +234,7 @@
         }
         return 0;
     }
+
+"Oh no! Horrible pointer thingys!" If that was what you just said or thought, I'll explain a bit. You declare a pointer by adding an asterisk before it's name '*'. A pointer is the "ID" of a place in memory. That place is a variable. If you want to use the number the pointer "points" to, you add an asterisk before it's name.
+ The pointer is used by "hseStartKeylistener" for technical reasons.
 TODO add more tuts   
&lt;/pre&gt;</description><pubDate>Fri, 30 Dec 2011 15:02:42 -0000</pubDate><guid>https://sourceforge.nete4c5c13f54fd75bbe7b15607a754d94b909dc58a</guid></item><item><title>WikiPage Tutorial modified by &lt;REDACTED&gt;</title><link>https://sourceforge.net/p/hassegamelib/wiki/Tutorial/</link><description>&lt;pre&gt;--- v15 
+++ v16 
@@ -218,4 +218,20 @@
 
 Write "man usleep" in your terminal, it will tell you more about the "usleep" function. Please do not use sleep-time less than 50000, it may result flickering when drawing on some machines.
  So that's the basic drawing loop.
+
+A game also needs input. A keylistener might help :-). The keylistener that comes with HasseGameLib sadly can't detect more than one keypress at a time. If you have access to other keylisteners, please use them, they're probably a lot better than this.
+ So, if you've decided to use the keylistener that comes with HasseGameLib, here's  how:
+
+    #include&lt;HasseGameLib.h&gt;
+    #include&lt;unistd.h&gt;
+    int main(){
+        char *c=hseStartKeylistener();
+        hseAutoSize(SCALED,100,100);
+        while(1){
+            hseDrawDot(50,50,*c);
+            hsePrintMatrix(1);
+            usleep(50000);
+        }
+        return 0;
+    }
 TODO add more tuts   
&lt;/pre&gt;</description><pubDate>Fri, 30 Dec 2011 14:49:32 -0000</pubDate><guid>https://sourceforge.net174b8e7115823cef454e77491a48fcb995382154</guid></item><item><title>WikiPage Tutorial modified by &lt;REDACTED&gt;</title><link>https://sourceforge.net/p/hassegamelib/wiki/Tutorial/</link><description>&lt;pre&gt;--- v14 
+++ v15 
@@ -205,8 +205,17 @@
     #include&lt;HasseGameLib.h&gt;
     #include&lt;unistd.h&gt;
     int main(){
-        
+        int x=0;
+        hseAutoSize(SCALED,100,100);
+        while(x&lt;100){
+            x++;
+            hseDrawText(x,50,"Look me! I'm moving!");
+            hsePrintMatrix(1);
+            usleep(50000);
+        }
         return 0;
     }
 
+Write "man usleep" in your terminal, it will tell you more about the "usleep" function. Please do not use sleep-time less than 50000, it may result flickering when drawing on some machines.
+ So that's the basic drawing loop.
 TODO add more tuts   
&lt;/pre&gt;</description><pubDate>Fri, 30 Dec 2011 14:41:17 -0000</pubDate><guid>https://sourceforge.net39eb8326f321d20ca7650b760ce1fcd82fe60a74</guid></item><item><title>WikiPage Tutorial modified by &lt;REDACTED&gt;</title><link>https://sourceforge.net/p/hassegamelib/wiki/Tutorial/</link><description>&lt;pre&gt;--- v13 
+++ v14 
@@ -20,29 +20,28 @@
         return 0;
     }
 
-Then to actually do something, you have to add four more things, a call to "hseDrawText", another call to "hsePrintMatrix" , "sleep" to have the time to read something and finally "hseEnd". Include stdlib.h for the "sleep" function.
-
-    
-    #include&lt;stdlib.h&gt;	
-    #include&lt;HasseGameLib.h&gt;
-    int main(){
-        hseDrawText(5,5,"Hello, world!");
-        hsePrintMatrix(1);
-        sleep(5);
-        hseEnd();
-        return 0;
-    }
-
+Then to actually do something, you have to add four more things, a call to "hseDrawText", another call to "hsePrintMatrix" and "sleep" to have the time to read something. Include stdlib.h for the "sleep" function.
+
+    
+    #include&lt;stdlib.h&gt;	
+    #include&lt;HasseGameLib.h&gt;
+    int main(){
+        hseDrawText(5,5,"Hello, world!");
+        hsePrintMatrix(1);
+        sleep(5);
+        return 0;
+    }
+
 Compile it with:
 
     gcc yoursourcefile.c -o yourprogramname -lHasseGame
 
 The first two arguments of "hseDrawText" are the X and Y coordinates of the text and the third argument is the text itself. You can also use it a bit like printf; It supports the formats %d and %s.
 
     int num=1234;
     char *str="Hi!"
     hseDrawText(0,10,"number:%d\nstring:%s",num,str);
     
 To actually draw the stuff to the screen, You have to call "hsePrintMatrix". It's argument is whether to clear the old draw data or not, 0=no, 1=yes. e.g:
 
     #include&lt;stdlib.h&gt;	
@@ -51,122 +50,114 @@
         hseDrawText(5,5,"Hello, world!");
         hsePrintMatrix(0);
         sleep(5);
         hseDrawText(5,6,"Hello, again!");
         hsePrintMatrix(0);
         sleep(5);
-        hseEnd();
 
         return 0;
     }
     
 The first "Hello, world!" text will stay there in the second call to "hsePrintMatrix". If You put 1 as the argument instead of zero, the "Hello, World!" text won't be shown anymore.
 
-NEVER forget to call "hseEnd"!If you don't call it, when your prgoram exits, the terminal may stay in the non-canonical mode, and that is BAD. Then the user has no other choice than to close his/her terminal!
-
 So now you know how to draw text. Not very cool. What about some rectangles?
 
     #include&lt;stdlib.h&gt;	
     #include&lt;HasseGameLib.h&gt;
     int main(){
         hseDrawRect(5,5,10,10,"Rectangle");
         hsePrintMatrix(1);
         sleep(5);
-        hseEnd();
 
         return 0;
     }
 
 The first two coordinates it takes are the X and Y coordinates of the first corner, and the third and fourth are the X and Y coordinates of the other corner. If You didn't understand what that means, it's this:
 
     |The first two coordinates
     v   
     #------
     |     |
     |     |
     |     |
     ------#&lt;- The second two coordinates
 
 If You didn't get it now, just experiment.
 
 Hmm... We've got some boring squares and text. What about lines? No problem. Just make a call to "hseDrawLine".
 
     #include&lt;stdlib.h&gt;	
     #include&lt;HasseGameLib.h&gt;
     int main(){
         hseDrawLine(5,5,10,10,"HELLO!");
         hsePrintMatrix(1);
         sleep(5);
-        hseEnd();
 
         return 0;
     }
 
 This draws a line from 5,5 to 10,10 coordinates. Not too hard, was it? Again, if You didn't get it yet, here is an example:
 
     #&lt;-First coordinates
      #
       #
        #
         #&lt;-Second coordinates
 
 OK. Now we have some lines and rectangles in black and white. What about some colour? Just a call to "hseSetColour" and we're done!
 
 
     #include&lt;stdlib.h&gt;	
     #include&lt;HasseGameLib.h&gt;
     int main(){
         hseSetColour(GREEN,MAGENTA);
         hseDrawRect(5,5,10,10,"H");
         hseSetColour(BLUE,RED);
         hseDrawRect(11,11,20,20,"I");
         hsePrintMatrix(1);
         sleep(5);
-        hseEnd();
 
         return 0;
     }
 
 The first argument of "hseSetColour" is the background colour, second is the foreground colour.
 List of available colours:
 
     BLACK
     RED	
     GREEN
     YELLOW
     BLUE
     MAGENTA
     CYAN
     WHITE
 
 Then we also have the almost useless function "hseDrawDot".
 
     #include&lt;stdlib.h&gt;	
     #include&lt;HasseGameLib.h&gt;
     int main(){
         hseDrawDot(1,1,'A');
         hsePrintMatrix(1);
         sleep(5);
-        hseEnd();
 
         return 0;
     }
 
 It draws only one dot on the specified point. It doesn't take a string now for it's third argument, it takes a char, that's why the ' marks and not the " marks.
 That's pretty much it for the graphical functions, let's move on to some other functions. Like "hseRandom". Why call "hseRandom" instead of just "rand"? Because "hseRandom" provides an easier interface for getting random numbers with microsecond seed.
 
     #include&lt;stdlib.h&gt;	
     #include&lt;HasseGameLib.h&gt;
     int main(){
         hseDrawText(1,1,"The dice says: %d",hseRandom(6)+1);
         hsePrintMatrix(1);
         sleep(5);
-        hseEnd();
 
         return 0;
     }       
 
 "hseRandom" takes only one argument; it's the maximum number of the random. Why "+1" You may ask. That's because it actually returns a number between 0-5 if the argument is 6. That's because it uses the modulus ('%') sign. Google it, if you didn't get it.  
 
 What if you're making a game and you want the title to be always at the center of the screen, not depending on the size of the terminal? There is a function called "hseAutoSize".
 
     #include&lt;stdlib.h&gt;
@@ -176,45 +167,46 @@
         hseDrawText(50,50,"Awesome title for a game, eh?");
         hsePrintMatrix(1);
         sleep(5);
-        hseEnd();
 
         return 0;
     }
 
 But the text isn't in the center, it starts from there! That's a problem. And that's why there is "hseSetTextAlign".
 
     #include&lt;stdlib.h&gt;
     #include&lt;HasseGameLib.h&gt;
     int main(){
         hseAutoSize(SCALED,100,100);
         hseSetTextAlign(ALIGN_CENTER);
         hseDrawText(50,50,"Awesome title for a game, eh?");
         hsePrintMatrix(1);
         sleep(5);
-        hseEnd();
 
         return 0;
     }
 
 Now it works! If you don't define a how the text is aligned, it defaults to ALIGN_LEFT. There is also ALIGN_RIGHT, and it's pretty obvious.
 
 Back to "hseAutoSize". That "100,100" after SCALED means that the screen is divided to 100 columns and 100 rows.
  There are types other than SCALED for "hseAutoSize":
 
     SIMPLE
     SCALED
     CENTERED
 
 SIMPLE means that each coordinate is absolute so that 1,2 is two characters from the top of the terminal and one character from the left side of the terminal.
  CENTERED means that 0,0 is the center of the terminal and 1,1 is one character right and down from the center.
 
 But what are the two coordinates after the SIMPLE or CENTERED? They aren't :-).
 "hseAutoSize" is declared "hseAutoSize(ast autoSizeType,...)", meaning that it takes varying amount of arguments.
 
 Let's say you actually want to make a game with this library. Animation/movement? They have nothing to do with this library, but are easy to do. Include unistd.h for the "usleep" function.
 
     #include&lt;HasseGameLib.h&gt;
     #include&lt;unistd.h&gt;
-    int main(){}
+    int main(){
+        
+        return 0;
+    }
 
 TODO add more tuts   
&lt;/pre&gt;</description><pubDate>Fri, 30 Dec 2011 14:34:44 -0000</pubDate><guid>https://sourceforge.netff1e81d18bf5cf9064bf6a99955ec01f5ee7d10b</guid></item><item><title>WikiPage Tutorial modified by &lt;REDACTED&gt;</title><link>https://sourceforge.net/p/hassegamelib/wiki/Tutorial/</link><description>&lt;pre&gt;--- v12 
+++ v13 
@@ -183,4 +183,38 @@
 
 But the text isn't in the center, it starts from there! That's a problem. And that's why there is "hseSetTextAlign".
 
+    #include&lt;stdlib.h&gt;
+    #include&lt;HasseGameLib.h&gt;
+    int main(){
+        hseAutoSize(SCALED,100,100);
+        hseSetTextAlign(ALIGN_CENTER);
+        hseDrawText(50,50,"Awesome title for a game, eh?");
+        hsePrintMatrix(1);
+        sleep(5);
+        hseEnd();
+
+        return 0;
+    }
+
+Now it works! If you don't define a how the text is aligned, it defaults to ALIGN_LEFT. There is also ALIGN_RIGHT, and it's pretty obvious.
+
+Back to "hseAutoSize". That "100,100" after SCALED means that the screen is divided to 100 columns and 100 rows.
+ There are types other than SCALED for "hseAutoSize":
+
+    SIMPLE
+    SCALED
+    CENTERED
+
+SIMPLE means that each coordinate is absolute so that 1,2 is two characters from the top of the terminal and one character from the left side of the terminal.
+ CENTERED means that 0,0 is the center of the terminal and 1,1 is one character right and down from the center.
+
+But what are the two coordinates after the SIMPLE or CENTERED? They aren't :-).
+"hseAutoSize" is declared "hseAutoSize(ast autoSizeType,...)", meaning that it takes varying amount of arguments.
+
+Let's say you actually want to make a game with this library. Animation/movement? They have nothing to do with this library, but are easy to do. Include unistd.h for the "usleep" function.
+
+    #include&lt;HasseGameLib.h&gt;
+    #include&lt;unistd.h&gt;
+    int main(){}
+
 TODO add more tuts   
&lt;/pre&gt;</description><pubDate>Fri, 30 Dec 2011 14:25:58 -0000</pubDate><guid>https://sourceforge.net2e52ad4efbdefd2dd2260c6f0bd0f5bda3c98bd6</guid></item><item><title>WikiPage Tutorial modified by &lt;REDACTED&gt;</title><link>https://sourceforge.net/p/hassegamelib/wiki/Tutorial/</link><description>&lt;pre&gt;--- v11 
+++ v12 
@@ -8,25 +8,22 @@
     
 Let's start with an empty .c file:
 
-    #include&lt;stdio.h&gt;
-
-    int main(){
-        return 0;
-    }
+    int main(){
+        return 0;
+    }
         
 So to use HasseGameLib, include HasseGameLib.h like this:
 
     #include&lt;HasseGameLib.h&gt; 
-    #include&lt;stdio.h&gt;
-
-    int main(){
-        return 0;
-    }
-
-Then to actually do something, you have to add four more things, a call to "hseDrawText", another call to "hsePrintMatrix" , "sleep" to have the time to read something and finally "hseEnd".
-
-    
-    #include&lt;stdio.h&gt;	
+
+    int main(){
+        return 0;
+    }
+
+Then to actually do something, you have to add four more things, a call to "hseDrawText", another call to "hsePrintMatrix" , "sleep" to have the time to read something and finally "hseEnd". Include stdlib.h for the "sleep" function.
+
+    
+    #include&lt;stdlib.h&gt;	
     #include&lt;HasseGameLib.h&gt;
     int main(){
         hseDrawText(5,5,"Hello, world!");
@@ -36,24 +33,24 @@
         return 0;
     }
 
 Compile it with:
 
     gcc yoursourcefile.c -o yourprogramname -lHasseGame
 
 The first two arguments of "hseDrawText" are the X and Y coordinates of the text and the third argument is the text itself. You can also use it a bit like printf; It supports the formats %d and %s.
 
     int num=1234;
     char *str="Hi!"
     hseDrawText(0,10,"number:%d\nstring:%s",num,str);
     
 To actually draw the stuff to the screen, You have to call "hsePrintMatrix". It's argument is whether to clear the old draw data or not, 0=no, 1=yes. e.g:
 
-    #include&lt;stdio.h&gt;	
+    #include&lt;stdlib.h&gt;	
     #include&lt;HasseGameLib.h&gt;
     int main(){
         hseDrawText(5,5,"Hello, world!");
         hsePrintMatrix(0);
         sleep(5);
         hseDrawText(5,6,"Hello, again!");
         hsePrintMatrix(0);
         sleep(5);
@@ -62,16 +59,15 @@
         return 0;
     }
     
 The first "Hello, world!" text will stay there in the second call to "hsePrintMatrix". If You put 1 as the argument instead of zero, the "Hello, World!" text won't be shown anymore.
 
 NEVER forget to call "hseEnd"!If you don't call it, when your prgoram exits, the terminal may stay in the non-canonical mode, and that is BAD. Then the user has no other choice than to close his/her terminal!
 
 So now you know how to draw text. Not very cool. What about some rectangles?
 
-
-    #include&lt;stdio.h&gt;	
+    #include&lt;stdlib.h&gt;	
     #include&lt;HasseGameLib.h&gt;
     int main(){
         hseDrawRect(5,5,10,10,"Rectangle");
         hsePrintMatrix(1);
         sleep(5);
@@ -80,23 +76,23 @@
         return 0;
     }
 
 The first two coordinates it takes are the X and Y coordinates of the first corner, and the third and fourth are the X and Y coordinates of the other corner. If You didn't understand what that means, it's this:
 
     |The first two coordinates
     v   
     #------
     |     |
     |     |
     |     |
     ------#&lt;- The second two coordinates
 
 If You didn't get it now, just experiment.
 
 Hmm... We've got some boring squares and text. What about lines? No problem. Just make a call to "hseDrawLine".
 
-    #include&lt;stdio.h&gt;	
+    #include&lt;stdlib.h&gt;	
     #include&lt;HasseGameLib.h&gt;
     int main(){
         hseDrawLine(5,5,10,10,"HELLO!");
         hsePrintMatrix(1);
         sleep(5);
@@ -105,23 +101,23 @@
         return 0;
     }
 
 This draws a line from 5,5 to 10,10 coordinates. Not too hard, was it? Again, if You didn't get it yet, here is an example:
 
     #&lt;-First coordinates
      #
       #
        #
         #&lt;-Second coordinates
 
 OK. Now we have some lines and rectangles in black and white. What about some colour? Just a call to "hseSetColour" and we're done!
 
 
-    #include&lt;stdio.h&gt;	
+    #include&lt;stdlib.h&gt;	
     #include&lt;HasseGameLib.h&gt;
     int main(){
         hseSetColour(GREEN,MAGENTA);
         hseDrawRect(5,5,10,10,"H");
         hseSetColour(BLUE,RED);
         hseDrawRect(11,11,20,20,"I");
         hsePrintMatrix(1);
         sleep(5);
@@ -130,23 +126,23 @@
         return 0;
     }
 
 The first argument of "hseSetColour" is the background colour, second is the foreground colour.
 List of available colours:
 
     BLACK
     RED	
     GREEN
     YELLOW
     BLUE
     MAGENTA
     CYAN
     WHITE
 
 Then we also have the almost useless function "hseDrawDot".
 
-    #include&lt;stdio.h&gt;	
+    #include&lt;stdlib.h&gt;	
     #include&lt;HasseGameLib.h&gt;
     int main(){
         hseDrawDot(1,1,'A');
         hsePrintMatrix(1);
         sleep(5);
@@ -155,20 +151,36 @@
         return 0;
     }
 
 It draws only one dot on the specified point. It doesn't take a string now for it's third argument, it takes a char, that's why the ' marks and not the " marks.
 That's pretty much it for the graphical functions, let's move on to some other functions. Like "hseRandom". Why call "hseRandom" instead of just "rand"? Because "hseRandom" provides an easier interface for getting random numbers with microsecond seed.
 
-    #include&lt;stdio.h&gt;	
+    #include&lt;stdlib.h&gt;	
     #include&lt;HasseGameLib.h&gt;
     int main(){
         hseDrawText(1,1,"The dice says: %d",hseRandom(6)+1);
         hsePrintMatrix(1);
         sleep(5);
         hseEnd();
 
         return 0;
     }       
 
 "hseRandom" takes only one argument; it's the maximum number of the random. Why "+1" You may ask. That's because it actually returns a number between 0-5 if the argument is 6. That's because it uses the modulus ('%') sign. Google it, if you didn't get it.  
- 
+
+What if you're making a game and you want the title to be always at the center of the screen, not depending on the size of the terminal? There is a function called "hseAutoSize".
+
+    #include&lt;stdlib.h&gt;
+    #include&lt;HasseGameLib.h&gt;
+    int main(){
+        hseAutoSize(SCALED,100,100);
+        hseDrawText(50,50,"Awesome title for a game, eh?");
+        hsePrintMatrix(1);
+        sleep(5);
+        hseEnd();
+
+        return 0;
+    }
+
+But the text isn't in the center, it starts from there! That's a problem. And that's why there is "hseSetTextAlign".
+
 TODO add more tuts   
&lt;/pre&gt;</description><pubDate>Fri, 30 Dec 2011 14:06:51 -0000</pubDate><guid>https://sourceforge.net8917494306f62a10e377de2eeeff64f38e6a9daf</guid></item><item><title>WikiPage Tutorial modified by &lt;REDACTED&gt;</title><link>https://sourceforge.net/p/hassegamelib/wiki/Tutorial/</link><description>&lt;pre&gt;--- v10 
+++ v11 
@@ -51,119 +51,124 @@
     #include&lt;stdio.h&gt;	
     #include&lt;HasseGameLib.h&gt;
     int main(){
-            hseDrawText(5,5,"Hello, world!");
-	    hsePrintMatrix(0);
-	    sleep(5);
-            hseDrawText(5,6,"Hello, again!");
-	    hsePrintMatrix(0);
-            sleep(5);
-	    hseEnd();	
-	    return 0;
-    }
+        hseDrawText(5,5,"Hello, world!");
+        hsePrintMatrix(0);
+        sleep(5);
+        hseDrawText(5,6,"Hello, again!");
+        hsePrintMatrix(0);
+        sleep(5);
+        hseEnd();
+
+        return 0;
+    }
     
 The first "Hello, world!" text will stay there in the second call to "hsePrintMatrix". If You put 1 as the argument instead of zero, the "Hello, World!" text won't be shown anymore.
 
 NEVER forget to call "hseEnd"!If you don't call it, when your prgoram exits, the terminal may stay in the non-canonical mode, and that is BAD. Then the user has no other choice than to close his/her terminal!
 
 So now you know how to draw text. Not very cool. What about some rectangles?
 
 
     #include&lt;stdio.h&gt;	
     #include&lt;HasseGameLib.h&gt;
     int main(){
-            hseDrawRect(5,5,10,10,"#|");
-	    hsePrintMatrix(1);
-	    sleep(5);
-	    hseEnd();	
-	    return 0;
+        hseDrawRect(5,5,10,10,"Rectangle");
+        hsePrintMatrix(1);
+        sleep(5);
+        hseEnd();
+
+        return 0;
     }
 
 The first two coordinates it takes are the X and Y coordinates of the first corner, and the third and fourth are the X and Y coordinates of the other corner. If You didn't understand what that means, it's this:
 
     |The first two coordinates
     v   
     #------
     |     |
     |     |
     |     |
     ------#&lt;- The second two coordinates
 
 If You didn't get it now, just experiment.
 
 Hmm... We've got some boring squares and text. What about lines? No problem. Just make a call to "hseDrawLine".
 
     #include&lt;stdio.h&gt;	
     #include&lt;HasseGameLib.h&gt;
     int main(){
-            hseDrawLine(5,5,10,10,"HELLO!");
-	    hsePrintMatrix(1);
-	    sleep(5);
-	    hseEnd();	
-	    return 0;
+        hseDrawLine(5,5,10,10,"HELLO!");
+        hsePrintMatrix(1);
+        sleep(5);
+        hseEnd();
+
+        return 0;
     }
 
 This draws a line from 5,5 to 10,10 coordinates. Not too hard, was it? Again, if You didn't get it yet, here is an example:
 
     #&lt;-First coordinates
      #
       #
        #
         #&lt;-Second coordinates
 
 OK. Now we have some lines and rectangles in black and white. What about some colour? Just a call to "hseSetColour" and we're done!
 
 
     #include&lt;stdio.h&gt;	
     #include&lt;HasseGameLib.h&gt;
     int main(){
-            hseSetColour(GREEN,MAGENTA);
-            hseDrawRect(5,5,10,10,"H");
-            hseSetColour(BLUE,RED);
-            hseDrawRect(11,11,20,20,"I");
-	    hsePrintMatrix(1);
-	    sleep(5);
-	    hseEnd();	
-	    return 0;
+        hseSetColour(GREEN,MAGENTA);
+        hseDrawRect(5,5,10,10,"H");
+        hseSetColour(BLUE,RED);
+        hseDrawRect(11,11,20,20,"I");
+        hsePrintMatrix(1);
+        sleep(5);
+        hseEnd();
+
+        return 0;
     }
 
 The first argument of "hseSetColour" is the background colour, second is the foreground colour.
 List of available colours:
 
     BLACK
     RED	
     GREEN
     YELLOW
     BLUE
     MAGENTA
     CYAN
     WHITE
 
 Then we also have the almost useless function "hseDrawDot".
 
     #include&lt;stdio.h&gt;	
     #include&lt;HasseGameLib.h&gt;
     int main(){
-            hseDrawDot(1,1,'A');
-	    hsePrintMatrix(1);
-	    sleep(5);
-	    hseEnd();	
-	    return 0;
+        hseDrawDot(1,1,'A');
+        hsePrintMatrix(1);
+        sleep(5);
+        hseEnd();
+
+        return 0;
     }
 
 It draws only one dot on the specified point. It doesn't take a string now for it's third argument, it takes a char, that's why the ' marks and not the " marks.
 That's pretty much it for the graphical functions, let's move on to some other functions. Like "hseRandom". Why call "hseRandom" instead of just "rand"? Because "hseRandom" provides an easier interface for getting random numbers with microsecond seed.
 
     #include&lt;stdio.h&gt;	
     #include&lt;HasseGameLib.h&gt;
     int main(){
-            hseDrawText(1,1,"The dice says: %d",hseRandom(6)+1);
-	    hsePrintMatrix(1);
-	    sleep(5);
-	    hseEnd();	
-	    return 0;
+        hseDrawText(1,1,"The dice says: %d",hseRandom(6)+1);
+        hsePrintMatrix(1);
+        sleep(5);
+        hseEnd();
+
+        return 0;
     }       
 
 "hseRandom" takes only one argument; it's the maximum number of the random. Why "+1" You may ask. That's because it actually returns a number between 0-5 if the argument is 6. That's because it uses the modulus ('%') sign. Google it, if you didn't get it.  
  
-TODO add more tuts
-Sorry for the indent faults, I don't have any idea why they are there.    
+TODO add more tuts   
&lt;/pre&gt;</description><pubDate>Mon, 26 Dec 2011 18:15:14 -0000</pubDate><guid>https://sourceforge.net77eb905f88dc13b2cc87bdf90eeb205b834261d7</guid></item><item><title>WikiPage Tutorial modified by &lt;REDACTED&gt;</title><link>https://sourceforge.net/p/hassegamelib/wiki/Tutorial/</link><description>&lt;pre&gt;--- v9 
+++ v10 
@@ -36,7 +36,9 @@
         return 0;
     }
 
-Compile it with gcc yoursourcefile.c -o yourprogramname -lHasseGame -lpthread. -lpthread is needed because HasseGameLib multithreads in one of its parts.
+Compile it with:
+
+    gcc yoursourcefile.c -o yourprogramname -lHasseGame
 
 The first two arguments of "hseDrawText" are the X and Y coordinates of the text and the third argument is the text itself. You can also use it a bit like printf; It supports the formats %d and %s.
 
&lt;/pre&gt;</description><pubDate>Mon, 26 Dec 2011 18:09:15 -0000</pubDate><guid>https://sourceforge.net623452866c7029fcaf35050a1af13549384987b6</guid></item><item><title>WikiPage Tutorial modified by &lt;REDACTED&gt;</title><link>https://sourceforge.net/p/hassegamelib/wiki/Tutorial/</link><description>&lt;pre&gt;&lt;/pre&gt;</description><pubDate>Wed, 30 Nov 2011 14:06:56 -0000</pubDate><guid>https://sourceforge.net3697d62ccd7f8bb54b1e096e7a2eaccd93d55bdb</guid></item><item><title>WikiPage Tutorial modified by &lt;REDACTED&gt;</title><link>https://sourceforge.net/p/hassegamelib/wiki/Tutorial/</link><description>&lt;pre&gt;--- v7 
+++ v8 
@@ -14,61 +14,61 @@
         return 0;
     }
         
-I expect you have the HasseGameLib.h in the same directory as your program. So to use HasseGameLib, include HasseGameLib.h like this:
-
-    #include"HasseGameLib.h" 
+So to use HasseGameLib, include HasseGameLib.h like this:
+
+    #include&lt;HasseGameLib.h&gt; 
     #include&lt;stdio.h&gt;
 
     int main(){
         return 0;
     }
 
 Then to actually do something, you have to add four more things, a call to "hseDrawText", another call to "hsePrintMatrix" , "sleep" to have the time to read something and finally "hseEnd".
 
     
     #include&lt;stdio.h&gt;	
-    #include"HasseLib.h"
+    #include&lt;HasseGameLib.h&gt;
     int main(){
         hseDrawText(5,5,"Hello, world!");
         hsePrintMatrix(1);
         sleep(5);
         hseEnd();
         return 0;
     }
 
 Compile it with gcc yoursourcefile.c -o yourprogramname -lHasseGame -lpthread. -lpthread is needed because HasseGameLib multithreads in one of its parts.
 
 The first two arguments of "hseDrawText" are the X and Y coordinates of the text and the third argument is the text itself. You can also use it a bit like printf; It supports the formats %d and %s.
 
     int num=1234;
     char *str="Hi!"
     hseDrawText(0,10,"number:%d\nstring:%s",num,str);
     
 To actually draw the stuff to the screen, You have to call "hsePrintMatrix". It's argument is whether to clear the old draw data or not, 0=no, 1=yes. e.g:
 
     #include&lt;stdio.h&gt;	
-    #include"HasseLib.h"
+    #include&lt;HasseGameLib.h&gt;
     int main(){
             hseDrawText(5,5,"Hello, world!");
 	    hsePrintMatrix(0);
 	    sleep(5);
             hseDrawText(5,6,"Hello, again!");
 	    hsePrintMatrix(0);
             sleep(5);
 	    hseEnd();	
 	    return 0;
     }
     
 The first "Hello, world!" text will stay there in the second call to "hsePrintMatrix". If You put 1 as the argument instead of zero, the "Hello, World!" text won't be shown anymore.
 
 NEVER forget to call "hseEnd"!If you don't call it, when your prgoram exits, the terminal may stay in the non-canonical mode, and that is BAD. Then the user has no other choice than to close his/her terminal!
 
 So now you know how to draw text. Not very cool. What about some rectangles?
 
 
     #include&lt;stdio.h&gt;	
-    #include"HasseLib.h"
+    #include&lt;HasseGameLib.h&gt;
     int main(){
             hseDrawRect(5,5,10,10,"#|");
 	    hsePrintMatrix(1);
 	    sleep(5);
@@ -76,23 +76,23 @@
 	    return 0;
     }
 
 The first two coordinates it takes are the X and Y coordinates of the first corner, and the third and fourth are the X and Y coordinates of the other corner. If You didn't understand what that means, it's this:
 
     |The first two coordinates
     v   
     #------
     |     |
     |     |
     |     |
     ------#&lt;- The second two coordinates
 
 If You didn't get it now, just experiment.
 
 Hmm... We've got some boring squares and text. What about lines? No problem. Just make a call to "hseDrawLine".
 
     #include&lt;stdio.h&gt;	
-    #include"HasseLib.h"
+    #include&lt;HasseGameLib.h&gt;
     int main(){
             hseDrawLine(5,5,10,10,"HELLO!");
 	    hsePrintMatrix(1);
 	    sleep(5);
@@ -100,23 +100,23 @@
 	    return 0;
     }
 
 This draws a line from 5,5 to 10,10 coordinates. Not too hard, was it? Again, if You didn't get it yet, here is an example:
 
     #&lt;-First coordinates
      #
       #
        #
         #&lt;-Second coordinates
 
 OK. Now we have some lines and rectangles in black and white. What about some colour? Just a call to "hseSetColour" and we're done!
 
 
     #include&lt;stdio.h&gt;	
-    #include"HasseLib.h"
+    #include&lt;HasseGameLib.h&gt;
     int main(){
             hseSetColour(GREEN,MAGENTA);
             hseDrawRect(5,5,10,10,"H");
             hseSetColour(BLUE,RED);
             hseDrawRect(11,11,20,20,"I");
 	    hsePrintMatrix(1);
 	    sleep(5);
@@ -124,23 +124,23 @@
 	    return 0;
     }
 
 The first argument of "hseSetColour" is the background colour, second is the foreground colour.
 List of available colours:
 
     BLACK
     RED	
     GREEN
     YELLOW
     BLUE
     MAGENTA
     CYAN
     WHITE
 
 Then we also have the almost useless function "hseDrawDot".
 
     #include&lt;stdio.h&gt;	
-    #include"HasseLib.h"
+    #include&lt;HasseGameLib.h&gt;
     int main(){
             hseDrawDot(1,1,'A');
 	    hsePrintMatrix(1);
 	    sleep(5);
@@ -148,11 +148,11 @@
 	    return 0;
     }
 
 It draws only one dot on the specified point. It doesn't take a string now for it's third argument, it takes a char, that's why the ' marks and not the " marks.
 That's pretty much it for the graphical functions, let's move on to some other functions. Like "hseRandom". Why call "hseRandom" instead of just "rand"? Because "hseRandom" provides an easier interface for getting random numbers with microsecond seed.
 
     #include&lt;stdio.h&gt;	
-    #include"HasseLib.h"
+    #include&lt;HasseGameLib.h&gt;
     int main(){
             hseDrawText(1,1,"The dice says: %d",hseRandom(6)+1);
 	    hsePrintMatrix(1);
&lt;/pre&gt;</description><pubDate>Wed, 30 Nov 2011 13:19:16 -0000</pubDate><guid>https://sourceforge.net9226b36b5a9a2b953a3187d3e9f0cf7df5631c61</guid></item></channel></rss>