Mercurial > might-and-magic-trilogy
diff Random.h @ 0:8b8875f5b359
Initial commit
author | Nomad |
---|---|
date | Fri, 05 Oct 2012 16:07:14 +0200 |
parents | |
children |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Random.h Fri Oct 05 16:07:14 2012 +0200 @@ -0,0 +1,31 @@ +#pragma once + + +/* 304 */ +#pragma pack(push, 1) +struct Random +{ + //----- (004BE365) -------------------------------------------------------- + inline Random() + { + Initialize(0x5CCE1E47u); + min = 0; + range = 99; + } + + + void SetRange(int min, int max); + double GetRandom(); + int GetInRange(); + void Initialize(int seed); + + double field_0[5]; + int min; + int range; +}; +#pragma pack(pop) + + + + +extern struct Random *pRnd; // idb \ No newline at end of file