|
|
|
@ -1223,7 +1223,7 @@ namespace olc |
|
|
|
|
olc::Sprite* GetFontSprite(); |
|
|
|
|
// Returns the font image
|
|
|
|
|
olc::Decal* GetFontDecal(); |
|
|
|
|
void SetFontSprite(std::string_view filename); |
|
|
|
|
void SetFontSprite(std::string_view filename,ResourcePack*pack,bool generateGamePack); |
|
|
|
|
|
|
|
|
|
// Clip a line segment to visible area
|
|
|
|
|
bool ClipLineToScreen(olc::vi2d& in_p1, olc::vi2d& in_p2); |
|
|
|
@ -2593,8 +2593,17 @@ namespace olc |
|
|
|
|
{ return fontRenderable.Sprite(); } |
|
|
|
|
olc::Decal* PixelGameEngine::GetFontDecal() |
|
|
|
|
{ return fontRenderable.Decal(); } |
|
|
|
|
void PixelGameEngine::SetFontSprite(std::string_view filename) |
|
|
|
|
{ fontRenderable.Load(std::string(filename)); } |
|
|
|
|
void PixelGameEngine::SetFontSprite(std::string_view filename,ResourcePack*pack,bool generateGamePack) |
|
|
|
|
{
|
|
|
|
|
if(pack->Loaded()){ |
|
|
|
|
fontRenderable.Load(std::string(filename),pack);
|
|
|
|
|
}else{ |
|
|
|
|
fontRenderable.Load(std::string(filename),nullptr);
|
|
|
|
|
if(generateGamePack){ |
|
|
|
|
pack->AddFile(std::string(filename)); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
bool PixelGameEngine::ClipLineToScreen(olc::vi2d& in_p1, olc::vi2d& in_p2) |
|
|
|
|
{ |
|
|
|
|