crash error
This commit is contained in:
parent
61d8512793
commit
0bf9e4dbc5
@ -1,5 +1,5 @@
|
|||||||
ZEngine Version Log for Version 0.8.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:
|
Changes are marked with symbols that describe them:
|
||||||
! is code that breaks backwards compatibility (used after 0.8.0-rc1, previous versions broke compatibility)
|
! 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.)
|
(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
|
0.8.5
|
||||||
+ OpenFromZip code added for ZImage,ZFont and ZSound.
|
+ OpenFromZip code added for ZImage,ZFont and ZSound.
|
||||||
+ Zlib/Unzip code added directly into ZEngine.
|
+ Zlib/Unzip code added directly into ZEngine.
|
||||||
|
@ -13,7 +13,7 @@
|
|||||||
\brief Source file for ZFont.
|
\brief Source file for ZFont.
|
||||||
|
|
||||||
Implementation of ZFont, the basic Font class for ZEngine.
|
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
|
\author James Turk
|
||||||
**/
|
**/
|
||||||
|
|
||||||
@ -84,20 +84,26 @@ void ZFont::Release()
|
|||||||
}
|
}
|
||||||
|
|
||||||
void ZFont::DrawText(std::string text, ZImage &image) const
|
void ZFont::DrawText(std::string text, ZImage &image) const
|
||||||
|
{
|
||||||
|
if(rFont)
|
||||||
{
|
{
|
||||||
if(text.length() == 0)
|
if(text.length() == 0)
|
||||||
text = " ";
|
text = " ";
|
||||||
image.Attach(TTF_RenderText_Blended(rFont, text.c_str(), rColor));
|
image.Attach(TTF_RenderText_Blended(rFont, text.c_str(), rColor));
|
||||||
image.SetAlpha(rColor.unused); //the images alpha comes from the SetColor a parameter
|
image.SetAlpha(rColor.unused); //the images alpha comes from the SetColor a parameter
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void ZFont::DrawShadedText(std::string text, ZImage &image) const
|
void ZFont::DrawShadedText(std::string text, ZImage &image) const
|
||||||
|
{
|
||||||
|
if(rFont)
|
||||||
{
|
{
|
||||||
if(text.length() == 0)
|
if(text.length() == 0)
|
||||||
text = " ";
|
text = " ";
|
||||||
image.Attach(TTF_RenderText_Shaded(rFont, text.c_str(), rColor, rBGColor));
|
image.Attach(TTF_RenderText_Shaded(rFont, text.c_str(), rColor, rBGColor));
|
||||||
image.SetAlpha(rColor.unused);
|
image.SetAlpha(rColor.unused);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void ZFont::SetColor(Uint8 r, Uint8 g, Uint8 b, Uint8 a)
|
void ZFont::SetColor(Uint8 r, Uint8 g, Uint8 b, Uint8 a)
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user