Index: orxonox/branches/textEngine/src/lib/graphics/font/font.cc
===================================================================
--- orxonox/branches/textEngine/src/lib/graphics/font/font.cc	(revision 3707)
+++ 	(revision )
@@ -1,59 +1,0 @@
-/*
-Copyright (C) 2004 Lion Vollnhals
-Copyright (C) 2003 Matthias Braun
-
-This program is free software; you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 2 of the License, or
-(at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
-*/
-#ifndef __LIB_2D_FONT_HPP__
-#define __LIB_2D_FONT_HPP__
-
-#include <string>
-#include <stdexcept>
-#include "SFont.h"
-
-/** A thin c++ wrapper around my custom SFont version */
-class SFont
-{
-public:
-	int getHeight() const
-	{ return SFont_TextHeight(font); }
-
-	int getTextWidth(const char* text) const
-	{ return SFont_TextWidth(font, text); }
-	int getTextWidth(const std::string& text) const
-	{ return getTextWidth(text.c_str()); }
-
-	void write(SDL_Surface* surface, const char* text, int x, int y) const
-	{ SFont_Write(surface, font, x, y, text); }
-	
-	void write(SDL_Surface* surface, const std::string& text, int x, int y) const
-	{ Write(surface, text.c_str(), x, y); }
-
-	Font(SDL_Surface* surface)
-	{
-		font = SFont_InitFont(surface);
-		if(!font)
-			throw std::runtime_error("Couldn't initialize font.");
-	}
-	~Font()
-	{ SFont_FreeFont(font); }
-	
-private:
-	SFont_Font* font;
-};
-
-#endif
-
-
Index: orxonox/branches/textEngine/src/lib/graphics/font/glfont.cc
===================================================================
--- orxonox/branches/textEngine/src/lib/graphics/font/glfont.cc	(revision 3707)
+++ orxonox/branches/textEngine/src/lib/graphics/font/glfont.cc	(revision 3713)
@@ -257,4 +257,6 @@
 /**
    \brief creates a texture out of the given parameters
+
+   this has to be called every time by the user, to if changes were made.
 */
 void GLFont::createTexture(void)
Index: orxonox/branches/textEngine/src/lib/graphics/font/sfont.c
===================================================================
--- orxonox/branches/textEngine/src/lib/graphics/font/sfont.c	(revision 3707)
+++ 	(revision )
@@ -1,178 +1,0 @@
-/*  SFont: a simple font-library that uses special .pngs as fonts
-    Copyright (C) 2003 Karl Bartel
-
-    License: GPL or LGPL (at your choice)
-    WWW: http://www.linux-games.com/sfont/
-
-    This program is free software; you can redistribute it and/or modify        
-    it under the terms of the GNU General Public License as published by        
-    the Free Software Foundation; either version 2 of the License, or           
-    (at your option) any later version.                                         
-                                                                                
-    This program is distributed in the hope that it will be useful,       
-    but WITHOUT ANY WARRANTY; without even the implied warranty of              
-    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the               
-    GNU General Public License for more details.                
-                                                                               
-    You should have received a copy of the GNU General Public License           
-    along with this program; if not, write to the Free Software                 
-    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA   
-                                                                                
-    Karl Bartel
-    Cecilienstr. 14                                                    
-    12307 Berlin
-    GERMANY
-    karlb@gmx.net                                                      
-*/                                                                            
-#include <SDL.h>
-
-#include <assert.h>
-#include <stdlib.h>
-#include "SFont.h"
-
-static Uint32 GetPixel(SDL_Surface *Surface, Sint32 X, Sint32 Y)
-{
-   Uint8  *bits;
-   Uint32 Bpp;
-
-   assert(X>=0);
-   assert(X<Surface->w);
-   
-   Bpp = Surface->format->BytesPerPixel;
-   bits = ((Uint8 *)Surface->pixels)+Y*Surface->pitch+X*Bpp;
-
-   // Get the pixel
-   switch(Bpp) {
-      case 1:
-         return *((Uint8 *)Surface->pixels + Y * Surface->pitch + X);
-         break;
-      case 2:
-         return *((Uint16 *)Surface->pixels + Y * Surface->pitch/2 + X);
-         break;
-      case 3: { // Format/endian independent 
-         Uint8 r, g, b;
-         r = *((bits)+Surface->format->Rshift/8);
-         g = *((bits)+Surface->format->Gshift/8);
-         b = *((bits)+Surface->format->Bshift/8);
-         return SDL_MapRGB(Surface->format, r, g, b);
-         }
-         break;
-      case 4:
-         return *((Uint32 *)Surface->pixels + Y * Surface->pitch/4 + X);
-         break;
-   }
-
-   return -1;
-}
-
-SFont_Font* SFont_InitFont(SDL_Surface* Surface)
-{
-    int x = 0, i = 0;
-    Uint32 pixel;
-    SFont_Font* Font;
-    Uint32 pink;
-
-    if (Surface == NULL)
-	return NULL;
-
-    Font = (SFont_Font *) malloc(sizeof(SFont_Font));
-    Font->Surface = Surface;
-
-    SDL_LockSurface(Surface);
-
-    pink = SDL_MapRGB(Surface->format, 255, 0, 255);
-    while (x < Surface->w) {
-	if (GetPixel(Surface, x, 0) == pink) { 
-    	    Font->CharPos[i++]=x;
-    	    while((x < Surface->w) && (GetPixel(Surface, x, 0)== pink))
-		x++;
-	    Font->CharPos[i++]=x;
-	}
-	x++;
-    }
-    Font->MaxPos = x-1;
-    
-    pixel = GetPixel(Surface, 0, Surface->h-1);
-    SDL_UnlockSurface(Surface);
-    SDL_SetColorKey(Surface, SDL_SRCCOLORKEY, pixel);
-
-    return Font;
-}
-
-void SFont_FreeFont(SFont_Font* FontInfo)
-{
-    SDL_FreeSurface(FontInfo->Surface);
-    free(FontInfo);
-}
-
-void SFont_Write(SDL_Surface *Surface, const SFont_Font *Font,
-		 int x, int y, const char *text)
-{
-    const char* c;
-    int charoffset;
-    SDL_Rect srcrect, dstrect;
-
-    if(text == NULL)
-	return;
-
-    // these values won't change in the loop
-    srcrect.y = 1;
-    dstrect.y = y;
-    srcrect.h = dstrect.h = Font->Surface->h - 1;
-
-    for(c = text; *c != '\0' && x <= Surface->w ; c++) {
-	charoffset = ((int) (*c - 33)) * 2 + 1;
-	// skip spaces and nonprintable characters
-	if (*c == ' ' || charoffset < 0 || charoffset > Font->MaxPos) {
-	    x += Font->CharPos[2]-Font->CharPos[1];
-	    continue;
-	}
-
-	srcrect.w = dstrect.w = 
-	    (Font->CharPos[charoffset+2] + Font->CharPos[charoffset+1])/2 -
-	    (Font->CharPos[charoffset] + Font->CharPos[charoffset-1])/2;
-	srcrect.x = (Font->CharPos[charoffset]+Font->CharPos[charoffset-1])/2;
-	dstrect.x = x - (float)(Font->CharPos[charoffset]
-			      - Font->CharPos[charoffset-1])/2;
-
-	SDL_BlitSurface(Font->Surface, &srcrect, Surface, &dstrect); 
-
-	x += Font->CharPos[charoffset+1] - Font->CharPos[charoffset];
-    }
-}
-
-int SFont_TextWidth(const SFont_Font *Font, const char *text)
-{
-    const char* c;
-    int charoffset=0;
-    int width = 0;
-
-    if(text == NULL)
-	return 0;
-
-    for(c = text; *c != '\0'; c++) {
-	charoffset = ((int) *c - 33) * 2 + 1;
-	// skip spaces and nonprintable characters
-        if (*c == ' ' || charoffset < 0 || charoffset > Font->MaxPos) {
-            width += Font->CharPos[2]-Font->CharPos[1];
-	    continue;
-	}
-	
-	width += Font->CharPos[charoffset+1] - Font->CharPos[charoffset];
-    }
-
-    return width;
-}
-
-int SFont_TextHeight(const SFont_Font* Font)
-{
-    return Font->Surface->h - 1;
-}
-
-void SFont_WriteCenter(SDL_Surface *Surface, const SFont_Font *Font,
-		       int y, const char *text)
-{
-    SFont_Write(Surface, Font, Surface->w/2 - SFont_TextWidth(Font, text)/2,
-	    	y, text);
-}
-
Index: orxonox/branches/textEngine/src/lib/graphics/font/sfont.h
===================================================================
--- orxonox/branches/textEngine/src/lib/graphics/font/sfont.h	(revision 3707)
+++ 	(revision )
@@ -1,83 +1,0 @@
-/*  SFont: a simple font-library that uses special bitmaps as fonts
-    Copyright (C) 2003 Karl Bartel
-
-    License: GPL or LGPL (at your choice)
-    WWW: http://www.linux-games.com/sfont/
-
-    This program is free software; you can redistribute it and/or modify        
-    it under the terms of the GNU General Public License as published by        
-    the Free Software Foundation; either version 2 of the License, or           
-    (at your option) any later version.                                         
-                                                                                
-    This program is distributed in the hope that it will be useful,       
-    but WITHOUT ANY WARRANTY; without even the implied warranty of              
-    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the               
-    GNU General Public License for more details.                
-                                                                               
-    You should have received a copy of the GNU General Public License           
-    along with this program; if not, write to the Free Software                 
-    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA   
-                                                                                
-    Karl Bartel
-    Cecilienstr. 14                                                    
-    12307 Berlin
-    GERMANY
-    karlb@gmx.net                                                      
-*/                                                                            
-
-/************************************************************************ 
-*    SFONT - SDL Font Library by Karl Bartel <karlb@gmx.net>            *
-*                                                                       *
-*  All functions are explained below. For further information, take a   *
-*  look at the example files, the links at the SFont web site, or       *
-*  contact me, if you problem isn' addressed anywhere.                  *
-*                                                                       *
-************************************************************************/
-#ifndef SFONT_H
-#define SFONT_H
-
-#include <SDL.h>
-
-#ifdef __cplusplus 
-extern "C" {
-#endif
-
-// Delcare one variable of this type for each font you are using.
-// To load the fonts, load the font image into YourFont->Surface
-// and call InitFont( YourFont );
-typedef struct {
-	SDL_Surface *Surface;	
-	int CharPos[512];
-	int MaxPos;
-} SFont_Font;
-
-// Initializes the font
-// Font: this contains the suface with the font.
-//       The Surface must be loaded before calling this function
-SFont_Font* SFont_InitFont (SDL_Surface *Font);
-
-// Frees the font
-// Font: The font to free
-//       The font must be loaded before using this function.
-void SFont_FreeFont(SFont_Font* Font);
-
-// Blits a string to a surface
-// Destination: the suface you want to blit to
-// text: a string containing the text you want to blit.
-void SFont_Write(SDL_Surface *Surface, const SFont_Font *Font, int x, int y,
-				 const char *text);
-
-// Returns the width of "text" in pixels
-int SFont_TextWidth(const SFont_Font* Font, const char *text);
-// Returns the height of "text" in pixels (which is always equal to Font->Surface->h)
-int SFont_TextHeight(const SFont_Font* Font);
-
-// Blits a string to Surface with centered x position
-void SFont_WriteCenter(SDL_Surface *Surface, const SFont_Font* Font, int y,
-					   const char *text);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* SFONT_H */
