olcPixelGameEngine v2.28
The official distribution of olcPixelGameEngine, a tool used in javidx9's YouTube videos and projects
Loading...
Searching...
No Matches
olc::PixelGameEngine Class Reference

#include <olcPixelGameEngine.h>

Public Member Functions

 PixelGameEngine ()
 
virtual ~PixelGameEngine ()
 
olc::rcode Construct (int32_t screen_w, int32_t screen_h, int32_t pixel_w, int32_t pixel_h, bool full_screen=false, bool vsync=false, bool cohesion=false, bool realwindow=false)
 
olc::rcode Start ()
 
virtual bool OnUserCreate ()
 
virtual bool OnUserUpdate (float fElapsedTime)
 
virtual bool OnUserDestroy ()
 
virtual void OnTextEntryComplete (const std::string &sText)
 
virtual bool OnConsoleCommand (const std::string &sCommand)
 
bool IsFocused () const
 
HWButton GetKey (Key k) const
 
HWButton GetMouse (uint32_t b) const
 
int32_t GetMouseX () const
 
int32_t GetMouseY () const
 
int32_t GetMouseWheel () const
 
const olc::vi2dGetWindowMouse () const
 
const olc::vi2dGetMousePos () const
 
olc::rcode SetWindowSize (const olc::vi2d &vPos, const olc::vi2d &vSize)
 
olc::rcode ShowWindowFrame (const bool bShowFrame)
 
int32_t ScreenWidth () const
 
int32_t ScreenHeight () const
 
int32_t GetDrawTargetWidth () const
 
int32_t GetDrawTargetHeight () const
 
olc::SpriteGetDrawTarget () const
 
void SetScreenSize (int w, int h)
 
void SetDrawTarget (Sprite *target)
 
uint32_t GetFPS () const
 
float GetElapsedTime () const
 
const olc::vi2dGetWindowSize () const
 
const olc::vi2dGetWindowPos () const
 
const olc::vi2dGetPixelSize () const
 
const olc::vi2dGetScreenPixelSize () const
 
const olc::vi2dGetScreenSize () const
 
const std::vector< std::string > & GetDroppedFiles () const
 
const olc::vi2dGetDroppedFilesPoint () const
 
void SetDrawTarget (uint8_t layer, bool bDirty=true)
 
void EnableLayer (uint8_t layer, bool b)
 
void SetLayerOffset (uint8_t layer, const olc::vf2d &offset)
 
void SetLayerOffset (uint8_t layer, float x, float y)
 
void SetLayerScale (uint8_t layer, const olc::vf2d &scale)
 
void SetLayerScale (uint8_t layer, float x, float y)
 
void SetLayerTint (uint8_t layer, const olc::Pixel &tint)
 
void SetLayerCustomRenderFunction (uint8_t layer, std::function< void()> f)
 
std::vector< LayerDesc > & GetLayers ()
 
uint32_t CreateLayer ()
 
void SetPixelMode (Pixel::Mode m)
 
Pixel::Mode GetPixelMode ()
 
void SetPixelMode (std::function< olc::Pixel(const int x, const int y, const olc::Pixel &pSource, const olc::Pixel &pDest)> pixelMode)
 
void SetPixelBlend (float fBlend)
 
void adv_ManualRenderEnable (const bool bEnable)
 
void adv_HardwareClip (const bool bScale, const olc::vi2d &viewPos, const olc::vi2d &viewSize, const bool bClear=false)
 
void adv_FlushLayer (const size_t nLayerID)
 
void adv_FlushLayerDecals (const size_t nLayerID)
 
virtual bool Draw (int32_t x, int32_t y, Pixel p=olc::WHITE)
 
bool Draw (const olc::vi2d &pos, Pixel p=olc::WHITE)
 
void DrawLine (int32_t x1, int32_t y1, int32_t x2, int32_t y2, Pixel p=olc::WHITE, uint32_t pattern=0xFFFFFFFF)
 
void DrawLine (const olc::vi2d &pos1, const olc::vi2d &pos2, Pixel p=olc::WHITE, uint32_t pattern=0xFFFFFFFF)
 
void DrawCircle (int32_t x, int32_t y, int32_t radius, Pixel p=olc::WHITE, uint8_t mask=0xFF)
 
void DrawCircle (const olc::vi2d &pos, int32_t radius, Pixel p=olc::WHITE, uint8_t mask=0xFF)
 
void FillCircle (int32_t x, int32_t y, int32_t radius, Pixel p=olc::WHITE)
 
void FillCircle (const olc::vi2d &pos, int32_t radius, Pixel p=olc::WHITE)
 
void DrawRect (int32_t x, int32_t y, int32_t w, int32_t h, Pixel p=olc::WHITE)
 
void DrawRect (const olc::vi2d &pos, const olc::vi2d &size, Pixel p=olc::WHITE)
 
void FillRect (int32_t x, int32_t y, int32_t w, int32_t h, Pixel p=olc::WHITE)
 
void FillRect (const olc::vi2d &pos, const olc::vi2d &size, Pixel p=olc::WHITE)
 
void DrawTriangle (int32_t x1, int32_t y1, int32_t x2, int32_t y2, int32_t x3, int32_t y3, Pixel p=olc::WHITE)
 
void DrawTriangle (const olc::vi2d &pos1, const olc::vi2d &pos2, const olc::vi2d &pos3, Pixel p=olc::WHITE)
 
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)
 
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)
 
void DrawSprite (int32_t x, int32_t y, Sprite *sprite, uint32_t scale=1, uint8_t flip=olc::Sprite::NONE)
 
void DrawSprite (const olc::vi2d &pos, Sprite *sprite, uint32_t scale=1, uint8_t flip=olc::Sprite::NONE)
 
void DrawPartialSprite (int32_t x, int32_t y, Sprite *sprite, int32_t ox, int32_t oy, int32_t w, int32_t h, uint32_t scale=1, uint8_t flip=olc::Sprite::NONE)
 
void DrawPartialSprite (const olc::vi2d &pos, Sprite *sprite, const olc::vi2d &sourcepos, const olc::vi2d &size, uint32_t scale=1, uint8_t flip=olc::Sprite::NONE)
 
void DrawString (int32_t x, int32_t y, const std::string &sText, Pixel col=olc::WHITE, uint32_t scale=1)
 
void DrawString (const olc::vi2d &pos, const std::string &sText, Pixel col=olc::WHITE, uint32_t scale=1)
 
olc::vi2d GetTextSize (const std::string &s)
 
void DrawStringProp (int32_t x, int32_t y, const std::string &sText, Pixel col=olc::WHITE, uint32_t scale=1)
 
void DrawStringProp (const olc::vi2d &pos, const std::string &sText, Pixel col=olc::WHITE, uint32_t scale=1)
 
olc::vi2d GetTextSizeProp (const std::string &s)
 
void SetDecalMode (const olc::DecalMode &mode)
 
void SetDecalStructure (const olc::DecalStructure &structure)
 
void DrawDecal (const olc::vf2d &pos, olc::Decal *decal, const olc::vf2d &scale={ 1.0f, 1.0f }, const olc::Pixel &tint=olc::WHITE)
 
void DrawPartialDecal (const olc::vf2d &pos, olc::Decal *decal, const olc::vf2d &source_pos, const olc::vf2d &source_size, const olc::vf2d &scale={ 1.0f, 1.0f }, const olc::Pixel &tint=olc::WHITE)
 
void DrawPartialDecal (const olc::vf2d &pos, const olc::vf2d &size, olc::Decal *decal, const olc::vf2d &source_pos, const olc::vf2d &source_size, const olc::Pixel &tint=olc::WHITE)
 
void DrawExplicitDecal (olc::Decal *decal, const olc::vf2d *pos, const olc::vf2d *uv, const olc::Pixel *col, uint32_t elements=4)
 
void DrawWarpedDecal (olc::Decal *decal, const olc::vf2d(&pos)[4], const olc::Pixel &tint=olc::WHITE)
 
void DrawWarpedDecal (olc::Decal *decal, const olc::vf2d *pos, const olc::Pixel &tint=olc::WHITE)
 
void DrawWarpedDecal (olc::Decal *decal, const std::array< olc::vf2d, 4 > &pos, const olc::Pixel &tint=olc::WHITE)
 
void DrawPartialWarpedDecal (olc::Decal *decal, const olc::vf2d(&pos)[4], const olc::vf2d &source_pos, const olc::vf2d &source_size, const olc::Pixel &tint=olc::WHITE)
 
void DrawPartialWarpedDecal (olc::Decal *decal, const olc::vf2d *pos, const olc::vf2d &source_pos, const olc::vf2d &source_size, const olc::Pixel &tint=olc::WHITE)
 
void DrawPartialWarpedDecal (olc::Decal *decal, const std::array< olc::vf2d, 4 > &pos, const olc::vf2d &source_pos, const olc::vf2d &source_size, const olc::Pixel &tint=olc::WHITE)
 
void DrawRotatedDecal (const olc::vf2d &pos, olc::Decal *decal, const float fAngle, const olc::vf2d &center={ 0.0f, 0.0f }, const olc::vf2d &scale={ 1.0f, 1.0f }, const olc::Pixel &tint=olc::WHITE)
 
void DrawPartialRotatedDecal (const olc::vf2d &pos, olc::Decal *decal, const float fAngle, const olc::vf2d &center, const olc::vf2d &source_pos, const olc::vf2d &source_size, const olc::vf2d &scale={ 1.0f, 1.0f }, const olc::Pixel &tint=olc::WHITE)
 
void DrawStringDecal (const olc::vf2d &pos, const std::string &sText, const Pixel col=olc::WHITE, const olc::vf2d &scale={ 1.0f, 1.0f })
 
void DrawStringPropDecal (const olc::vf2d &pos, const std::string &sText, const Pixel col=olc::WHITE, const olc::vf2d &scale={ 1.0f, 1.0f })
 
void DrawRectDecal (const olc::vf2d &pos, const olc::vf2d &size, const olc::Pixel col=olc::WHITE)
 
void FillRectDecal (const olc::vf2d &pos, const olc::vf2d &size, const olc::Pixel col=olc::WHITE)
 
void GradientFillRectDecal (const olc::vf2d &pos, const olc::vf2d &size, const olc::Pixel colTL, const olc::Pixel colBL, const olc::Pixel colBR, const olc::Pixel colTR)
 
void FillTriangleDecal (const olc::vf2d &p0, const olc::vf2d &p1, const olc::vf2d &p2, const olc::Pixel col=olc::WHITE)
 
void GradientTriangleDecal (const olc::vf2d &p0, const olc::vf2d &p1, const olc::vf2d &p2, const olc::Pixel c0, const olc::Pixel c1, const olc::Pixel c2)
 
void DrawPolygonDecal (olc::Decal *decal, const std::vector< olc::vf2d > &pos, const std::vector< olc::vf2d > &uv, const olc::Pixel tint=olc::WHITE)
 
void DrawPolygonDecal (olc::Decal *decal, const std::vector< olc::vf2d > &pos, const std::vector< float > &depth, const std::vector< olc::vf2d > &uv, const olc::Pixel tint=olc::WHITE)
 
void DrawPolygonDecal (olc::Decal *decal, const std::vector< olc::vf2d > &pos, const std::vector< olc::vf2d > &uv, const std::vector< olc::Pixel > &tint)
 
void DrawPolygonDecal (olc::Decal *decal, const std::vector< olc::vf2d > &pos, const std::vector< olc::vf2d > &uv, const std::vector< olc::Pixel > &colours, const olc::Pixel tint)
 
void DrawPolygonDecal (olc::Decal *decal, const std::vector< olc::vf2d > &pos, const std::vector< float > &depth, const std::vector< olc::vf2d > &uv, const std::vector< olc::Pixel > &colours, const olc::Pixel tint)
 
void DrawLineDecal (const olc::vf2d &pos1, const olc::vf2d &pos2, Pixel p=olc::WHITE)
 
void DrawRotatedStringDecal (const olc::vf2d &pos, const std::string &sText, const float fAngle, const olc::vf2d &center={ 0.0f, 0.0f }, const olc::Pixel col=olc::WHITE, const olc::vf2d &scale={ 1.0f, 1.0f })
 
void DrawRotatedStringPropDecal (const olc::vf2d &pos, const std::string &sText, const float fAngle, const olc::vf2d &center={ 0.0f, 0.0f }, const olc::Pixel col=olc::WHITE, const olc::vf2d &scale={ 1.0f, 1.0f })
 
void Clear (Pixel p)
 
void ClearBuffer (Pixel p, bool bDepth=true)
 
olc::SpriteGetFontSprite ()
 
bool ClipLineToScreen (olc::vi2d &in_p1, olc::vi2d &in_p2)
 
void EnablePixelTransfer (const bool bEnable=true)
 
void ConsoleShow (const olc::Key &keyExit, bool bSuspendTime=true)
 
bool IsConsoleShowing () const
 
void ConsoleClear ()
 
std::stringstream & ConsoleOut ()
 
void ConsoleCaptureStdOut (const bool bCapture)
 
void TextEntryEnable (const bool bEnable, const std::string &sText="")
 
std::string TextEntryGetString () const
 
int32_t TextEntryGetCursor () const
 
bool IsTextEntryEnabled () const
 
void olc_UpdateMouse (int32_t x, int32_t y)
 
void olc_UpdateMouseWheel (int32_t delta)
 
void olc_UpdateWindowPos (int32_t x, int32_t y)
 
void olc_UpdateWindowSize (int32_t x, int32_t y)
 
void olc_UpdateViewport ()
 
void olc_ConstructFontSheet ()
 
void olc_CoreUpdate ()
 
void olc_PrepareEngine ()
 
void olc_UpdateMouseState (int32_t button, bool state)
 
void olc_UpdateKeyState (int32_t key, bool state)
 
void olc_UpdateMouseFocus (bool state)
 
void olc_UpdateKeyFocus (bool state)
 
void olc_Terminate ()
 
void olc_DropFiles (int32_t x, int32_t y, const std::vector< std::string > &vFiles)
 
void olc_Reanimate ()
 
bool olc_IsRunning ()
 
virtual void olc_ConfigureSystem ()
 
void pgex_Register (olc::PGEX *pgex)
 

Static Public Member Functions

static const std::map< size_t, uint8_t > & GetKeyMap ()
 

Public Attributes

std::string sAppName
 

Friends

class PGEX
 

Constructor & Destructor Documentation

◆ PixelGameEngine()

olc::PixelGameEngine::PixelGameEngine ( )

◆ ~PixelGameEngine()

virtual olc::PixelGameEngine::~PixelGameEngine ( )
virtual

Member Function Documentation

◆ adv_FlushLayer()

void olc::PixelGameEngine::adv_FlushLayer ( const size_t nLayerID)

◆ adv_FlushLayerDecals()

void olc::PixelGameEngine::adv_FlushLayerDecals ( const size_t nLayerID)

◆ adv_HardwareClip()

void olc::PixelGameEngine::adv_HardwareClip ( const bool bScale,
const olc::vi2d & viewPos,
const olc::vi2d & viewSize,
const bool bClear = false )

◆ adv_ManualRenderEnable()

void olc::PixelGameEngine::adv_ManualRenderEnable ( const bool bEnable)

◆ Clear()

void olc::PixelGameEngine::Clear ( Pixel p)

◆ ClearBuffer()

void olc::PixelGameEngine::ClearBuffer ( Pixel p,
bool bDepth = true )

◆ ClipLineToScreen()

bool olc::PixelGameEngine::ClipLineToScreen ( olc::vi2d & in_p1,
olc::vi2d & in_p2 )

◆ ConsoleCaptureStdOut()

void olc::PixelGameEngine::ConsoleCaptureStdOut ( const bool bCapture)

◆ ConsoleClear()

void olc::PixelGameEngine::ConsoleClear ( )

◆ ConsoleOut()

std::stringstream & olc::PixelGameEngine::ConsoleOut ( )

◆ ConsoleShow()

void olc::PixelGameEngine::ConsoleShow ( const olc::Key & keyExit,
bool bSuspendTime = true )

◆ Construct()

olc::rcode olc::PixelGameEngine::Construct ( int32_t screen_w,
int32_t screen_h,
int32_t pixel_w,
int32_t pixel_h,
bool full_screen = false,
bool vsync = false,
bool cohesion = false,
bool realwindow = false )

◆ CreateLayer()

uint32_t olc::PixelGameEngine::CreateLayer ( )

◆ Draw() [1/2]

bool olc::PixelGameEngine::Draw ( const olc::vi2d & pos,
Pixel p = olc::WHITE )

◆ Draw() [2/2]

virtual bool olc::PixelGameEngine::Draw ( int32_t x,
int32_t y,
Pixel p = olc::WHITE )
virtual

◆ DrawCircle() [1/2]

void olc::PixelGameEngine::DrawCircle ( const olc::vi2d & pos,
int32_t radius,
Pixel p = olc::WHITE,
uint8_t mask = 0xFF )

◆ DrawCircle() [2/2]

void olc::PixelGameEngine::DrawCircle ( int32_t x,
int32_t y,
int32_t radius,
Pixel p = olc::WHITE,
uint8_t mask = 0xFF )

◆ DrawDecal()

void olc::PixelGameEngine::DrawDecal ( const olc::vf2d & pos,
olc::Decal * decal,
const olc::vf2d & scale = { 1.0f, 1.0f },
const olc::Pixel & tint = olc::WHITE )

◆ DrawExplicitDecal()

void olc::PixelGameEngine::DrawExplicitDecal ( olc::Decal * decal,
const olc::vf2d * pos,
const olc::vf2d * uv,
const olc::Pixel * col,
uint32_t elements = 4 )

◆ DrawLine() [1/2]

void olc::PixelGameEngine::DrawLine ( const olc::vi2d & pos1,
const olc::vi2d & pos2,
Pixel p = olc::WHITE,
uint32_t pattern = 0xFFFFFFFF )

◆ DrawLine() [2/2]

void olc::PixelGameEngine::DrawLine ( int32_t x1,
int32_t y1,
int32_t x2,
int32_t y2,
Pixel p = olc::WHITE,
uint32_t pattern = 0xFFFFFFFF )

◆ DrawLineDecal()

void olc::PixelGameEngine::DrawLineDecal ( const olc::vf2d & pos1,
const olc::vf2d & pos2,
Pixel p = olc::WHITE )

◆ DrawPartialDecal() [1/2]

void olc::PixelGameEngine::DrawPartialDecal ( const olc::vf2d & pos,
const olc::vf2d & size,
olc::Decal * decal,
const olc::vf2d & source_pos,
const olc::vf2d & source_size,
const olc::Pixel & tint = olc::WHITE )

◆ DrawPartialDecal() [2/2]

void olc::PixelGameEngine::DrawPartialDecal ( const olc::vf2d & pos,
olc::Decal * decal,
const olc::vf2d & source_pos,
const olc::vf2d & source_size,
const olc::vf2d & scale = { 1.0f, 1.0f },
const olc::Pixel & tint = olc::WHITE )

◆ DrawPartialRotatedDecal()

void olc::PixelGameEngine::DrawPartialRotatedDecal ( const olc::vf2d & pos,
olc::Decal * decal,
const float fAngle,
const olc::vf2d & center,
const olc::vf2d & source_pos,
const olc::vf2d & source_size,
const olc::vf2d & scale = { 1.0f, 1.0f },
const olc::Pixel & tint = olc::WHITE )

◆ DrawPartialSprite() [1/2]

void olc::PixelGameEngine::DrawPartialSprite ( const olc::vi2d & pos,
Sprite * sprite,
const olc::vi2d & sourcepos,
const olc::vi2d & size,
uint32_t scale = 1,
uint8_t flip = olc::Sprite::NONE )

◆ DrawPartialSprite() [2/2]

void olc::PixelGameEngine::DrawPartialSprite ( int32_t x,
int32_t y,
Sprite * sprite,
int32_t ox,
int32_t oy,
int32_t w,
int32_t h,
uint32_t scale = 1,
uint8_t flip = olc::Sprite::NONE )

◆ DrawPartialWarpedDecal() [1/3]

void olc::PixelGameEngine::DrawPartialWarpedDecal ( olc::Decal * decal,
const olc::vf2d * pos,
const olc::vf2d & source_pos,
const olc::vf2d & source_size,
const olc::Pixel & tint = olc::WHITE )

◆ DrawPartialWarpedDecal() [2/3]

void olc::PixelGameEngine::DrawPartialWarpedDecal ( olc::Decal * decal,
const olc::vf2d(&) pos[4],
const olc::vf2d & source_pos,
const olc::vf2d & source_size,
const olc::Pixel & tint = olc::WHITE )

◆ DrawPartialWarpedDecal() [3/3]

void olc::PixelGameEngine::DrawPartialWarpedDecal ( olc::Decal * decal,
const std::array< olc::vf2d, 4 > & pos,
const olc::vf2d & source_pos,
const olc::vf2d & source_size,
const olc::Pixel & tint = olc::WHITE )

◆ DrawPolygonDecal() [1/5]

void olc::PixelGameEngine::DrawPolygonDecal ( olc::Decal * decal,
const std::vector< olc::vf2d > & pos,
const std::vector< float > & depth,
const std::vector< olc::vf2d > & uv,
const olc::Pixel tint = olc::WHITE )

◆ DrawPolygonDecal() [2/5]

void olc::PixelGameEngine::DrawPolygonDecal ( olc::Decal * decal,
const std::vector< olc::vf2d > & pos,
const std::vector< float > & depth,
const std::vector< olc::vf2d > & uv,
const std::vector< olc::Pixel > & colours,
const olc::Pixel tint )

◆ DrawPolygonDecal() [3/5]

void olc::PixelGameEngine::DrawPolygonDecal ( olc::Decal * decal,
const std::vector< olc::vf2d > & pos,
const std::vector< olc::vf2d > & uv,
const olc::Pixel tint = olc::WHITE )

◆ DrawPolygonDecal() [4/5]

void olc::PixelGameEngine::DrawPolygonDecal ( olc::Decal * decal,
const std::vector< olc::vf2d > & pos,
const std::vector< olc::vf2d > & uv,
const std::vector< olc::Pixel > & colours,
const olc::Pixel tint )

◆ DrawPolygonDecal() [5/5]

void olc::PixelGameEngine::DrawPolygonDecal ( olc::Decal * decal,
const std::vector< olc::vf2d > & pos,
const std::vector< olc::vf2d > & uv,
const std::vector< olc::Pixel > & tint )

◆ DrawRect() [1/2]

void olc::PixelGameEngine::DrawRect ( const olc::vi2d & pos,
const olc::vi2d & size,
Pixel p = olc::WHITE )

◆ DrawRect() [2/2]

void olc::PixelGameEngine::DrawRect ( int32_t x,
int32_t y,
int32_t w,
int32_t h,
Pixel p = olc::WHITE )

◆ DrawRectDecal()

void olc::PixelGameEngine::DrawRectDecal ( const olc::vf2d & pos,
const olc::vf2d & size,
const olc::Pixel col = olc::WHITE )

◆ DrawRotatedDecal()

void olc::PixelGameEngine::DrawRotatedDecal ( const olc::vf2d & pos,
olc::Decal * decal,
const float fAngle,
const olc::vf2d & center = { 0.0f, 0.0f },
const olc::vf2d & scale = { 1.0f, 1.0f },
const olc::Pixel & tint = olc::WHITE )

◆ DrawRotatedStringDecal()

void olc::PixelGameEngine::DrawRotatedStringDecal ( const olc::vf2d & pos,
const std::string & sText,
const float fAngle,
const olc::vf2d & center = { 0.0f, 0.0f },
const olc::Pixel col = olc::WHITE,
const olc::vf2d & scale = { 1.0f, 1.0f } )

◆ DrawRotatedStringPropDecal()

void olc::PixelGameEngine::DrawRotatedStringPropDecal ( const olc::vf2d & pos,
const std::string & sText,
const float fAngle,
const olc::vf2d & center = { 0.0f, 0.0f },
const olc::Pixel col = olc::WHITE,
const olc::vf2d & scale = { 1.0f, 1.0f } )

◆ DrawSprite() [1/2]

void olc::PixelGameEngine::DrawSprite ( const olc::vi2d & pos,
Sprite * sprite,
uint32_t scale = 1,
uint8_t flip = olc::Sprite::NONE )

◆ DrawSprite() [2/2]

void olc::PixelGameEngine::DrawSprite ( int32_t x,
int32_t y,
Sprite * sprite,
uint32_t scale = 1,
uint8_t flip = olc::Sprite::NONE )

◆ DrawString() [1/2]

void olc::PixelGameEngine::DrawString ( const olc::vi2d & pos,
const std::string & sText,
Pixel col = olc::WHITE,
uint32_t scale = 1 )

◆ DrawString() [2/2]

void olc::PixelGameEngine::DrawString ( int32_t x,
int32_t y,
const std::string & sText,
Pixel col = olc::WHITE,
uint32_t scale = 1 )

◆ DrawStringDecal()

void olc::PixelGameEngine::DrawStringDecal ( const olc::vf2d & pos,
const std::string & sText,
const Pixel col = olc::WHITE,
const olc::vf2d & scale = { 1.0f, 1.0f } )

◆ DrawStringProp() [1/2]

void olc::PixelGameEngine::DrawStringProp ( const olc::vi2d & pos,
const std::string & sText,
Pixel col = olc::WHITE,
uint32_t scale = 1 )

◆ DrawStringProp() [2/2]

void olc::PixelGameEngine::DrawStringProp ( int32_t x,
int32_t y,
const std::string & sText,
Pixel col = olc::WHITE,
uint32_t scale = 1 )

◆ DrawStringPropDecal()

void olc::PixelGameEngine::DrawStringPropDecal ( const olc::vf2d & pos,
const std::string & sText,
const Pixel col = olc::WHITE,
const olc::vf2d & scale = { 1.0f, 1.0f } )

◆ DrawTriangle() [1/2]

void olc::PixelGameEngine::DrawTriangle ( const olc::vi2d & pos1,
const olc::vi2d & pos2,
const olc::vi2d & pos3,
Pixel p = olc::WHITE )

◆ DrawTriangle() [2/2]

void olc::PixelGameEngine::DrawTriangle ( int32_t x1,
int32_t y1,
int32_t x2,
int32_t y2,
int32_t x3,
int32_t y3,
Pixel p = olc::WHITE )

◆ DrawWarpedDecal() [1/3]

void olc::PixelGameEngine::DrawWarpedDecal ( olc::Decal * decal,
const olc::vf2d * pos,
const olc::Pixel & tint = olc::WHITE )

◆ DrawWarpedDecal() [2/3]

void olc::PixelGameEngine::DrawWarpedDecal ( olc::Decal * decal,
const olc::vf2d(&) pos[4],
const olc::Pixel & tint = olc::WHITE )

◆ DrawWarpedDecal() [3/3]

void olc::PixelGameEngine::DrawWarpedDecal ( olc::Decal * decal,
const std::array< olc::vf2d, 4 > & pos,
const olc::Pixel & tint = olc::WHITE )

◆ EnableLayer()

void olc::PixelGameEngine::EnableLayer ( uint8_t layer,
bool b )

◆ EnablePixelTransfer()

void olc::PixelGameEngine::EnablePixelTransfer ( const bool bEnable = true)

◆ FillCircle() [1/2]

void olc::PixelGameEngine::FillCircle ( const olc::vi2d & pos,
int32_t radius,
Pixel p = olc::WHITE )

◆ FillCircle() [2/2]

void olc::PixelGameEngine::FillCircle ( int32_t x,
int32_t y,
int32_t radius,
Pixel p = olc::WHITE )

◆ FillRect() [1/2]

void olc::PixelGameEngine::FillRect ( const olc::vi2d & pos,
const olc::vi2d & size,
Pixel p = olc::WHITE )

◆ FillRect() [2/2]

void olc::PixelGameEngine::FillRect ( int32_t x,
int32_t y,
int32_t w,
int32_t h,
Pixel p = olc::WHITE )

◆ FillRectDecal()

void olc::PixelGameEngine::FillRectDecal ( const olc::vf2d & pos,
const olc::vf2d & size,
const olc::Pixel col = olc::WHITE )

◆ FillTexturedPolygon()

void olc::PixelGameEngine::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 )

◆ FillTexturedTriangle()

void olc::PixelGameEngine::FillTexturedTriangle ( std::vector< olc::vf2d > vPoints,
std::vector< olc::vf2d > vTex,
std::vector< olc::Pixel > vColour,
olc::Sprite * sprTex )

◆ FillTriangle() [1/2]

void olc::PixelGameEngine::FillTriangle ( const olc::vi2d & pos1,
const olc::vi2d & pos2,
const olc::vi2d & pos3,
Pixel p = olc::WHITE )

◆ FillTriangle() [2/2]

void olc::PixelGameEngine::FillTriangle ( int32_t x1,
int32_t y1,
int32_t x2,
int32_t y2,
int32_t x3,
int32_t y3,
Pixel p = olc::WHITE )

◆ FillTriangleDecal()

void olc::PixelGameEngine::FillTriangleDecal ( const olc::vf2d & p0,
const olc::vf2d & p1,
const olc::vf2d & p2,
const olc::Pixel col = olc::WHITE )

◆ GetDrawTarget()

olc::Sprite * olc::PixelGameEngine::GetDrawTarget ( ) const

◆ GetDrawTargetHeight()

int32_t olc::PixelGameEngine::GetDrawTargetHeight ( ) const

◆ GetDrawTargetWidth()

int32_t olc::PixelGameEngine::GetDrawTargetWidth ( ) const

◆ GetDroppedFiles()

const std::vector< std::string > & olc::PixelGameEngine::GetDroppedFiles ( ) const

◆ GetDroppedFilesPoint()

const olc::vi2d & olc::PixelGameEngine::GetDroppedFilesPoint ( ) const

◆ GetElapsedTime()

float olc::PixelGameEngine::GetElapsedTime ( ) const

◆ GetFontSprite()

olc::Sprite * olc::PixelGameEngine::GetFontSprite ( )

◆ GetFPS()

uint32_t olc::PixelGameEngine::GetFPS ( ) const

◆ GetKey()

HWButton olc::PixelGameEngine::GetKey ( Key k) const

◆ GetKeyMap()

static const std::map< size_t, uint8_t > & olc::PixelGameEngine::GetKeyMap ( )
inlinestatic

◆ GetLayers()

std::vector< LayerDesc > & olc::PixelGameEngine::GetLayers ( )

◆ GetMouse()

HWButton olc::PixelGameEngine::GetMouse ( uint32_t b) const

◆ GetMousePos()

const olc::vi2d & olc::PixelGameEngine::GetMousePos ( ) const

◆ GetMouseWheel()

int32_t olc::PixelGameEngine::GetMouseWheel ( ) const

◆ GetMouseX()

int32_t olc::PixelGameEngine::GetMouseX ( ) const

◆ GetMouseY()

int32_t olc::PixelGameEngine::GetMouseY ( ) const

◆ GetPixelMode()

Pixel::Mode olc::PixelGameEngine::GetPixelMode ( )

◆ GetPixelSize()

const olc::vi2d & olc::PixelGameEngine::GetPixelSize ( ) const

◆ GetScreenPixelSize()

const olc::vi2d & olc::PixelGameEngine::GetScreenPixelSize ( ) const

◆ GetScreenSize()

const olc::vi2d & olc::PixelGameEngine::GetScreenSize ( ) const

◆ GetTextSize()

olc::vi2d olc::PixelGameEngine::GetTextSize ( const std::string & s)

◆ GetTextSizeProp()

olc::vi2d olc::PixelGameEngine::GetTextSizeProp ( const std::string & s)

◆ GetWindowMouse()

const olc::vi2d & olc::PixelGameEngine::GetWindowMouse ( ) const

◆ GetWindowPos()

const olc::vi2d & olc::PixelGameEngine::GetWindowPos ( ) const

◆ GetWindowSize()

const olc::vi2d & olc::PixelGameEngine::GetWindowSize ( ) const

◆ GradientFillRectDecal()

void olc::PixelGameEngine::GradientFillRectDecal ( const olc::vf2d & pos,
const olc::vf2d & size,
const olc::Pixel colTL,
const olc::Pixel colBL,
const olc::Pixel colBR,
const olc::Pixel colTR )

◆ GradientTriangleDecal()

void olc::PixelGameEngine::GradientTriangleDecal ( const olc::vf2d & p0,
const olc::vf2d & p1,
const olc::vf2d & p2,
const olc::Pixel c0,
const olc::Pixel c1,
const olc::Pixel c2 )

◆ IsConsoleShowing()

bool olc::PixelGameEngine::IsConsoleShowing ( ) const

◆ IsFocused()

bool olc::PixelGameEngine::IsFocused ( ) const

◆ IsTextEntryEnabled()

bool olc::PixelGameEngine::IsTextEntryEnabled ( ) const

◆ olc_ConfigureSystem()

virtual void olc::PixelGameEngine::olc_ConfigureSystem ( )
virtual

◆ olc_ConstructFontSheet()

void olc::PixelGameEngine::olc_ConstructFontSheet ( )

◆ olc_CoreUpdate()

void olc::PixelGameEngine::olc_CoreUpdate ( )

◆ olc_DropFiles()

void olc::PixelGameEngine::olc_DropFiles ( int32_t x,
int32_t y,
const std::vector< std::string > & vFiles )

◆ olc_IsRunning()

bool olc::PixelGameEngine::olc_IsRunning ( )

◆ olc_PrepareEngine()

void olc::PixelGameEngine::olc_PrepareEngine ( )

◆ olc_Reanimate()

void olc::PixelGameEngine::olc_Reanimate ( )

◆ olc_Terminate()

void olc::PixelGameEngine::olc_Terminate ( )

◆ olc_UpdateKeyFocus()

void olc::PixelGameEngine::olc_UpdateKeyFocus ( bool state)

◆ olc_UpdateKeyState()

void olc::PixelGameEngine::olc_UpdateKeyState ( int32_t key,
bool state )

◆ olc_UpdateMouse()

void olc::PixelGameEngine::olc_UpdateMouse ( int32_t x,
int32_t y )

◆ olc_UpdateMouseFocus()

void olc::PixelGameEngine::olc_UpdateMouseFocus ( bool state)

◆ olc_UpdateMouseState()

void olc::PixelGameEngine::olc_UpdateMouseState ( int32_t button,
bool state )

◆ olc_UpdateMouseWheel()

void olc::PixelGameEngine::olc_UpdateMouseWheel ( int32_t delta)

◆ olc_UpdateViewport()

void olc::PixelGameEngine::olc_UpdateViewport ( )

◆ olc_UpdateWindowPos()

void olc::PixelGameEngine::olc_UpdateWindowPos ( int32_t x,
int32_t y )

◆ olc_UpdateWindowSize()

void olc::PixelGameEngine::olc_UpdateWindowSize ( int32_t x,
int32_t y )

◆ OnConsoleCommand()

virtual bool olc::PixelGameEngine::OnConsoleCommand ( const std::string & sCommand)
virtual

◆ OnTextEntryComplete()

virtual void olc::PixelGameEngine::OnTextEntryComplete ( const std::string & sText)
virtual

◆ OnUserCreate()

virtual bool olc::PixelGameEngine::OnUserCreate ( )
virtual

◆ OnUserDestroy()

virtual bool olc::PixelGameEngine::OnUserDestroy ( )
virtual

◆ OnUserUpdate()

virtual bool olc::PixelGameEngine::OnUserUpdate ( float fElapsedTime)
virtual

◆ pgex_Register()

void olc::PixelGameEngine::pgex_Register ( olc::PGEX * pgex)

◆ ScreenHeight()

int32_t olc::PixelGameEngine::ScreenHeight ( ) const

◆ ScreenWidth()

int32_t olc::PixelGameEngine::ScreenWidth ( ) const

◆ SetDecalMode()

void olc::PixelGameEngine::SetDecalMode ( const olc::DecalMode & mode)

◆ SetDecalStructure()

void olc::PixelGameEngine::SetDecalStructure ( const olc::DecalStructure & structure)

◆ SetDrawTarget() [1/2]

void olc::PixelGameEngine::SetDrawTarget ( Sprite * target)

◆ SetDrawTarget() [2/2]

void olc::PixelGameEngine::SetDrawTarget ( uint8_t layer,
bool bDirty = true )

◆ SetLayerCustomRenderFunction()

void olc::PixelGameEngine::SetLayerCustomRenderFunction ( uint8_t layer,
std::function< void()> f )

◆ SetLayerOffset() [1/2]

void olc::PixelGameEngine::SetLayerOffset ( uint8_t layer,
const olc::vf2d & offset )

◆ SetLayerOffset() [2/2]

void olc::PixelGameEngine::SetLayerOffset ( uint8_t layer,
float x,
float y )

◆ SetLayerScale() [1/2]

void olc::PixelGameEngine::SetLayerScale ( uint8_t layer,
const olc::vf2d & scale )

◆ SetLayerScale() [2/2]

void olc::PixelGameEngine::SetLayerScale ( uint8_t layer,
float x,
float y )

◆ SetLayerTint()

void olc::PixelGameEngine::SetLayerTint ( uint8_t layer,
const olc::Pixel & tint )

◆ SetPixelBlend()

void olc::PixelGameEngine::SetPixelBlend ( float fBlend)

◆ SetPixelMode() [1/2]

void olc::PixelGameEngine::SetPixelMode ( Pixel::Mode m)

◆ SetPixelMode() [2/2]

void olc::PixelGameEngine::SetPixelMode ( std::function< olc::Pixel(const int x, const int y, const olc::Pixel &pSource, const olc::Pixel &pDest)> pixelMode)

◆ SetScreenSize()

void olc::PixelGameEngine::SetScreenSize ( int w,
int h )

◆ SetWindowSize()

olc::rcode olc::PixelGameEngine::SetWindowSize ( const olc::vi2d & vPos,
const olc::vi2d & vSize )

◆ ShowWindowFrame()

olc::rcode olc::PixelGameEngine::ShowWindowFrame ( const bool bShowFrame)

◆ Start()

olc::rcode olc::PixelGameEngine::Start ( )

◆ TextEntryEnable()

void olc::PixelGameEngine::TextEntryEnable ( const bool bEnable,
const std::string & sText = "" )

◆ TextEntryGetCursor()

int32_t olc::PixelGameEngine::TextEntryGetCursor ( ) const

◆ TextEntryGetString()

std::string olc::PixelGameEngine::TextEntryGetString ( ) const

Friends And Related Symbol Documentation

◆ PGEX

friend class PGEX
friend

Member Data Documentation

◆ sAppName

std::string olc::PixelGameEngine::sAppName

The documentation for this class was generated from the following file: