aboutsummaryrefslogtreecommitdiff
path: root/engines/agi
diff options
context:
space:
mode:
Diffstat (limited to 'engines/agi')
-rw-r--r--engines/agi/agi.cpp1
-rw-r--r--engines/agi/agi.h2
-rw-r--r--engines/agi/motion.cpp1
-rw-r--r--engines/agi/op_cmd.cpp2
-rw-r--r--engines/agi/preagi.cpp5
-rw-r--r--engines/agi/preagi.h2
-rw-r--r--engines/agi/sound.cpp1
7 files changed, 13 insertions, 1 deletions
diff --git a/engines/agi/agi.cpp b/engines/agi/agi.cpp
index c66ccd4751..c7b45871b7 100644
--- a/engines/agi/agi.cpp
+++ b/engines/agi/agi.cpp
@@ -29,6 +29,7 @@
#include "common/file.h"
#include "common/savefile.h"
#include "common/config-manager.h"
+#include "common/random.h"
#include "base/plugins.h"
#include "base/version.h"
diff --git a/engines/agi/agi.h b/engines/agi/agi.h
index 48eb6b8693..fb9e204101 100644
--- a/engines/agi/agi.h
+++ b/engines/agi/agi.h
@@ -37,6 +37,8 @@
#include "gui/debugger.h"
+namespace Common { class RandomSource; }
+
/**
* This is the namespace of the AGI engine.
*
diff --git a/engines/agi/motion.cpp b/engines/agi/motion.cpp
index 214ebccddd..7498aafb5d 100644
--- a/engines/agi/motion.cpp
+++ b/engines/agi/motion.cpp
@@ -24,6 +24,7 @@
*/
#include "agi/agi.h"
+#include "common/random.h"
namespace Agi {
diff --git a/engines/agi/op_cmd.cpp b/engines/agi/op_cmd.cpp
index c5ef4abc0f..d7e3ba416c 100644
--- a/engines/agi/op_cmd.cpp
+++ b/engines/agi/op_cmd.cpp
@@ -31,6 +31,8 @@
#include "agi/opcodes.h"
#include "agi/menu.h"
+#include "common/random.h"
+
namespace Agi {
#define p0 (p[0])
diff --git a/engines/agi/preagi.cpp b/engines/agi/preagi.cpp
index 67583d9def..f92d5e8aa0 100644
--- a/engines/agi/preagi.cpp
+++ b/engines/agi/preagi.cpp
@@ -24,6 +24,7 @@
*/
#include "common/config-manager.h"
+#include "common/random.h"
#include "sound/mididrv.h"
@@ -183,4 +184,8 @@ Common::Error PreAgiEngine::go() {
return Common::kNoError;
}
+int PreAgiEngine::rnd(int hi) {
+ return (_rnd->getRandomNumber(hi - 1) + 1);
+}
+
} // End of namespace Agi
diff --git a/engines/agi/preagi.h b/engines/agi/preagi.h
index 0fe0064e76..45b50f2eed 100644
--- a/engines/agi/preagi.h
+++ b/engines/agi/preagi.h
@@ -77,7 +77,7 @@ public:
// Keyboard
int getSelection(SelectionTypes type);
- int rnd(int hi) { return (_rnd->getRandomNumber(hi - 1) + 1); }
+ int rnd(int hi);
// Text
void drawStr(int row, int col, int attr, const char *buffer);
diff --git a/engines/agi/sound.cpp b/engines/agi/sound.cpp
index 35360eebc4..760dfd3320 100644
--- a/engines/agi/sound.cpp
+++ b/engines/agi/sound.cpp
@@ -25,6 +25,7 @@
#include "common/md5.h"
#include "common/config-manager.h"
+#include "common/random.h"
#include "agi/agi.h"