Tie PGE font setting to resource pack loading system. Release Build 8168.
This commit is contained in:
parent
585cd209be
commit
15d5d2fb4a
@ -3148,7 +3148,8 @@ void AiL::InitializeGraphics(){
|
||||
}
|
||||
std::cout<<VisualNovel::graphicsToLoad.size()<<" images for visual novel engine have been loaded."<<std::endl;
|
||||
|
||||
SetFontSprite("GFX_Prefix"_S+"font.png");
|
||||
SetFontSprite("GFX_Prefix"_S+"font.png",&gamepack,"GENERATE_GAMEPACK"_B);
|
||||
std::cout<<"Custom font loaded."<<std::endl;
|
||||
|
||||
Menu::themes.SetInitialized();
|
||||
std::cout<<Menu::themes.size()<<" themes have been loaded."<<std::endl;
|
||||
|
@ -39,7 +39,7 @@ All rights reserved.
|
||||
#define VERSION_MAJOR 0
|
||||
#define VERSION_MINOR 5
|
||||
#define VERSION_PATCH 1
|
||||
#define VERSION_BUILD 8165
|
||||
#define VERSION_BUILD 8168
|
||||
|
||||
#define stringify(a) stringify_(a)
|
||||
#define stringify_(a) #a
|
||||
|
Binary file not shown.
@ -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)
|
||||
{
|
||||
|
Binary file not shown.
Loading…
x
Reference in New Issue
Block a user