aboutsummaryrefslogtreecommitdiff
path: root/engines/lab/utils.cpp
diff options
context:
space:
mode:
authorStrangerke2015-12-09 11:22:41 +0100
committerWillem Jan Palenstijn2015-12-23 21:33:59 +0100
commit199fa254f9be4d7cb4395b871755557024926b9d (patch)
tree41d3c707d12e7f32f57a377a53b1ddc000c9a438 /engines/lab/utils.cpp
parent0af299d3c78d59de20fe5ad41169f755fda297f4 (diff)
downloadscummvm-rg350-199fa254f9be4d7cb4395b871755557024926b9d.tar.gz
scummvm-rg350-199fa254f9be4d7cb4395b871755557024926b9d.tar.bz2
scummvm-rg350-199fa254f9be4d7cb4395b871755557024926b9d.zip
LAB: Rename CloseDataPtr pointers, some refactoring
Diffstat (limited to 'engines/lab/utils.cpp')
-rw-r--r--engines/lab/utils.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/engines/lab/utils.cpp b/engines/lab/utils.cpp
index b552a40675..c7f19cf5ff 100644
--- a/engines/lab/utils.cpp
+++ b/engines/lab/utils.cpp
@@ -411,4 +411,14 @@ void Utils::unDiff(byte *newBuf, byte *oldBuf, byte *diffData, uint16 bytesPerRo
void Utils::setBytesPerRow(int num) {
_dataBytesPerRow = num;
}
+
+/**
+ * Generates a random number.
+ */
+uint16 Utils::getRandom(uint16 max) {
+ uint32 secs, micros;
+
+ g_lab->getTime(&secs, &micros);
+ return ((micros + secs) % max);
+}
} // End of namespace Lab