Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

3 small additions (Win32 and generic) #359

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion olcPixelGameEngine.h
Original file line number Diff line number Diff line change
Expand Up @@ -526,6 +526,7 @@ int main()

#include <windows.h>
#undef _WINSOCKAPI_
#include <shellapi.h>
#endif

#if defined(OLC_PLATFORM_X11)
Expand Down Expand Up @@ -690,6 +691,7 @@ namespace olc
v2d_generic lerp(const v2d_generic& v1, const double t) { return this->operator*(T(1.0 - t)) + (v1 * T(t)); }
T dot(const v2d_generic& rhs) const { return this->x * rhs.x + this->y * rhs.y; }
T cross(const v2d_generic& rhs) const { return this->x * rhs.y - this->y * rhs.x; }
T dist(const v2d_generic& rhs) const { return T(std::sqrt((this->x - rhs.x) * (this->x - rhs.x) + (this->y - rhs.y) * (this->y - rhs.y))); }
v2d_generic operator + (const v2d_generic& rhs) const { return v2d_generic(this->x + rhs.x, this->y + rhs.y); }
v2d_generic operator - (const v2d_generic& rhs) const { return v2d_generic(this->x - rhs.x, this->y - rhs.y); }
v2d_generic operator * (const T& rhs) const { return v2d_generic(this->x * rhs, this->y * rhs); }
Expand Down Expand Up @@ -3896,7 +3898,7 @@ namespace olc

// Display Frame
renderer->UpdateViewport(vViewPos, vViewSize);
renderer->ClearBuffer(olc::BLACK, true);
//renderer->ClearBuffer(olc::BLACK, true);

// Layer 0 must always exist
vLayers[0].bUpdate = true;
Expand Down