crash error

This commit is contained in:
James Turk 2003-10-12 04:09:46 +00:00
parent 61d8512793
commit 0bf9e4dbc5
2 changed files with 19 additions and 10 deletions

View File

@ -1,5 +1,5 @@
ZEngine Version Log for Version 0.8.5
$Id: changelog.txt,v 1.53 2003/10/05 20:05:57 cozman Exp $
$Id: changelog.txt,v 1.54 2003/10/12 04:09:46 cozman Exp $
Changes are marked with symbols that describe them:
! is code that breaks backwards compatibility (used after 0.8.0-rc1, previous versions broke compatibility)
@ -10,6 +10,9 @@ Changes are marked with symbols that describe them:
(Note: Depreciated code (that marked with a *) is likely to disappear completely at the next major version.)
0.8.6
# Fixed ZImage crash on missing image. ZFont crash fix relys on SDL_ttf 2.0.7
0.8.5
+ OpenFromZip code added for ZImage,ZFont and ZSound.
+ Zlib/Unzip code added directly into ZEngine.

View File

@ -13,7 +13,7 @@
\brief Source file for ZFont.
Implementation of ZFont, the basic Font class for ZEngine.
<br>$Id: ZE_ZFont.cpp,v 1.14 2003/10/05 19:59:29 cozman Exp $<br>
<br>$Id: ZE_ZFont.cpp,v 1.15 2003/10/12 04:09:46 cozman Exp $<br>
\author James Turk
**/
@ -84,20 +84,26 @@ void ZFont::Release()
}
void ZFont::DrawText(std::string text, ZImage &image) const
{
if(rFont)
{
if(text.length() == 0)
text = " ";
image.Attach(TTF_RenderText_Blended(rFont, text.c_str(), rColor));
image.SetAlpha(rColor.unused); //the images alpha comes from the SetColor a parameter
}
}
void ZFont::DrawShadedText(std::string text, ZImage &image) const
{
if(rFont)
{
if(text.length() == 0)
text = " ";
image.Attach(TTF_RenderText_Shaded(rFont, text.c_str(), rColor, rBGColor));
image.SetAlpha(rColor.unused);
}
}
void ZFont::SetColor(Uint8 r, Uint8 g, Uint8 b, Uint8 a)
{