Turn obj.collect and obj.customcollect into plain arrays

Since they're always fixed-size, there's no need for them to be vectors.

Also added an INBOUNDS_ARR() macro to do bounds checks with plain
arrays.
This commit is contained in:
Misa
2020-07-02 19:17:32 -07:00
committed by Ethan Lee
parent 62203efb2c
commit 0664eac7fc
5 changed files with 28 additions and 77 deletions

View File

@@ -16,6 +16,7 @@ bool is_positive_num(const std::string& str, bool hex);
bool endsWith(const std::string& str, const std::string& suffix);
#define INBOUNDS(index, vector) ((int) index >= 0 && (int) index < (int) vector.size())
#define INBOUNDS_ARR(index, array) ((int) index >= 0 && (int) index < (int) SDL_arraysize(array))
#define WHINE_ONCE(message) \
static bool whine = true; \