mirror of
https://github.com/AquariaOSE/Aquaria.git
synced 2025-01-24 17:26:41 +00:00
Hackish fix to load glf files even if corrupt (this is required or the next commit...)
This commit is contained in:
parent
7b2fa39428
commit
24b08b1043
1 changed files with 3 additions and 3 deletions
|
@ -47,7 +47,7 @@ GLFont::~GLFont ()
|
|||
//*******************************************************************
|
||||
bool GLFont::Create (const char *file_name, int tex, bool loadTexture)
|
||||
{
|
||||
int num_chars, num_tex_bytes;
|
||||
ByteBuffer::uint32 num_chars, num_tex_bytes;
|
||||
char *tex_bytes;
|
||||
|
||||
//Destroy the old font if there was one, just to be safe
|
||||
|
@ -102,8 +102,8 @@ bool GLFont::Create (const char *file_name, int tex, bool loadTexture)
|
|||
//Read texture pixel data
|
||||
num_tex_bytes = header.tex_width * header.tex_height * 2;
|
||||
tex_bytes = new char[num_tex_bytes];
|
||||
//input.read(tex_bytes, num_tex_bytes);
|
||||
bb.read(tex_bytes, num_tex_bytes);
|
||||
// HACK: Aquaria uses override textures, so we can live with the truncation.
|
||||
bb.read(tex_bytes, std::min(num_tex_bytes, bb.readable()));
|
||||
|
||||
//Build2DMipmaps(3, header.tex_width, header.tex_height, GL_UNSIGNED_BYTE, tex_bytes, 1);
|
||||
|
||||
|
|
Loading…
Reference in a new issue