aboutsummaryrefslogtreecommitdiff
path: root/common/util.h
diff options
context:
space:
mode:
Diffstat (limited to 'common/util.h')
-rw-r--r--common/util.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/common/util.h b/common/util.h
index 37576bd8af..a5e13c0e4f 100644
--- a/common/util.h
+++ b/common/util.h
@@ -72,4 +72,16 @@ void hexdump(const byte * data, int len);
// Resource string length
int resStrLen(const char *src);
+
+class RandomSource {
+private:
+ uint32 _randSeed;
+
+public:
+ RandomSource(uint32 seed = 0xA943DE33);
+ void setSeed(uint32 seed);
+ uint getRandomNumber(uint max);
+ uint getRandomNumberRng(uint min, uint max);
+};
+
#endif