Created
June 16, 2020 01:28
-
-
Save matjam/861fdfb70aa6a42dcc3c3c86714bd266 to your computer and use it in GitHub Desktop.
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
struct Quad { | |
sf::Vertex &a; | |
sf::Vertex &b; | |
sf::Vertex &c; | |
sf::Vertex &d; | |
}; | |
inline Quad & | |
getQuadForScreenLocation(sf::Vector2i location) | |
{ | |
return Quad | |
{ | |
m_console_bg_vertices[(x + y * m_width) * 4], | |
m_console_bg_vertices[(x + y * m_width) * 4 + 1], | |
m_console_bg_vertices[(x + y * m_width) * 4 + 2], | |
m_console_bg_vertices[(x + y * m_width) * 4 + 3] | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment