#include "map_helper.h" #include "log.h" namespace Util { void SpriteCreationArea::setRects(const SDL_Rect & allowed, const SDL_Rect & denied) { validRects = std::make_pair(allowed, denied); } TupleOfUint8 SpriteCreationArea::getValidCoord() { uint32_t x = rnd.nextUint(validRects.first.w) + validRects.first.x; uint32_t y = rnd.nextUint(validRects.first.h) + validRects.first.y; return std::make_pair(x, y); } }