[Scummvm-cvs-logs] SF.net SVN: scummvm:[48279] scummvm/trunk

fingolfin at users.sourceforge.net fingolfin at users.sourceforge.net
Thu Mar 18 16:07:12 CET 2010


Revision: 48279
          http://scummvm.svn.sourceforge.net/scummvm/?rev=48279&view=rev
Author:   fingolfin
Date:     2010-03-18 15:07:11 +0000 (Thu, 18 Mar 2010)

Log Message:
-----------
COMMON: Move Common::RandomSource to common/random.*

Modified Paths:
--------------
    scummvm/trunk/common/EventRecorder.cpp
    scummvm/trunk/common/EventRecorder.h
    scummvm/trunk/common/module.mk
    scummvm/trunk/common/util.cpp
    scummvm/trunk/common/util.h
    scummvm/trunk/engines/agi/agi.cpp
    scummvm/trunk/engines/agi/agi.h
    scummvm/trunk/engines/agi/motion.cpp
    scummvm/trunk/engines/agi/op_cmd.cpp
    scummvm/trunk/engines/agi/preagi.cpp
    scummvm/trunk/engines/agi/preagi.h
    scummvm/trunk/engines/agi/sound.cpp
    scummvm/trunk/engines/agos/agos.h
    scummvm/trunk/engines/cine/cine.h
    scummvm/trunk/engines/cruise/cruise.h
    scummvm/trunk/engines/draci/draci.h
    scummvm/trunk/engines/drascula/drascula.h
    scummvm/trunk/engines/gob/gob.h
    scummvm/trunk/engines/gob/sound/bgatmosphere.h
    scummvm/trunk/engines/groovie/script.h
    scummvm/trunk/engines/kyra/kyra_v1.h
    scummvm/trunk/engines/kyra/sprites.h
    scummvm/trunk/engines/lure/fights.h
    scummvm/trunk/engines/lure/lure.h
    scummvm/trunk/engines/lure/res.h
    scummvm/trunk/engines/m4/m4.h
    scummvm/trunk/engines/made/made.h
    scummvm/trunk/engines/mohawk/riven.h
    scummvm/trunk/engines/parallaction/parallaction.h
    scummvm/trunk/engines/queen/display.h
    scummvm/trunk/engines/queen/music.h
    scummvm/trunk/engines/queen/queen.h
    scummvm/trunk/engines/saga/saga.h
    scummvm/trunk/engines/scumm/scumm.h
    scummvm/trunk/engines/sky/logic.h
    scummvm/trunk/engines/sword1/logic.h
    scummvm/trunk/engines/sword1/sound.h
    scummvm/trunk/engines/sword2/sword2.h
    scummvm/trunk/engines/teenagent/actor.cpp
    scummvm/trunk/engines/teenagent/teenagent.h
    scummvm/trunk/engines/tinsel/tinsel.h
    scummvm/trunk/engines/touche/touche.h
    scummvm/trunk/engines/tucker/tucker.h
    scummvm/trunk/sound/softsynth/opl/mame.h

Added Paths:
-----------
    scummvm/trunk/common/random.cpp
    scummvm/trunk/common/random.h

Modified: scummvm/trunk/common/EventRecorder.cpp
===================================================================
--- scummvm/trunk/common/EventRecorder.cpp	2010-03-18 15:05:14 UTC (rev 48278)
+++ scummvm/trunk/common/EventRecorder.cpp	2010-03-18 15:07:11 UTC (rev 48279)
@@ -26,6 +26,7 @@
 #include "common/EventRecorder.h"
 
 #include "common/config-manager.h"
+#include "common/random.h"
 
 DECLARE_SINGLETON(Common::EventRecorder)
 

Modified: scummvm/trunk/common/EventRecorder.h
===================================================================
--- scummvm/trunk/common/EventRecorder.h	2010-03-18 15:05:14 UTC (rev 48278)
+++ scummvm/trunk/common/EventRecorder.h	2010-03-18 15:07:11 UTC (rev 48279)
@@ -37,6 +37,8 @@
 
 namespace Common {
 
+class RandomSource;
+
 /**
  * Our generic event recorder.
  *

Modified: scummvm/trunk/common/module.mk
===================================================================
--- scummvm/trunk/common/module.mk	2010-03-18 15:05:14 UTC (rev 48278)
+++ scummvm/trunk/common/module.mk	2010-03-18 15:07:11 UTC (rev 48279)
@@ -15,6 +15,7 @@
 	memorypool.o \
 	md5.o \
 	mutex.o \
+	random.o \
 	str.o \
 	stream.o \
 	util.o \

Copied: scummvm/trunk/common/random.cpp (from rev 48278, scummvm/trunk/engines/gob/sound/bgatmosphere.h)
===================================================================
--- scummvm/trunk/common/random.cpp	                        (rev 0)
+++ scummvm/trunk/common/random.cpp	2010-03-18 15:07:11 UTC (rev 48279)
@@ -0,0 +1,59 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ * $URL$
+ * $Id$
+ */
+
+#include "common/random.h"
+#include "common/system.h"
+
+
+namespace Common {
+
+RandomSource::RandomSource() {
+	// Use system time as RNG seed. Normally not a good idea, if you are using
+	// a RNG for security purposes, but good enough for our purposes.
+	assert(g_system);
+	uint32 seed = g_system->getMillis();
+	setSeed(seed);
+}
+
+void RandomSource::setSeed(uint32 seed) {
+	_randSeed = seed;
+}
+
+uint RandomSource::getRandomNumber(uint max) {
+	_randSeed = 0xDEADBF03 * (_randSeed + 1);
+	_randSeed = (_randSeed >> 13) | (_randSeed << 19);
+	return _randSeed % (max + 1);
+}
+
+uint RandomSource::getRandomBit() {
+	_randSeed = 0xDEADBF03 * (_randSeed + 1);
+	_randSeed = (_randSeed >> 13) | (_randSeed << 19);
+	return _randSeed & 1;
+}
+
+uint RandomSource::getRandomNumberRng(uint min, uint max) {
+	return getRandomNumber(max - min) + min;
+}
+
+}	// End of namespace Common

Added: scummvm/trunk/common/random.h
===================================================================
--- scummvm/trunk/common/random.h	                        (rev 0)
+++ scummvm/trunk/common/random.h	2010-03-18 15:07:11 UTC (rev 48279)
@@ -0,0 +1,71 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ * $URL$
+ * $Id$
+ */
+
+#ifndef COMMON_RANDOM_H
+#define COMMON_RANDOM_H
+
+#include "common/scummsys.h"
+
+namespace Common {
+
+/**
+ * Simple random number generator. Although it is definitely not suitable for
+ * cryptographic purposes, it serves our purposes just fine.
+ */
+class RandomSource {
+private:
+	uint32 _randSeed;
+
+public:
+	RandomSource();
+	void setSeed(uint32 seed);
+
+	uint32 getSeed() {
+		return _randSeed;
+	}
+
+	/**
+	 * Generates a random unsigned integer in the interval [0, max].
+	 * @param max	the upper bound
+	 * @return	a random number in the interval [0, max]
+	 */
+	uint getRandomNumber(uint max);
+	/**
+	 * Generates a random bit, i.e. either 0 or 1.
+	 * Identical to getRandomNumber(1), but faster, hopefully.
+	 * @return	a random bit, either 0 or 1
+	 */
+	uint getRandomBit();
+	/**
+	 * Generates a random unsigned integer in the interval [min, max].
+	 * @param min	the lower bound
+	 * @param max	the upper bound
+	 * @return	a random number in the interval [min, max]
+	 */
+	uint getRandomNumberRng(uint min, uint max);
+};
+
+}	// End of namespace Common
+
+#endif


Property changes on: scummvm/trunk/common/random.h
___________________________________________________________________
Added: svn:mime-type
   + text/plain
Added: svn:keywords
   + Date Rev Author URL Id
Added: svn:eol-style
   + native

Modified: scummvm/trunk/common/util.cpp
===================================================================
--- scummvm/trunk/common/util.cpp	2010-03-18 15:05:14 UTC (rev 48278)
+++ scummvm/trunk/common/util.cpp	2010-03-18 15:07:11 UTC (rev 48279)
@@ -148,38 +148,6 @@
 #pragma mark -
 
 
-RandomSource::RandomSource() {
-	// Use system time as RNG seed. Normally not a good idea, if you are using
-	// a RNG for security purposes, but good enough for our purposes.
-	assert(g_system);
-	uint32 seed = g_system->getMillis();
-	setSeed(seed);
-}
-
-void RandomSource::setSeed(uint32 seed) {
-	_randSeed = seed;
-}
-
-uint RandomSource::getRandomNumber(uint max) {
-	_randSeed = 0xDEADBF03 * (_randSeed + 1);
-	_randSeed = (_randSeed >> 13) | (_randSeed << 19);
-	return _randSeed % (max + 1);
-}
-
-uint RandomSource::getRandomBit() {
-	_randSeed = 0xDEADBF03 * (_randSeed + 1);
-	_randSeed = (_randSeed >> 13) | (_randSeed << 19);
-	return _randSeed & 1;
-}
-
-uint RandomSource::getRandomNumberRng(uint min, uint max) {
-	return getRandomNumber(max - min) + min;
-}
-
-
-#pragma mark -
-
-
 const LanguageDescription g_languages[] = {
 	{"zh-cn", "Chinese (China)", ZH_CNA},
 	{"zh", "Chinese (Taiwan)", ZH_TWN},

Modified: scummvm/trunk/common/util.h
===================================================================
--- scummvm/trunk/common/util.h	2010-03-18 15:05:14 UTC (rev 48278)
+++ scummvm/trunk/common/util.h	2010-03-18 15:07:11 UTC (rev 48279)
@@ -111,46 +111,7 @@
 #define tag2str(x)	Common::tag2string(x).c_str()
 
 
-
-
 /**
- * Simple random number generator. Although it is definitely not suitable for
- * cryptographic purposes, it serves our purposes just fine.
- */
-class RandomSource {
-private:
-	uint32 _randSeed;
-
-public:
-	RandomSource();
-	void setSeed(uint32 seed);
-
-	uint32 getSeed() {
-		return _randSeed;
-	}
-
-	/**
-	 * Generates a random unsigned integer in the interval [0, max].
-	 * @param max	the upper bound
-	 * @return	a random number in the interval [0, max]
-	 */
-	uint getRandomNumber(uint max);
-	/**
-	 * Generates a random bit, i.e. either 0 or 1.
-	 * Identical to getRandomNumber(1), but faster, hopefully.
-	 * @return	a random bit, either 0 or 1
-	 */
-	uint getRandomBit();
-	/**
-	 * Generates a random unsigned integer in the interval [min, max].
-	 * @param min	the lower bound
-	 * @param max	the upper bound
-	 * @return	a random number in the interval [min, max]
-	 */
-	uint getRandomNumberRng(uint min, uint max);
-};
-
-/**
  * List of game language.
  */
 enum Language {

Modified: scummvm/trunk/engines/agi/agi.cpp
===================================================================
--- scummvm/trunk/engines/agi/agi.cpp	2010-03-18 15:05:14 UTC (rev 48278)
+++ scummvm/trunk/engines/agi/agi.cpp	2010-03-18 15:07:11 UTC (rev 48279)
@@ -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"

Modified: scummvm/trunk/engines/agi/agi.h
===================================================================
--- scummvm/trunk/engines/agi/agi.h	2010-03-18 15:05:14 UTC (rev 48278)
+++ scummvm/trunk/engines/agi/agi.h	2010-03-18 15:07:11 UTC (rev 48279)
@@ -37,6 +37,8 @@
 
 #include "gui/debugger.h"
 
+namespace Common { class RandomSource; }
+
 /**
  * This is the namespace of the AGI engine.
  *

Modified: scummvm/trunk/engines/agi/motion.cpp
===================================================================
--- scummvm/trunk/engines/agi/motion.cpp	2010-03-18 15:05:14 UTC (rev 48278)
+++ scummvm/trunk/engines/agi/motion.cpp	2010-03-18 15:07:11 UTC (rev 48279)
@@ -24,6 +24,7 @@
  */
 
 #include "agi/agi.h"
+#include "common/random.h"
 
 namespace Agi {
 

Modified: scummvm/trunk/engines/agi/op_cmd.cpp
===================================================================
--- scummvm/trunk/engines/agi/op_cmd.cpp	2010-03-18 15:05:14 UTC (rev 48278)
+++ scummvm/trunk/engines/agi/op_cmd.cpp	2010-03-18 15:07:11 UTC (rev 48279)
@@ -31,6 +31,8 @@
 #include "agi/opcodes.h"
 #include "agi/menu.h"
 
+#include "common/random.h"
+
 namespace Agi {
 
 #define p0	(p[0])

Modified: scummvm/trunk/engines/agi/preagi.cpp
===================================================================
--- scummvm/trunk/engines/agi/preagi.cpp	2010-03-18 15:05:14 UTC (rev 48278)
+++ scummvm/trunk/engines/agi/preagi.cpp	2010-03-18 15:07:11 UTC (rev 48279)
@@ -24,6 +24,7 @@
  */
 
 #include "common/config-manager.h"
+#include "common/random.h"
 
 #include "sound/mididrv.h"
 
@@ -183,4 +184,8 @@
 	return Common::kNoError;
 }
 
+int PreAgiEngine::rnd(int hi) {
+	return (_rnd->getRandomNumber(hi - 1) + 1);
+}
+
 } // End of namespace Agi

Modified: scummvm/trunk/engines/agi/preagi.h
===================================================================
--- scummvm/trunk/engines/agi/preagi.h	2010-03-18 15:05:14 UTC (rev 48278)
+++ scummvm/trunk/engines/agi/preagi.h	2010-03-18 15:07:11 UTC (rev 48279)
@@ -77,7 +77,7 @@
 	// 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);

Modified: scummvm/trunk/engines/agi/sound.cpp
===================================================================
--- scummvm/trunk/engines/agi/sound.cpp	2010-03-18 15:05:14 UTC (rev 48278)
+++ scummvm/trunk/engines/agi/sound.cpp	2010-03-18 15:07:11 UTC (rev 48279)
@@ -25,6 +25,7 @@
 
 #include "common/md5.h"
 #include "common/config-manager.h"
+#include "common/random.h"
 
 #include "agi/agi.h"
 

Modified: scummvm/trunk/engines/agos/agos.h
===================================================================
--- scummvm/trunk/engines/agos/agos.h	2010-03-18 15:05:14 UTC (rev 48278)
+++ scummvm/trunk/engines/agos/agos.h	2010-03-18 15:07:11 UTC (rev 48279)
@@ -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"

Modified: scummvm/trunk/engines/cine/cine.h
===================================================================
--- scummvm/trunk/engines/cine/cine.h	2010-03-18 15:05:14 UTC (rev 48278)
+++ scummvm/trunk/engines/cine/cine.h	2010-03-18 15:07:11 UTC (rev 48279)
@@ -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"
 

Modified: scummvm/trunk/engines/cruise/cruise.h
===================================================================
--- scummvm/trunk/engines/cruise/cruise.h	2010-03-18 15:05:14 UTC (rev 48278)
+++ scummvm/trunk/engines/cruise/cruise.h	2010-03-18 15:07:11 UTC (rev 48279)
@@ -28,6 +28,7 @@
 
 #include "common/scummsys.h"
 #include "common/util.h"
+#include "common/random.h"
 
 #include "engines/engine.h"
 #include "engines/game.h"

Modified: scummvm/trunk/engines/draci/draci.h
===================================================================
--- scummvm/trunk/engines/draci/draci.h	2010-03-18 15:05:14 UTC (rev 48278)
+++ scummvm/trunk/engines/draci/draci.h	2010-03-18 15:07:11 UTC (rev 48279)
@@ -26,9 +26,8 @@
 #ifndef DRACI_H
 #define DRACI_H
 
-#include <math.h>
-
 #include "engines/engine.h"
+#include "common/random.h"
 
 struct ADGameDescription;
 

Modified: scummvm/trunk/engines/drascula/drascula.h
===================================================================
--- scummvm/trunk/engines/drascula/drascula.h	2010-03-18 15:05:14 UTC (rev 48278)
+++ scummvm/trunk/engines/drascula/drascula.h	2010-03-18 15:07:11 UTC (rev 48279)
@@ -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/hash-str.h"
+#include "common/keyboard.h"
+#include "common/random.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/util.h"
 
 #include "sound/mixer.h"
 

Modified: scummvm/trunk/engines/gob/gob.h
===================================================================
--- scummvm/trunk/engines/gob/gob.h	2010-03-18 15:05:14 UTC (rev 48278)
+++ scummvm/trunk/engines/gob/gob.h	2010-03-18 15:07:11 UTC (rev 48279)
@@ -26,6 +26,7 @@
 #ifndef GOB_GOB_H
 #define GOB_GOB_H
 
+#include "common/random.h"
 #include "common/system.h"
 #include "common/savefile.h"
 

Modified: scummvm/trunk/engines/gob/sound/bgatmosphere.h
===================================================================
--- scummvm/trunk/engines/gob/sound/bgatmosphere.h	2010-03-18 15:05:14 UTC (rev 48278)
+++ scummvm/trunk/engines/gob/sound/bgatmosphere.h	2010-03-18 15:07:11 UTC (rev 48279)
@@ -28,6 +28,7 @@
 
 #include "sound/mixer.h"
 #include "common/mutex.h"
+#include "common/random.h"
 
 #include "gob/sound/soundmixer.h"
 

Modified: scummvm/trunk/engines/groovie/script.h
===================================================================
--- scummvm/trunk/engines/groovie/script.h	2010-03-18 15:05:14 UTC (rev 48278)
+++ scummvm/trunk/engines/groovie/script.h	2010-03-18 15:07:11 UTC (rev 48279)
@@ -27,6 +27,7 @@
 #define GROOVIE_SCRIPT_H
 
 #include "common/file.h"
+#include "common/random.h"
 #include "common/rect.h"
 
 #include "groovie/font.h"

Modified: scummvm/trunk/engines/kyra/kyra_v1.h
===================================================================
--- scummvm/trunk/engines/kyra/kyra_v1.h	2010-03-18 15:05:14 UTC (rev 48278)
+++ scummvm/trunk/engines/kyra/kyra_v1.h	2010-03-18 15:07:11 UTC (rev 48279)
@@ -30,6 +30,7 @@
 
 #include "common/array.h"
 #include "common/events.h"
+#include "common/random.h"
 #include "common/system.h"
 
 #include "sound/mixer.h"

Modified: scummvm/trunk/engines/kyra/sprites.h
===================================================================
--- scummvm/trunk/engines/kyra/sprites.h	2010-03-18 15:05:14 UTC (rev 48278)
+++ scummvm/trunk/engines/kyra/sprites.h	2010-03-18 15:07:11 UTC (rev 48279)
@@ -27,6 +27,7 @@
 #define KYRA_SPRITES_H
 
 #include "kyra/kyra_lok.h"
+#include "common/random.h"
 
 namespace Kyra {
 

Modified: scummvm/trunk/engines/lure/fights.h
===================================================================
--- scummvm/trunk/engines/lure/fights.h	2010-03-18 15:05:14 UTC (rev 48278)
+++ scummvm/trunk/engines/lure/fights.h	2010-03-18 15:07:11 UTC (rev 48279)
@@ -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 {
 

Modified: scummvm/trunk/engines/lure/lure.h
===================================================================
--- scummvm/trunk/engines/lure/lure.h	2010-03-18 15:05:14 UTC (rev 48278)
+++ scummvm/trunk/engines/lure/lure.h	2010-03-18 15:07:11 UTC (rev 48279)
@@ -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"

Modified: scummvm/trunk/engines/lure/res.h
===================================================================
--- scummvm/trunk/engines/lure/res.h	2010-03-18 15:05:14 UTC (rev 48278)
+++ scummvm/trunk/engines/lure/res.h	2010-03-18 15:07:11 UTC (rev 48279)
@@ -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 {
 

Modified: scummvm/trunk/engines/m4/m4.h
===================================================================
--- scummvm/trunk/engines/m4/m4.h	2010-03-18 15:05:14 UTC (rev 48278)
+++ scummvm/trunk/engines/m4/m4.h	2010-03-18 15:07:11 UTC (rev 48279)
@@ -28,6 +28,7 @@
 
 #include "common/scummsys.h"
 #include "common/util.h"
+#include "common/random.h"
 
 #include "engines/engine.h"
 

Modified: scummvm/trunk/engines/made/made.h
===================================================================
--- scummvm/trunk/engines/made/made.h	2010-03-18 15:05:14 UTC (rev 48278)
+++ scummvm/trunk/engines/made/made.h	2010-03-18 15:07:11 UTC (rev 48279)
@@ -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/hash-str.h"
+#include "common/keyboard.h"
+#include "common/random.h"
 #include "common/savefile.h"
 #include "common/system.h"
-#include "common/hash-str.h"
-#include "common/events.h"
-#include "common/keyboard.h"
+#include "common/util.h"
 
 #include "graphics/surface.h"
 

Modified: scummvm/trunk/engines/mohawk/riven.h
===================================================================
--- scummvm/trunk/engines/mohawk/riven.h	2010-03-18 15:05:14 UTC (rev 48278)
+++ scummvm/trunk/engines/mohawk/riven.h	2010-03-18 15:07:11 UTC (rev 48279)
@@ -31,6 +31,8 @@
 
 #include "gui/saveload.h"
 
+#include "common/random.h"
+
 namespace Mohawk {
 
 struct MohawkGameDescription;

Modified: scummvm/trunk/engines/parallaction/parallaction.h
===================================================================
--- scummvm/trunk/engines/parallaction/parallaction.h	2010-03-18 15:05:14 UTC (rev 48278)
+++ scummvm/trunk/engines/parallaction/parallaction.h	2010-03-18 15:07:11 UTC (rev 48279)
@@ -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"

Modified: scummvm/trunk/engines/queen/display.h
===================================================================
--- scummvm/trunk/engines/queen/display.h	2010-03-18 15:05:14 UTC (rev 48278)
+++ scummvm/trunk/engines/queen/display.h	2010-03-18 15:07:11 UTC (rev 48279)
@@ -28,6 +28,7 @@
 
 #include "common/str.h"
 #include "common/util.h"
+#include "common/random.h"
 #include "queen/defs.h"
 
 class OSystem;

Modified: scummvm/trunk/engines/queen/music.h
===================================================================
--- scummvm/trunk/engines/queen/music.h	2010-03-18 15:05:14 UTC (rev 48278)
+++ scummvm/trunk/engines/queen/music.h	2010-03-18 15:07:11 UTC (rev 48279)
@@ -28,6 +28,7 @@
 
 #include "common/util.h"
 #include "common/mutex.h"
+#include "common/random.h"
 #include "sound/mididrv.h"
 
 class MidiParser;

Modified: scummvm/trunk/engines/queen/queen.h
===================================================================
--- scummvm/trunk/engines/queen/queen.h	2010-03-18 15:05:14 UTC (rev 48278)
+++ scummvm/trunk/engines/queen/queen.h	2010-03-18 15:07:11 UTC (rev 48279)
@@ -27,6 +27,7 @@
 #define QUEEN_H
 
 #include "engines/engine.h"
+#include "common/random.h"
 
 namespace Common {
 	class SeekableReadStream;

Modified: scummvm/trunk/engines/saga/saga.h
===================================================================
--- scummvm/trunk/engines/saga/saga.h	2010-03-18 15:05:14 UTC (rev 48278)
+++ scummvm/trunk/engines/saga/saga.h	2010-03-18 15:07:11 UTC (rev 48279)
@@ -28,6 +28,7 @@
 
 #include "engines/engine.h"
 
+#include "common/random.h"
 #include "common/stream.h"
 #include "sound/mididrv.h"
 

Modified: scummvm/trunk/engines/scumm/scumm.h
===================================================================
--- scummvm/trunk/engines/scumm/scumm.h	2010-03-18 15:05:14 UTC (rev 48278)
+++ scummvm/trunk/engines/scumm/scumm.h	2010-03-18 15:07:11 UTC (rev 48279)
@@ -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"

Modified: scummvm/trunk/engines/sky/logic.h
===================================================================
--- scummvm/trunk/engines/sky/logic.h	2010-03-18 15:05:14 UTC (rev 48278)
+++ scummvm/trunk/engines/sky/logic.h	2010-03-18 15:07:11 UTC (rev 48279)
@@ -26,8 +26,8 @@
 #ifndef SKY_LOGIC_H
 #define SKY_LOGIC_H
 
-
 #include "common/util.h"
+#include "common/random.h"
 
 namespace Sky {
 

Modified: scummvm/trunk/engines/sword1/logic.h
===================================================================
--- scummvm/trunk/engines/sword1/logic.h	2010-03-18 15:05:14 UTC (rev 48278)
+++ scummvm/trunk/engines/sword1/logic.h	2010-03-18 15:07:11 UTC (rev 48279)
@@ -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 {

Modified: scummvm/trunk/engines/sword1/sound.h
===================================================================
--- scummvm/trunk/engines/sword1/sound.h	2010-03-18 15:05:14 UTC (rev 48278)
+++ scummvm/trunk/engines/sword1/sound.h	2010-03-18 15:07:11 UTC (rev 48279)
@@ -29,8 +29,9 @@
 #include "sword1/object.h"
 #include "sword1/sworddefs.h"
 #include "common/file.h"
+#include "common/util.h"
+#include "common/random.h"
 #include "sound/mixer.h"
-#include "common/util.h"
 
 namespace Audio {
 	class Mixer;

Modified: scummvm/trunk/engines/sword2/sword2.h
===================================================================
--- scummvm/trunk/engines/sword2/sword2.h	2010-03-18 15:05:14 UTC (rev 48278)
+++ scummvm/trunk/engines/sword2/sword2.h	2010-03-18 15:07:11 UTC (rev 48279)
@@ -41,6 +41,7 @@
 
 #include "common/events.h"
 #include "common/util.h"
+#include "common/random.h"
 
 #define	MAX_starts	100
 #define	MAX_description	100

Modified: scummvm/trunk/engines/teenagent/actor.cpp
===================================================================
--- scummvm/trunk/engines/teenagent/actor.cpp	2010-03-18 15:05:14 UTC (rev 48278)
+++ scummvm/trunk/engines/teenagent/actor.cpp	2010-03-18 15:07:11 UTC (rev 48279)
@@ -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) {}

Modified: scummvm/trunk/engines/teenagent/teenagent.h
===================================================================
--- scummvm/trunk/engines/teenagent/teenagent.h	2010-03-18 15:05:14 UTC (rev 48278)
+++ scummvm/trunk/engines/teenagent/teenagent.h	2010-03-18 15:07:11 UTC (rev 48279)
@@ -31,6 +31,7 @@
 #include "teenagent/inventory.h"
 #include "sound/audiostream.h"
 #include "sound/mixer.h"
+#include "common/random.h"
 
 struct ADGameDescription;
 

Modified: scummvm/trunk/engines/tinsel/tinsel.h
===================================================================
--- scummvm/trunk/engines/tinsel/tinsel.h	2010-03-18 15:05:14 UTC (rev 48278)
+++ scummvm/trunk/engines/tinsel/tinsel.h	2010-03-18 15:07:11 UTC (rev 48279)
@@ -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"

Modified: scummvm/trunk/engines/touche/touche.h
===================================================================
--- scummvm/trunk/engines/touche/touche.h	2010-03-18 15:05:14 UTC (rev 48278)
+++ scummvm/trunk/engines/touche/touche.h	2010-03-18 15:07:11 UTC (rev 48279)
@@ -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"
 

Modified: scummvm/trunk/engines/tucker/tucker.h
===================================================================
--- scummvm/trunk/engines/tucker/tucker.h	2010-03-18 15:05:14 UTC (rev 48278)
+++ scummvm/trunk/engines/tucker/tucker.h	2010-03-18 15:07:11 UTC (rev 48279)
@@ -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"

Modified: scummvm/trunk/sound/softsynth/opl/mame.h
===================================================================
--- scummvm/trunk/sound/softsynth/opl/mame.h	2010-03-18 15:05:14 UTC (rev 48278)
+++ scummvm/trunk/sound/softsynth/opl/mame.h	2010-03-18 15:07:11 UTC (rev 48279)
@@ -31,6 +31,7 @@
 
 #include "common/scummsys.h"
 #include "common/util.h"
+#include "common/random.h"
 
 #include "sound/fmopl.h"
 


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.




More information about the Scummvm-git-logs mailing list