]> git.localhorst.tv Git - l2e.git/blobdiff - src/graphics/Font.h
forced fonts to use the data's charset
[l2e.git] / src / graphics / Font.h
index 0294d2539f0c47417ad45083d7a273b919eff4bb..70f451c2c864b6cdc8b5fd0a81a2f08f5137324c 100644 (file)
@@ -18,18 +18,23 @@ namespace graphics {
 class Font {
 
 public:
-       explicit Font(const Sprite *sprite, int digitsCol = 0, int digitsRow = 0) : sprite(sprite), digitsCol(digitsCol), digitsRow(digitsRow) { }
+       explicit Font(const Sprite *sprite, int colOffset = 0, int rowOffset = 0)
+       : sprite(sprite), colOffset(colOffset), rowOffset(rowOffset) {
+
+       }
 
 public:
        int CharWidth() const { return sprite->Width(); }
        int CharHeight() const { return sprite->Height(); }
-       void DrawDigit(int digit, SDL_Surface *dest, geometry::Point<int> position) const;
-       void DrawNumber(int number, SDL_Surface *dest, geometry::Point<int> position, int digits = 0) const;
+       void DrawChar(char c, SDL_Surface *dest, geometry::Point<int> position) const;
+       void DrawString(const char *s, SDL_Surface *dest, geometry::Point<int> position, int maxChars = 0) const;
+       void DrawDigit(int d, SDL_Surface *dest, geometry::Point<int> position) const;
+       void DrawNumber(int n, SDL_Surface *dest, geometry::Point<int> position, int digits = 0) const;
 
 private:
        const Sprite *sprite;
-       int digitsCol;
-       int digitsRow;
+       int colOffset;
+       int rowOffset;
 
 };