|
2 | 2 | olcPixelGameEngine.h |
3 | 3 |
|
4 | 4 | +-------------------------------------------------------------+ |
5 | | - | OneLoneCoder Pixel Game Engine v2.12 | |
| 5 | + | OneLoneCoder Pixel Game Engine v2.13 | |
6 | 6 | | "What do you need? Pixels... Lots of Pixels..." - javidx9 | |
7 | 7 | +-------------------------------------------------------------+ |
8 | 8 |
|
|
209 | 209 | +Wireframe Decal Mode - For debug overlays |
210 | 210 | 2.11: Made PGEX hooks optional - (provide true to super constructor) |
211 | 211 | 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 |
213 | 213 | |
214 | 214 | !! Apple Platforms will not see these updates immediately - Sorry, I dont have a mac to test... !! |
215 | 215 | !! Volunteers willing to help appreciated, though PRs are manually integrated with credit !! |
@@ -287,7 +287,7 @@ int main() |
287 | 287 | #include <array> |
288 | 288 | #include <cstring> |
289 | 289 |
|
290 | | -#define PGE_VER 212 |
| 290 | +#define PGE_VER 213 |
291 | 291 |
|
292 | 292 | // O------------------------------------------------------------------------------O |
293 | 293 | // | COMPILER CONFIGURATION ODDITIES | |
@@ -963,6 +963,8 @@ namespace olc |
963 | 963 | void Clear(Pixel p); |
964 | 964 | // Clears the rendering back buffer |
965 | 965 | void ClearBuffer(Pixel p, bool bDepth = true); |
| 966 | + // Returns the font image |
| 967 | + olc::Sprite* GetFontSprite(); |
966 | 968 |
|
967 | 969 | public: // Branding |
968 | 970 | std::string sAppName; |
@@ -2143,6 +2145,11 @@ namespace olc |
2143 | 2145 | renderer->ClearBuffer(p, bDepth); |
2144 | 2146 | } |
2145 | 2147 |
|
| 2148 | + olc::Sprite* PixelGameEngine::GetFontSprite() |
| 2149 | + { |
| 2150 | + return fontSprite; |
| 2151 | + } |
| 2152 | + |
2146 | 2153 | void PixelGameEngine::FillRect(const olc::vi2d& pos, const olc::vi2d& size, Pixel p) |
2147 | 2154 | { |
2148 | 2155 | FillRect(pos.x, pos.y, size.x, size.y, p); |
@@ -2509,7 +2516,7 @@ namespace olc |
2509 | 2516 | { |
2510 | 2517 | DecalInstance di; |
2511 | 2518 | di.decal = decal; |
2512 | | - di.points = pos.size(); |
| 2519 | + di.points = uint32_t(pos.size()); |
2513 | 2520 | di.pos.resize(di.points); |
2514 | 2521 | di.uv.resize(di.points); |
2515 | 2522 | di.w.resize(di.points); |
|
0 commit comments