Conversation
Added blending at pixel level - alphas could be mixed up but we'll see
…arning-for-macos-xcode 239-remove-complier-clang-warning-for-macos-xcode
Revert TotalTimeElapsed usage in extension example
Owner
|
I know its been a while, but this PR is a mess probably because its against main and not develop :P |
Collaborator
Author
|
Oh shoot , sorry meant for it to go into develop, I ll do it again correctly |
Collaborator
Author
|
Closing, will create a new PR to for this as it is pointing to main not develop |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Added a closest method for rect to circle in order to support collisions.
// closest(r,c)
// Returns closest point on rectangle to circle
template<typename T1, typename T2>
inline olc::v_2d closest(const rect& r, const circle& l)
{
// Johnnyg63
const auto pX = std::clamp(l.pos.x, r.pos.x, r.pos.x + r.size.x);
const auto pY = std::clamp(l.pos.y, r.pos.y, r.pos.y + r.size.y);
return { pX, pY };
}