![]() |
olcPixelGameEngine v2.28
The official distribution of olcPixelGameEngine, a tool used in javidx9's YouTube videos and projects
|
#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::vi2d & | GetWindowMouse () const |
const olc::vi2d & | GetMousePos () 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::Sprite * | GetDrawTarget () const |
void | SetScreenSize (int w, int h) |
void | SetDrawTarget (Sprite *target) |
uint32_t | GetFPS () const |
float | GetElapsedTime () const |
const olc::vi2d & | GetWindowSize () const |
const olc::vi2d & | GetWindowPos () const |
const olc::vi2d & | GetPixelSize () const |
const olc::vi2d & | GetScreenPixelSize () const |
const olc::vi2d & | GetScreenSize () const |
const std::vector< std::string > & | GetDroppedFiles () const |
const olc::vi2d & | GetDroppedFilesPoint () 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 ¢er={ 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 ¢er, 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 ¢er={ 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 ¢er={ 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::Sprite * | GetFontSprite () |
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 |
olc::PixelGameEngine::PixelGameEngine | ( | ) |
|
virtual |
void olc::PixelGameEngine::adv_FlushLayer | ( | const size_t | nLayerID | ) |
void olc::PixelGameEngine::adv_FlushLayerDecals | ( | const size_t | nLayerID | ) |
void olc::PixelGameEngine::adv_HardwareClip | ( | const bool | bScale, |
const olc::vi2d & | viewPos, | ||
const olc::vi2d & | viewSize, | ||
const bool | bClear = false ) |
void olc::PixelGameEngine::adv_ManualRenderEnable | ( | const bool | bEnable | ) |
void olc::PixelGameEngine::Clear | ( | Pixel | p | ) |
void olc::PixelGameEngine::ClearBuffer | ( | Pixel | p, |
bool | bDepth = true ) |
void olc::PixelGameEngine::ConsoleCaptureStdOut | ( | const bool | bCapture | ) |
void olc::PixelGameEngine::ConsoleClear | ( | ) |
std::stringstream & olc::PixelGameEngine::ConsoleOut | ( | ) |
void olc::PixelGameEngine::ConsoleShow | ( | const olc::Key & | keyExit, |
bool | bSuspendTime = true ) |
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 ) |
uint32_t olc::PixelGameEngine::CreateLayer | ( | ) |
bool olc::PixelGameEngine::Draw | ( | const olc::vi2d & | pos, |
Pixel | p = olc::WHITE ) |
|
virtual |
void olc::PixelGameEngine::DrawCircle | ( | const olc::vi2d & | pos, |
int32_t | radius, | ||
Pixel | p = olc::WHITE, | ||
uint8_t | mask = 0xFF ) |
void olc::PixelGameEngine::DrawCircle | ( | int32_t | x, |
int32_t | y, | ||
int32_t | radius, | ||
Pixel | p = olc::WHITE, | ||
uint8_t | mask = 0xFF ) |
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 ) |
void olc::PixelGameEngine::DrawExplicitDecal | ( | olc::Decal * | decal, |
const olc::vf2d * | pos, | ||
const olc::vf2d * | uv, | ||
const olc::Pixel * | col, | ||
uint32_t | elements = 4 ) |
void olc::PixelGameEngine::DrawLine | ( | const olc::vi2d & | pos1, |
const olc::vi2d & | pos2, | ||
Pixel | p = olc::WHITE, | ||
uint32_t | pattern = 0xFFFFFFFF ) |
void olc::PixelGameEngine::DrawLine | ( | int32_t | x1, |
int32_t | y1, | ||
int32_t | x2, | ||
int32_t | y2, | ||
Pixel | p = olc::WHITE, | ||
uint32_t | pattern = 0xFFFFFFFF ) |
void olc::PixelGameEngine::DrawLineDecal | ( | const olc::vf2d & | pos1, |
const olc::vf2d & | pos2, | ||
Pixel | p = olc::WHITE ) |
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 ) |
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 ) |
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 ) |
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 ) |
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 ) |
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 ) |
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 ) |
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 ) |
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 ) |
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 ) |
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 ) |
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 ) |
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 ) |
void olc::PixelGameEngine::DrawRect | ( | const olc::vi2d & | pos, |
const olc::vi2d & | size, | ||
Pixel | p = olc::WHITE ) |
void olc::PixelGameEngine::DrawRect | ( | int32_t | x, |
int32_t | y, | ||
int32_t | w, | ||
int32_t | h, | ||
Pixel | p = olc::WHITE ) |
void olc::PixelGameEngine::DrawRectDecal | ( | const olc::vf2d & | pos, |
const olc::vf2d & | size, | ||
const olc::Pixel | col = olc::WHITE ) |
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 ) |
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 } ) |
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 } ) |
void olc::PixelGameEngine::DrawSprite | ( | const olc::vi2d & | pos, |
Sprite * | sprite, | ||
uint32_t | scale = 1, | ||
uint8_t | flip = olc::Sprite::NONE ) |
void olc::PixelGameEngine::DrawSprite | ( | int32_t | x, |
int32_t | y, | ||
Sprite * | sprite, | ||
uint32_t | scale = 1, | ||
uint8_t | flip = olc::Sprite::NONE ) |
void olc::PixelGameEngine::DrawString | ( | const olc::vi2d & | pos, |
const std::string & | sText, | ||
Pixel | col = olc::WHITE, | ||
uint32_t | scale = 1 ) |
void olc::PixelGameEngine::DrawString | ( | int32_t | x, |
int32_t | y, | ||
const std::string & | sText, | ||
Pixel | col = olc::WHITE, | ||
uint32_t | scale = 1 ) |
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 } ) |
void olc::PixelGameEngine::DrawStringProp | ( | const olc::vi2d & | pos, |
const std::string & | sText, | ||
Pixel | col = olc::WHITE, | ||
uint32_t | scale = 1 ) |
void olc::PixelGameEngine::DrawStringProp | ( | int32_t | x, |
int32_t | y, | ||
const std::string & | sText, | ||
Pixel | col = olc::WHITE, | ||
uint32_t | scale = 1 ) |
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 } ) |
void olc::PixelGameEngine::DrawTriangle | ( | const olc::vi2d & | pos1, |
const olc::vi2d & | pos2, | ||
const olc::vi2d & | pos3, | ||
Pixel | p = olc::WHITE ) |
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 ) |
void olc::PixelGameEngine::DrawWarpedDecal | ( | olc::Decal * | decal, |
const olc::vf2d * | pos, | ||
const olc::Pixel & | tint = olc::WHITE ) |
void olc::PixelGameEngine::DrawWarpedDecal | ( | olc::Decal * | decal, |
const olc::vf2d(&) | pos[4], | ||
const olc::Pixel & | tint = olc::WHITE ) |
void olc::PixelGameEngine::DrawWarpedDecal | ( | olc::Decal * | decal, |
const std::array< olc::vf2d, 4 > & | pos, | ||
const olc::Pixel & | tint = olc::WHITE ) |
void olc::PixelGameEngine::EnableLayer | ( | uint8_t | layer, |
bool | b ) |
void olc::PixelGameEngine::EnablePixelTransfer | ( | const bool | bEnable = true | ) |
void olc::PixelGameEngine::FillCircle | ( | const olc::vi2d & | pos, |
int32_t | radius, | ||
Pixel | p = olc::WHITE ) |
void olc::PixelGameEngine::FillCircle | ( | int32_t | x, |
int32_t | y, | ||
int32_t | radius, | ||
Pixel | p = olc::WHITE ) |
void olc::PixelGameEngine::FillRect | ( | const olc::vi2d & | pos, |
const olc::vi2d & | size, | ||
Pixel | p = olc::WHITE ) |
void olc::PixelGameEngine::FillRect | ( | int32_t | x, |
int32_t | y, | ||
int32_t | w, | ||
int32_t | h, | ||
Pixel | p = olc::WHITE ) |
void olc::PixelGameEngine::FillRectDecal | ( | const olc::vf2d & | pos, |
const olc::vf2d & | size, | ||
const olc::Pixel | col = olc::WHITE ) |
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 ) |
void olc::PixelGameEngine::FillTexturedTriangle | ( | std::vector< olc::vf2d > | vPoints, |
std::vector< olc::vf2d > | vTex, | ||
std::vector< olc::Pixel > | vColour, | ||
olc::Sprite * | sprTex ) |
void olc::PixelGameEngine::FillTriangle | ( | const olc::vi2d & | pos1, |
const olc::vi2d & | pos2, | ||
const olc::vi2d & | pos3, | ||
Pixel | p = olc::WHITE ) |
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 ) |
void olc::PixelGameEngine::FillTriangleDecal | ( | const olc::vf2d & | p0, |
const olc::vf2d & | p1, | ||
const olc::vf2d & | p2, | ||
const olc::Pixel | col = olc::WHITE ) |
olc::Sprite * olc::PixelGameEngine::GetDrawTarget | ( | ) | const |
int32_t olc::PixelGameEngine::GetDrawTargetHeight | ( | ) | const |
int32_t olc::PixelGameEngine::GetDrawTargetWidth | ( | ) | const |
const std::vector< std::string > & olc::PixelGameEngine::GetDroppedFiles | ( | ) | const |
const olc::vi2d & olc::PixelGameEngine::GetDroppedFilesPoint | ( | ) | const |
float olc::PixelGameEngine::GetElapsedTime | ( | ) | const |
olc::Sprite * olc::PixelGameEngine::GetFontSprite | ( | ) |
uint32_t olc::PixelGameEngine::GetFPS | ( | ) | const |
|
inlinestatic |
std::vector< LayerDesc > & olc::PixelGameEngine::GetLayers | ( | ) |
HWButton olc::PixelGameEngine::GetMouse | ( | uint32_t | b | ) | const |
const olc::vi2d & olc::PixelGameEngine::GetMousePos | ( | ) | const |
int32_t olc::PixelGameEngine::GetMouseWheel | ( | ) | const |
int32_t olc::PixelGameEngine::GetMouseX | ( | ) | const |
int32_t olc::PixelGameEngine::GetMouseY | ( | ) | const |
Pixel::Mode olc::PixelGameEngine::GetPixelMode | ( | ) |
const olc::vi2d & olc::PixelGameEngine::GetPixelSize | ( | ) | const |
const olc::vi2d & olc::PixelGameEngine::GetScreenPixelSize | ( | ) | const |
const olc::vi2d & olc::PixelGameEngine::GetScreenSize | ( | ) | const |
olc::vi2d olc::PixelGameEngine::GetTextSize | ( | const std::string & | s | ) |
olc::vi2d olc::PixelGameEngine::GetTextSizeProp | ( | const std::string & | s | ) |
const olc::vi2d & olc::PixelGameEngine::GetWindowMouse | ( | ) | const |
const olc::vi2d & olc::PixelGameEngine::GetWindowPos | ( | ) | const |
const olc::vi2d & olc::PixelGameEngine::GetWindowSize | ( | ) | const |
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 ) |
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 ) |
bool olc::PixelGameEngine::IsConsoleShowing | ( | ) | const |
bool olc::PixelGameEngine::IsFocused | ( | ) | const |
bool olc::PixelGameEngine::IsTextEntryEnabled | ( | ) | const |
|
virtual |
void olc::PixelGameEngine::olc_ConstructFontSheet | ( | ) |
void olc::PixelGameEngine::olc_CoreUpdate | ( | ) |
void olc::PixelGameEngine::olc_DropFiles | ( | int32_t | x, |
int32_t | y, | ||
const std::vector< std::string > & | vFiles ) |
bool olc::PixelGameEngine::olc_IsRunning | ( | ) |
void olc::PixelGameEngine::olc_PrepareEngine | ( | ) |
void olc::PixelGameEngine::olc_Reanimate | ( | ) |
void olc::PixelGameEngine::olc_Terminate | ( | ) |
void olc::PixelGameEngine::olc_UpdateKeyFocus | ( | bool | state | ) |
void olc::PixelGameEngine::olc_UpdateKeyState | ( | int32_t | key, |
bool | state ) |
void olc::PixelGameEngine::olc_UpdateMouse | ( | int32_t | x, |
int32_t | y ) |
void olc::PixelGameEngine::olc_UpdateMouseFocus | ( | bool | state | ) |
void olc::PixelGameEngine::olc_UpdateMouseState | ( | int32_t | button, |
bool | state ) |
void olc::PixelGameEngine::olc_UpdateMouseWheel | ( | int32_t | delta | ) |
void olc::PixelGameEngine::olc_UpdateViewport | ( | ) |
void olc::PixelGameEngine::olc_UpdateWindowPos | ( | int32_t | x, |
int32_t | y ) |
void olc::PixelGameEngine::olc_UpdateWindowSize | ( | int32_t | x, |
int32_t | y ) |
|
virtual |
|
virtual |
|
virtual |
|
virtual |
|
virtual |
void olc::PixelGameEngine::pgex_Register | ( | olc::PGEX * | pgex | ) |
int32_t olc::PixelGameEngine::ScreenHeight | ( | ) | const |
int32_t olc::PixelGameEngine::ScreenWidth | ( | ) | const |
void olc::PixelGameEngine::SetDecalMode | ( | const olc::DecalMode & | mode | ) |
void olc::PixelGameEngine::SetDecalStructure | ( | const olc::DecalStructure & | structure | ) |
void olc::PixelGameEngine::SetDrawTarget | ( | Sprite * | target | ) |
void olc::PixelGameEngine::SetDrawTarget | ( | uint8_t | layer, |
bool | bDirty = true ) |
void olc::PixelGameEngine::SetLayerCustomRenderFunction | ( | uint8_t | layer, |
std::function< void()> | f ) |
void olc::PixelGameEngine::SetLayerOffset | ( | uint8_t | layer, |
const olc::vf2d & | offset ) |
void olc::PixelGameEngine::SetLayerOffset | ( | uint8_t | layer, |
float | x, | ||
float | y ) |
void olc::PixelGameEngine::SetLayerScale | ( | uint8_t | layer, |
const olc::vf2d & | scale ) |
void olc::PixelGameEngine::SetLayerScale | ( | uint8_t | layer, |
float | x, | ||
float | y ) |
void olc::PixelGameEngine::SetLayerTint | ( | uint8_t | layer, |
const olc::Pixel & | tint ) |
void olc::PixelGameEngine::SetPixelBlend | ( | float | fBlend | ) |
void olc::PixelGameEngine::SetPixelMode | ( | Pixel::Mode | m | ) |
void olc::PixelGameEngine::SetPixelMode | ( | std::function< olc::Pixel(const int x, const int y, const olc::Pixel &pSource, const olc::Pixel &pDest)> | pixelMode | ) |
void olc::PixelGameEngine::SetScreenSize | ( | int | w, |
int | h ) |
olc::rcode olc::PixelGameEngine::SetWindowSize | ( | const olc::vi2d & | vPos, |
const olc::vi2d & | vSize ) |
olc::rcode olc::PixelGameEngine::ShowWindowFrame | ( | const bool | bShowFrame | ) |
olc::rcode olc::PixelGameEngine::Start | ( | ) |
void olc::PixelGameEngine::TextEntryEnable | ( | const bool | bEnable, |
const std::string & | sText = "" ) |
int32_t olc::PixelGameEngine::TextEntryGetCursor | ( | ) | const |
std::string olc::PixelGameEngine::TextEntryGetString | ( | ) | const |
|
friend |
std::string olc::PixelGameEngine::sAppName |