aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
Diffstat (limited to 'engines')
-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
-rw-r--r--engines/agos/agos.h1
-rw-r--r--engines/cine/cine.h1
-rw-r--r--engines/cruise/cruise.h1
-rw-r--r--engines/draci/draci.h3
-rw-r--r--engines/drascula/drascula.h11
-rw-r--r--engines/gob/gob.h1
-rw-r--r--engines/gob/sound/bgatmosphere.h1
-rw-r--r--engines/groovie/script.h1
-rw-r--r--engines/kyra/kyra_v1.h1
-rw-r--r--engines/kyra/sprites.h1
-rw-r--r--engines/lure/fights.h2
-rw-r--r--engines/lure/lure.h1
-rw-r--r--engines/lure/res.h4
-rw-r--r--engines/m4/m4.h1
-rw-r--r--engines/made/made.h9
-rw-r--r--engines/mohawk/riven.h2
-rw-r--r--engines/parallaction/parallaction.h1
-rw-r--r--engines/queen/display.h1
-rw-r--r--engines/queen/music.h1
-rw-r--r--engines/queen/queen.h1
-rw-r--r--engines/saga/saga.h1
-rw-r--r--engines/scumm/scumm.h1
-rw-r--r--engines/sky/logic.h2
-rw-r--r--engines/sword1/logic.h1
-rw-r--r--engines/sword1/sound.h3
-rw-r--r--engines/sword2/sword2.h1
-rw-r--r--engines/teenagent/actor.cpp2
-rw-r--r--engines/teenagent/teenagent.h1
-rw-r--r--engines/tinsel/tinsel.h1
-rw-r--r--engines/touche/touche.h1
-rw-r--r--engines/tucker/tucker.h1
38 files changed, 59 insertions, 15 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"
diff --git a/engines/agos/agos.h b/engines/agos/agos.h
index 164107620f..ff42306ea0 100644
--- a/engines/agos/agos.h
+++ b/engines/agos/agos.h
@@ -30,6 +30,7 @@
#include "common/array.h"
#include "common/keyboard.h"
+#include "common/random.h"
#include "common/rect.h"
#include "common/stack.h"
#include "common/util.h"
diff --git a/engines/cine/cine.h b/engines/cine/cine.h
index 285565f48d..911577e89e 100644
--- a/engines/cine/cine.h
+++ b/engines/cine/cine.h
@@ -33,6 +33,7 @@
#include "common/str.h"
#include "common/hashmap.h"
#include "common/hash-str.h"
+#include "common/random.h"
#include "engines/engine.h"
diff --git a/engines/cruise/cruise.h b/engines/cruise/cruise.h
index e8f8e23539..3d5d0499af 100644
--- a/engines/cruise/cruise.h
+++ b/engines/cruise/cruise.h
@@ -28,6 +28,7 @@
#include "common/scummsys.h"
#include "common/util.h"
+#include "common/random.h"
#include "engines/engine.h"
#include "engines/game.h"
diff --git a/engines/draci/draci.h b/engines/draci/draci.h
index 338c751079..605e8cc238 100644
--- a/engines/draci/draci.h
+++ b/engines/draci/draci.h
@@ -26,9 +26,8 @@
#ifndef DRACI_H
#define DRACI_H
-#include <math.h>
-
#include "engines/engine.h"
+#include "common/random.h"
struct ADGameDescription;
diff --git a/engines/drascula/drascula.h b/engines/drascula/drascula.h
index 9a7997659b..7367d4d84e 100644
--- a/engines/drascula/drascula.h
+++ b/engines/drascula/drascula.h
@@ -27,15 +27,16 @@
#define DRASCULA_H
#include "common/scummsys.h"
+#include "common/archive.h"
#include "common/endian.h"
-#include "common/util.h"
+#include "common/events.h"
#include "common/file.h"
-#include "common/savefile.h"
-#include "common/system.h"
#include "common/hash-str.h"
-#include "common/events.h"
#include "common/keyboard.h"
-#include "common/archive.h"
+#include "common/random.h"
+#include "common/savefile.h"
+#include "common/system.h"
+#include "common/util.h"
#include "sound/mixer.h"
diff --git a/engines/gob/gob.h b/engines/gob/gob.h
index 0eca7c8a75..dcca236ee3 100644
--- a/engines/gob/gob.h
+++ b/engines/gob/gob.h
@@ -26,6 +26,7 @@
#ifndef GOB_GOB_H
#define GOB_GOB_H
+#include "common/random.h"
#include "common/system.h"
#include "common/savefile.h"
diff --git a/engines/gob/sound/bgatmosphere.h b/engines/gob/sound/bgatmosphere.h
index aa8cf58e10..aabf6a7e9e 100644
--- a/engines/gob/sound/bgatmosphere.h
+++ b/engines/gob/sound/bgatmosphere.h
@@ -28,6 +28,7 @@
#include "sound/mixer.h"
#include "common/mutex.h"
+#include "common/random.h"
#include "gob/sound/soundmixer.h"
diff --git a/engines/groovie/script.h b/engines/groovie/script.h
index d9752e484d..e4a6a288e6 100644
--- a/engines/groovie/script.h
+++ b/engines/groovie/script.h
@@ -27,6 +27,7 @@
#define GROOVIE_SCRIPT_H
#include "common/file.h"
+#include "common/random.h"
#include "common/rect.h"
#include "groovie/font.h"
diff --git a/engines/kyra/kyra_v1.h b/engines/kyra/kyra_v1.h
index 0e71f039f4..a30f0e7a27 100644
--- a/engines/kyra/kyra_v1.h
+++ b/engines/kyra/kyra_v1.h
@@ -30,6 +30,7 @@
#include "common/array.h"
#include "common/events.h"
+#include "common/random.h"
#include "common/system.h"
#include "sound/mixer.h"
diff --git a/engines/kyra/sprites.h b/engines/kyra/sprites.h
index 212bfc7428..f6c53e6d04 100644
--- a/engines/kyra/sprites.h
+++ b/engines/kyra/sprites.h
@@ -27,6 +27,7 @@
#define KYRA_SPRITES_H
#include "kyra/kyra_lok.h"
+#include "common/random.h"
namespace Kyra {
diff --git a/engines/lure/fights.h b/engines/lure/fights.h
index 912429e2df..0aa44030d2 100644
--- a/engines/lure/fights.h
+++ b/engines/lure/fights.h
@@ -29,8 +29,10 @@
#include "lure/luredefs.h"
#include "lure/hotspots.h"
#include "lure/palette.h"
+
#include "common/singleton.h"
#include "common/endian.h"
+#include "common/random.h"
namespace Lure {
diff --git a/engines/lure/lure.h b/engines/lure/lure.h
index 1f48a1f1c1..15336a3507 100644
--- a/engines/lure/lure.h
+++ b/engines/lure/lure.h
@@ -32,6 +32,7 @@
#include "common/file.h"
#include "common/savefile.h"
#include "common/util.h"
+#include "common/random.h"
#include "lure/disk.h"
#include "lure/res.h"
diff --git a/engines/lure/res.h b/engines/lure/res.h
index 6b55cb5da1..203313acb4 100644
--- a/engines/lure/res.h
+++ b/engines/lure/res.h
@@ -28,11 +28,13 @@
#include "lure/luredefs.h"
#include "lure/memory.h"
-#include "common/list.h"
#include "lure/res_struct.h"
#include "lure/hotspots.h"
#include "lure/palette.h"
+
#include "common/file.h"
+#include "common/list.h"
+#include "common/random.h"
namespace Lure {
diff --git a/engines/m4/m4.h b/engines/m4/m4.h
index bebda02ca6..7987535c69 100644
--- a/engines/m4/m4.h
+++ b/engines/m4/m4.h
@@ -28,6 +28,7 @@
#include "common/scummsys.h"
#include "common/util.h"
+#include "common/random.h"
#include "engines/engine.h"
diff --git a/engines/made/made.h b/engines/made/made.h
index 4d10df38f5..08f9add33d 100644
--- a/engines/made/made.h
+++ b/engines/made/made.h
@@ -28,13 +28,14 @@
#include "common/scummsys.h"
#include "common/endian.h"
-#include "common/util.h"
+#include "common/events.h"
#include "common/file.h"
-#include "common/savefile.h"
-#include "common/system.h"
#include "common/hash-str.h"
-#include "common/events.h"
#include "common/keyboard.h"
+#include "common/random.h"
+#include "common/savefile.h"
+#include "common/system.h"
+#include "common/util.h"
#include "graphics/surface.h"
diff --git a/engines/mohawk/riven.h b/engines/mohawk/riven.h
index 3ecb971ccd..633850529f 100644
--- a/engines/mohawk/riven.h
+++ b/engines/mohawk/riven.h
@@ -31,6 +31,8 @@
#include "gui/saveload.h"
+#include "common/random.h"
+
namespace Mohawk {
struct MohawkGameDescription;
diff --git a/engines/parallaction/parallaction.h b/engines/parallaction/parallaction.h
index fc7c967133..10cee1e7b2 100644
--- a/engines/parallaction/parallaction.h
+++ b/engines/parallaction/parallaction.h
@@ -30,6 +30,7 @@
#include "common/stack.h"
#include "common/array.h"
#include "common/func.h"
+#include "common/random.h"
#include "common/savefile.h"
#include "engines/engine.h"
diff --git a/engines/queen/display.h b/engines/queen/display.h
index b3c85cbea0..d3391fc4d3 100644
--- a/engines/queen/display.h
+++ b/engines/queen/display.h
@@ -28,6 +28,7 @@
#include "common/str.h"
#include "common/util.h"
+#include "common/random.h"
#include "queen/defs.h"
class OSystem;
diff --git a/engines/queen/music.h b/engines/queen/music.h
index 2f749d62e8..16c2012973 100644
--- a/engines/queen/music.h
+++ b/engines/queen/music.h
@@ -28,6 +28,7 @@
#include "common/util.h"
#include "common/mutex.h"
+#include "common/random.h"
#include "sound/mididrv.h"
class MidiParser;
diff --git a/engines/queen/queen.h b/engines/queen/queen.h
index b79e3e7cca..5a8f1357f4 100644
--- a/engines/queen/queen.h
+++ b/engines/queen/queen.h
@@ -27,6 +27,7 @@
#define QUEEN_H
#include "engines/engine.h"
+#include "common/random.h"
namespace Common {
class SeekableReadStream;
diff --git a/engines/saga/saga.h b/engines/saga/saga.h
index 4605c0b5c7..fc783933f1 100644
--- a/engines/saga/saga.h
+++ b/engines/saga/saga.h
@@ -28,6 +28,7 @@
#include "engines/engine.h"
+#include "common/random.h"
#include "common/stream.h"
#include "sound/mididrv.h"
diff --git a/engines/scumm/scumm.h b/engines/scumm/scumm.h
index e7956681b7..885ab790de 100644
--- a/engines/scumm/scumm.h
+++ b/engines/scumm/scumm.h
@@ -32,6 +32,7 @@
#include "common/file.h"
#include "common/savefile.h"
#include "common/keyboard.h"
+#include "common/random.h"
#include "common/rect.h"
#include "common/str.h"
#include "graphics/surface.h"
diff --git a/engines/sky/logic.h b/engines/sky/logic.h
index 2274b6e2c5..da1d9ed997 100644
--- a/engines/sky/logic.h
+++ b/engines/sky/logic.h
@@ -26,8 +26,8 @@
#ifndef SKY_LOGIC_H
#define SKY_LOGIC_H
-
#include "common/util.h"
+#include "common/random.h"
namespace Sky {
diff --git a/engines/sword1/logic.h b/engines/sword1/logic.h
index aabfb7fce9..4ec8ad15c5 100644
--- a/engines/sword1/logic.h
+++ b/engines/sword1/logic.h
@@ -30,6 +30,7 @@
#include "sword1/sworddefs.h"
#include "sword1/objectman.h"
#include "common/util.h"
+#include "common/random.h"
#include "sound/mixer.h"
namespace Sword1 {
diff --git a/engines/sword1/sound.h b/engines/sword1/sound.h
index 4a92f79e34..ececb95875 100644
--- a/engines/sword1/sound.h
+++ b/engines/sword1/sound.h
@@ -29,8 +29,9 @@
#include "sword1/object.h"
#include "sword1/sworddefs.h"
#include "common/file.h"
-#include "sound/mixer.h"
#include "common/util.h"
+#include "common/random.h"
+#include "sound/mixer.h"
namespace Audio {
class Mixer;
diff --git a/engines/sword2/sword2.h b/engines/sword2/sword2.h
index 28cdaa8730..201ce5e836 100644
--- a/engines/sword2/sword2.h
+++ b/engines/sword2/sword2.h
@@ -41,6 +41,7 @@
#include "common/events.h"
#include "common/util.h"
+#include "common/random.h"
#define MAX_starts 100
#define MAX_description 100
diff --git a/engines/teenagent/actor.cpp b/engines/teenagent/actor.cpp
index 1fef2b79ab..1620aa700c 100644
--- a/engines/teenagent/actor.cpp
+++ b/engines/teenagent/actor.cpp
@@ -26,6 +26,8 @@
#include "teenagent/objects.h"
#include "teenagent/resources.h"
+#include "common/random.h"
+
namespace TeenAgent {
Actor::Actor() : head_index(0), idle_type(0) {}
diff --git a/engines/teenagent/teenagent.h b/engines/teenagent/teenagent.h
index 7176108007..f9dc590b54 100644
--- a/engines/teenagent/teenagent.h
+++ b/engines/teenagent/teenagent.h
@@ -31,6 +31,7 @@
#include "teenagent/inventory.h"
#include "sound/audiostream.h"
#include "sound/mixer.h"
+#include "common/random.h"
struct ADGameDescription;
diff --git a/engines/tinsel/tinsel.h b/engines/tinsel/tinsel.h
index 8ce1d4d6ba..765f09d637 100644
--- a/engines/tinsel/tinsel.h
+++ b/engines/tinsel/tinsel.h
@@ -31,6 +31,7 @@
#include "common/error.h"
#include "common/events.h"
#include "common/keyboard.h"
+#include "common/random.h"
#include "common/util.h"
#include "sound/mididrv.h"
diff --git a/engines/touche/touche.h b/engines/touche/touche.h
index 3cb8b3c07c..33ca81ed4f 100644
--- a/engines/touche/touche.h
+++ b/engines/touche/touche.h
@@ -29,6 +29,7 @@
#include "common/array.h"
#include "common/endian.h"
#include "common/file.h"
+#include "common/random.h"
#include "common/rect.h"
#include "common/util.h"
diff --git a/engines/tucker/tucker.h b/engines/tucker/tucker.h
index aff8e52550..d9810c7929 100644
--- a/engines/tucker/tucker.h
+++ b/engines/tucker/tucker.h
@@ -30,6 +30,7 @@
#include "common/util.h"
#include "common/endian.h"
#include "common/events.h"
+#include "common/random.h"
#include "common/stream.h"
#include "graphics/video/flic_decoder.h"