Update to v2.24 of the PGE.

pull/29/head
sigonasr2 11 months ago
parent 20928b6867
commit 0d95dec2a7
  1. 19
      Adventures in Lestoria/olcPixelGameEngine.h

@ -3,7 +3,7 @@
olcPixelGameEngine.h
+-------------------------------------------------------------+
| OneLoneCoder Pixel Game Engine v2.23 |
| OneLoneCoder Pixel Game Engine v2.24 |
| "What do you need? Pixels... Lots of Pixels..." - javidx9 |
+-------------------------------------------------------------+
@ -197,11 +197,11 @@ Anonymous Pirate...Return To Monkey Island
Special thanks to my Patreons too - I wont name you on here, but I've
certainly enjoyed my tea and flapjacks :D
- In Memory of SaladinAkara 25.06.2023 -
Author
~~~~~~
David Barr, aka javidx9, (c) OneLoneCoder 2018, 2019, 2020, 2021, 2022
David Barr, aka javidx9, (c) OneLoneCoder 2018, 2019, 2020, 2021, 2022, 2023, 2024
*/
#pragma endregion
@ -322,6 +322,7 @@ Fix Pixel -= operator (thanks Au Lit)
2.22: = Fix typo on dragged file buffers for unicode builds
2.23: Fixed Emscripten host sizing errors - Thanks Moros
Fixed v2d_generic.clamp() function
2.24: Fix FillTexturedTriangle() to remove const-ref
!! Apple Platforms will not see these updates immediately - Sorry, I dont have a mac to test... !!
!! Volunteers willing to help appreciated, though PRs are manually integrated with credit !!
@ -404,7 +405,7 @@ return 0;
#include "olcUTIL_Geometry2D.h"
#pragma endregion
#define PGE_VER 223
#define PGE_VER 224
// O------------------------------------------------------------------------------O
// | COMPILER CONFIGURATION ODDITIES |
@ -1115,7 +1116,7 @@ namespace olc
void FillTriangle(int32_t x1, int32_t y1, int32_t x2, int32_t y2, int32_t x3, int32_t y3, Pixel p = olc::WHITE);
void FillTriangle(const olc::vi2d& pos1, const olc::vi2d& pos2, const olc::vi2d& pos3, Pixel p = olc::WHITE);
// Fill a textured and coloured triangle
void FillTexturedTriangle(const std::vector<olc::vf2d>& vPoints, std::vector<olc::vf2d> vTex, std::vector<olc::Pixel> vColour, olc::Sprite* sprTex);
void FillTexturedTriangle(std::vector<olc::vf2d> vPoints, std::vector<olc::vf2d> vTex, std::vector<olc::Pixel> vColour, olc::Sprite* sprTex);
void FillTexturedPolygon(const std::vector<olc::vf2d>& vPoints, const std::vector<olc::vf2d>& vTex, const std::vector<olc::Pixel>& vColour, olc::Sprite* sprTex, olc::DecalStructure structure = olc::DecalStructure::LIST);
// Draws an entire sprite at location (x,y)
void DrawSprite(int32_t x, int32_t y, Sprite* sprite, uint32_t scale = 1, uint8_t flip = olc::Sprite::NONE, std::function<Pixel(Pixel&)>colorFunc=[](Pixel&in){return in;});
@ -2311,8 +2312,8 @@ namespace olc
auto rol = [&](void) { pattern = (pattern << 1) | (pattern >> 31); return pattern & 1; };
olc::vi2d p1(x1, y1), p2(x2, y2);
//if (!ClipLineToScreen(p1, p2))
// return;
if (!ClipLineToScreen(p1, p2))
return;
x1 = p1.x; y1 = p1.y;
x2 = p2.x; y2 = p2.y;
@ -2706,7 +2707,7 @@ namespace olc
}
}
void PixelGameEngine::FillTexturedTriangle(const std::vector<olc::vf2d>& vPoints, std::vector<olc::vf2d> vTex, std::vector<olc::Pixel> vColour, olc::Sprite* sprTex)
void PixelGameEngine::FillTexturedTriangle(std::vector<olc::vf2d> vPoints, std::vector<olc::vf2d> vTex, std::vector<olc::Pixel> vColour, olc::Sprite* sprTex)
{
olc::vi2d p1 = vPoints[0];
olc::vi2d p2 = vPoints[1];
@ -3149,7 +3150,7 @@ namespace olc
di.pos[i] = { (pos[i].x * vInvScreenSize.x) * 2.0f - 1.0f, ((pos[i].y * vInvScreenSize.y) * 2.0f - 1.0f) * -1.0f };
di.uv[i] = uv[i];
di.tint[i] = tint;
di.w[i] = 1.0f;
di.w[i] = depth[i];
}
di.mode = nDecalMode;
di.structure = nDecalStructure;

Loading…
Cancel
Save