GUECS: Minimal components from zedcaster that will let me make a GUI for a game.
This commit is contained in:
parent
10ecf50bc0
commit
1be770d62d
28 changed files with 2528 additions and 30 deletions
20
point.hpp
Normal file
20
point.hpp
Normal file
|
@ -0,0 +1,20 @@
|
|||
#pragma once
|
||||
#include <vector>
|
||||
|
||||
struct Point {
|
||||
size_t x = 0;
|
||||
size_t y = 0;
|
||||
|
||||
bool operator==(const Point& other) const {
|
||||
return other.x == x && other.y == y;
|
||||
}
|
||||
};
|
||||
|
||||
typedef std::vector<Point> PointList;
|
||||
|
||||
template<> struct std::hash<Point> {
|
||||
size_t operator()(const Point& p) const {
|
||||
auto hasher = std::hash<int>();
|
||||
return hasher(p.x) ^ hasher(p.y);
|
||||
}
|
||||
};
|
Loading…
Add table
Add a link
Reference in a new issue