summaryrefslogtreecommitdiff
path: root/noncore/games/sfcave-sdl/bfont.h
Side-by-side diff
Diffstat (limited to 'noncore/games/sfcave-sdl/bfont.h') (more/less context) (show whitespace changes)
-rw-r--r--noncore/games/sfcave-sdl/bfont.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/noncore/games/sfcave-sdl/bfont.h b/noncore/games/sfcave-sdl/bfont.h
index dee97f1..5c2d7e7 100644
--- a/noncore/games/sfcave-sdl/bfont.h
+++ b/noncore/games/sfcave-sdl/bfont.h
@@ -1,60 +1,60 @@
/************************************************************
BFONT v. 1.0.2 - Billi Font Library by Diego Billi
BFONT++ C++ port by Gianluigi Davassi
************************************************************/
#ifndef __BFONT_HEADER_H__
#define __BFONT_HEADER_H__
#include <iostream>
-#include "SDL.h"
+#include <SDL/SDL.h>
class BFont
{
int h; // font height
SDL_Surface *Surface; // font surface
SDL_Rect Chars[256]; // characters width
const char* name; // font name
BFont(const BFont&);
void InitFont();
int count(const char *text);
public:
BFont(const char *__filename) // generator bill
: name(__filename)
{ LoadFont(__filename); }
~BFont()
{ SDL_FreeSurface(Surface); } // screen must be free by application
int FontHeight () // Returns the font height
{ return h; }
void SetFontHeight (int height) // Change the font height
{ h = height ; }
int CharWidth (char c) // Returns the character width of the specified font
{ return Chars[c].w; }
void LoadFont (const char *filename); // Load and store le font in the BFont structure
int PutChar (SDL_Surface *screen, int x, int y, char c); // Write a single character on the "Surface" with the current font
int TextWidth (const char *text ); // Returns the width, in pixels, of the text calculated with the current font
BFont *SetFontColor(Uint8 r, Uint8 g, Uint8 b); // Returns a new font colored with the color (r,g,b)
void PutString ( SDL_Surface *screen, int x, int y, const char *text); // Write a string on the "Surface" with the specified font
void LeftPutString ( SDL_Surface *screen, int y, const char *text); // Write a left-aligned string on the "Surface" with the specified font
void CenteredPutString ( SDL_Surface *screen, int y, const char *text); // Write a center-aligned string on the "Surface" with the specified font
void RightPutString ( SDL_Surface *screen, int y, const char *text); // Write a right-aligned string on the "Surface" with the specified font
void JustifiedPutString ( SDL_Surface *screen, int y, const char *text); // Write a justify-aligned string on the "Surface" with the specified font
// The following functions do the same task but have the classic "printf" sintax
void PrintString ( SDL_Surface *screen, int x, int y, char *fmt, ...);
void CenteredPrintString ( SDL_Surface *screen, int y, char *fmt, ...);
void RightPrintString ( SDL_Surface *screen, int y, char *fmt, ...);
void LeftPrintString ( SDL_Surface *screen, int y, char *fmt, ...);
void JustifiedPrintString ( SDL_Surface *screen, int y, char *fmt, ...);