[Scummvm-cvs-logs] CVS: scummvm engine.h,NONE,1.1 scumm.h,1.201,1.202 scummvm.cpp,1.202,1.203

Max Horn fingolfin at users.sourceforge.net
Wed Aug 14 03:19:02 CEST 2002


Update of /cvsroot/scummvm/scummvm
In directory usw-pr-cvs1:/tmp/cvs-serv7746

Modified Files:
	scumm.h scummvm.cpp 
Added Files:
	engine.h 
Log Message:
added common Engine base class for Scumm and SimonState (not yet very useful)

--- NEW FILE: engine.h ---
/* ScummVM - Scumm Interpreter
 * Copyright (C) 2002 The ScummVM project
 *
 * 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., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
 *
 * $Header: /cvsroot/scummvm/scummvm/engine.h,v 1.1 2002/08/14 10:18:03 fingolfin Exp $
 */

#ifndef ENGINE_H
#define ENGINE_H

#include "scummsys.h"
#include "system.h"
#include "sound/mixer.h"

class Engine {
public:
	OSystem *_system;

	SoundMixer *_mixer;

	Engine()
	{
		_mixer = new SoundMixer();
	}
	
	~Engine()
	{
		delete _mixer;
	}
};


#endif

Index: scumm.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm.h,v
retrieving revision 1.201
retrieving revision 1.202
diff -u -d -r1.201 -r1.202
--- scumm.h	14 Aug 2002 09:53:34 -0000	1.201
+++ scumm.h	14 Aug 2002 10:18:03 -0000	1.202
@@ -23,9 +23,7 @@
 #ifndef SCUMM_H
 #define SCUMM_H
 
-#include "scummsys.h"
-#include "system.h"
-#include "sound/mixer.h"
+#include "engine.h"
 #include "bundle.h"
 #include "timer.h"
 
@@ -326,12 +324,11 @@
 #include "gfx.h"
 #include "boxes.h"
 
-class Scumm {
+class Scumm : public Engine {
 public:
 	/* Put often used variables at the top.
 	 * That results in a shorter form of the opcode
 	 * on some architectures. */
-	OSystem *_system;
 	IMuse *_imuse;
 	Gui *_gui;
 	NewGui *_newgui;
@@ -700,8 +697,6 @@
 	void setVerbObject(uint room, uint object, uint verb);
 
 	/* Should be in Sound class */
-	SoundMixer *_mixer;
-
 //	MixerChannel _mixer_channel[NUM_MIXER];
 	byte _sfxMode;
 	bool _use_adlib;

Index: scummvm.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scummvm.cpp,v
retrieving revision 1.202
retrieving revision 1.203
diff -u -d -r1.202 -r1.203
--- scummvm.cpp	14 Aug 2002 09:53:34 -0000	1.202
+++ scummvm.cpp	14 Aug 2002 10:18:03 -0000	1.203
@@ -65,7 +65,6 @@
 
 
 Scumm::Scumm (void) {
-	_mixer = new SoundMixer();
 	_newgui = new NewGui(this);
 	_bundle = new Bundle(this);
 	_timer = new Timer(this);
@@ -73,7 +72,6 @@
 
 Scumm::~Scumm (void) {
 	delete [] _actors;
-	delete _mixer;
 	delete _newgui;
 	delete _bundle;
 	delete _timer;





More information about the Scummvm-git-logs mailing list