Fix compilation on windows
This commit is contained in:
parent
32aaafee94
commit
12e79ea111
12
data/font.h
12
data/font.h
@ -1,11 +1,11 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
#define FONT_H 12
|
#define FONT_H 12
|
||||||
#ifndef FONTEDITOR
|
#ifndef FONTEDITOR
|
||||||
extern unsigned char font_data[];
|
extern const unsigned char font_data[];
|
||||||
extern unsigned short font_ptrs[];
|
extern const unsigned short font_ptrs[];
|
||||||
extern unsigned int font_ranges[][2];
|
extern const unsigned int font_ranges[][2];
|
||||||
#else
|
#else
|
||||||
extern unsigned char *font_data;
|
extern const unsigned char *font_data;
|
||||||
extern unsigned short *font_ptrs;
|
extern const unsigned short *font_ptrs;
|
||||||
extern unsigned int (*font_ranges)[2];
|
extern const unsigned int (*font_ranges)[2];
|
||||||
#endif
|
#endif
|
||||||
|
@ -1,2 +0,0 @@
|
|||||||
#define INCLUDE_FONTDATA
|
|
||||||
#include "font.h"
|
|
@ -1,3 +1,4 @@
|
|||||||
|
#pragma once
|
||||||
#include <cstddef>
|
#include <cstddef>
|
||||||
|
|
||||||
#include "common/String.h"
|
#include "common/String.h"
|
||||||
@ -5,19 +6,19 @@
|
|||||||
|
|
||||||
class FontReader
|
class FontReader
|
||||||
{
|
{
|
||||||
unsigned char *pointer;
|
unsigned char const *pointer;
|
||||||
int width;
|
int width;
|
||||||
int pixels;
|
int pixels;
|
||||||
int data;
|
int data;
|
||||||
|
|
||||||
inline FontReader(unsigned char *_pointer):
|
inline FontReader(unsigned char const *_pointer):
|
||||||
pointer(_pointer + 1),
|
pointer(_pointer + 1),
|
||||||
width(*_pointer),
|
width(*_pointer),
|
||||||
pixels(0),
|
pixels(0),
|
||||||
data(0)
|
data(0)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
static inline unsigned char *lookupChar(String::value_type ch)
|
static inline unsigned char const *lookupChar(String::value_type ch)
|
||||||
{
|
{
|
||||||
size_t offset = 0;
|
size_t offset = 0;
|
||||||
for(int i = 0; font_ranges[i][1]; i++)
|
for(int i = 0; font_ranges[i][1]; i++)
|
@ -5,7 +5,7 @@
|
|||||||
#include "Config.h"
|
#include "Config.h"
|
||||||
#include "Misc.h"
|
#include "Misc.h"
|
||||||
#include "Graphics.h"
|
#include "Graphics.h"
|
||||||
#include "Font.h"
|
#include "FontReader.h"
|
||||||
#ifdef HIGH_QUALITY_RESAMPLE
|
#ifdef HIGH_QUALITY_RESAMPLE
|
||||||
#include "resampler/resampler.h"
|
#include "resampler/resampler.h"
|
||||||
#endif
|
#endif
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
#include "Graphics.h"
|
#include "Graphics.h"
|
||||||
#include "Font.h"
|
#include "FontReader.h"
|
||||||
#include "common/tpt-thread.h"
|
#include "common/tpt-thread.h"
|
||||||
#ifdef OGLI
|
#ifdef OGLI
|
||||||
|
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
#include <cmath>
|
#include <cmath>
|
||||||
#include "Font.h"
|
#include "FontReader.h"
|
||||||
|
|
||||||
int PIXELMETHODS_CLASS::drawtext_outline(int x, int y, String s, int r, int g, int b, int a)
|
int PIXELMETHODS_CLASS::drawtext_outline(int x, int y, String s, int r, int g, int b, int a)
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user