2013-04-18 03:29:41 +00:00
|
|
|
// Copyright 2013 Dolphin Emulator Project
|
|
|
|
// Licensed under GPLv2
|
|
|
|
// Refer to the license.txt file included.
|
2013-03-25 23:05:46 +00:00
|
|
|
|
2014-02-10 18:54:46 +00:00
|
|
|
#pragma once
|
2013-03-25 23:05:46 +00:00
|
|
|
|
2013-04-14 03:54:02 +00:00
|
|
|
class RasterFont
|
|
|
|
{
|
2013-03-25 23:05:46 +00:00
|
|
|
public:
|
2013-04-14 03:54:02 +00:00
|
|
|
RasterFont();
|
2014-08-30 16:41:21 +00:00
|
|
|
~RasterFont();
|
2013-04-14 03:54:02 +00:00
|
|
|
static int debug;
|
|
|
|
|
|
|
|
// and the happy helper functions
|
|
|
|
void printString(const char *s, double x, double y, double z=0.0);
|
|
|
|
void printCenteredString(const char *s, double y, int screen_width, double z=0.0);
|
2013-03-25 23:05:46 +00:00
|
|
|
|
|
|
|
void printMultilineText(const char *text, double x, double y, double z, int bbWidth, int bbHeight);
|
2014-08-11 00:48:28 +00:00
|
|
|
|
2013-03-25 23:05:46 +00:00
|
|
|
private:
|
2013-04-14 03:54:02 +00:00
|
|
|
int fontOffset;
|
|
|
|
char *temp_buffer;
|
2014-08-11 00:48:28 +00:00
|
|
|
|
|
|
|
static const int TEMP_BUFFER_SIZE = 64 * 1024;
|
|
|
|
static const int CHAR_WIDTH = 10;
|
|
|
|
static const int CHAR_HEIGHT = 15;
|
2013-03-25 23:05:46 +00:00
|
|
|
};
|