1
0
mirror of https://github.com/zenorogue/hyperrogue.git synced 2025-10-22 17:37:39 +00:00

removed the MAX_EDGE limitation

This commit is contained in:
Zeno Rogue
2020-01-18 16:59:16 +01:00
parent 2271a67506
commit 6f89d2176f
3 changed files with 30 additions and 19 deletions

12
hyper.h
View File

@@ -339,7 +339,7 @@ extern videopar vid;
#define self (*this)
#define MODFIXER (2*10090080*17)
// #define MODFIXER (2*10090080*17)
#define BUGCOLORS 3
@@ -370,6 +370,16 @@ extern videopar vid;
// size casted to int, to prevent warnings and actual errors caused by the unsignedness of x.size()
template<class T> int isize(const T& x) {return x.size(); }
// automatically growing vector
template<class T> struct grow_vector : public vector<T> {
T& grow(size_t index) {
if(index >= this->size()) {
this->resize(index + 1);
}
return (vector<T>::operator[]) (index);
}
};
// game forward declarations
namespace anticheat { extern bool tampered; }