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:
12
hyper.h
12
hyper.h
@@ -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; }
|
||||
|
Reference in New Issue
Block a user