Skip to content

Commit 8cb4e67

Browse files
authored
Added v2.13
+GetFontSprite()
1 parent 25427d5 commit 8cb4e67

1 file changed

Lines changed: 11 additions & 4 deletions

File tree

olcPixelGameEngine.h

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
olcPixelGameEngine.h
33
44
+-------------------------------------------------------------+
5-
| OneLoneCoder Pixel Game Engine v2.12 |
5+
| OneLoneCoder Pixel Game Engine v2.13 |
66
| "What do you need? Pixels... Lots of Pixels..." - javidx9 |
77
+-------------------------------------------------------------+
88
@@ -209,7 +209,7 @@
209209
+Wireframe Decal Mode - For debug overlays
210210
2.11: Made PGEX hooks optional - (provide true to super constructor)
211211
2.12: Fix for MinGW compiler non-compliance :( - why is its sdk structure different?? why???
212-
212+
2.13: +GetFontSprite() - allows access to font data
213213
214214
!! Apple Platforms will not see these updates immediately - Sorry, I dont have a mac to test... !!
215215
!! Volunteers willing to help appreciated, though PRs are manually integrated with credit !!
@@ -287,7 +287,7 @@ int main()
287287
#include <array>
288288
#include <cstring>
289289

290-
#define PGE_VER 212
290+
#define PGE_VER 213
291291

292292
// O------------------------------------------------------------------------------O
293293
// | COMPILER CONFIGURATION ODDITIES |
@@ -963,6 +963,8 @@ namespace olc
963963
void Clear(Pixel p);
964964
// Clears the rendering back buffer
965965
void ClearBuffer(Pixel p, bool bDepth = true);
966+
// Returns the font image
967+
olc::Sprite* GetFontSprite();
966968

967969
public: // Branding
968970
std::string sAppName;
@@ -2143,6 +2145,11 @@ namespace olc
21432145
renderer->ClearBuffer(p, bDepth);
21442146
}
21452147

2148+
olc::Sprite* PixelGameEngine::GetFontSprite()
2149+
{
2150+
return fontSprite;
2151+
}
2152+
21462153
void PixelGameEngine::FillRect(const olc::vi2d& pos, const olc::vi2d& size, Pixel p)
21472154
{
21482155
FillRect(pos.x, pos.y, size.x, size.y, p);
@@ -2509,7 +2516,7 @@ namespace olc
25092516
{
25102517
DecalInstance di;
25112518
di.decal = decal;
2512-
di.points = pos.size();
2519+
di.points = uint32_t(pos.size());
25132520
di.pos.resize(di.points);
25142521
di.uv.resize(di.points);
25152522
di.w.resize(di.points);

0 commit comments

Comments
 (0)