[Scummvm-cvs-logs] CVS: scummvm/common debugger.cpp,1.1,1.2 debugger.h,1.1,1.2 module.mk,1.11,1.12 singleton.h,1.1,1.2 system.h,1.45,1.46

Max Horn fingolfin at users.sourceforge.net
Sat Nov 1 18:19:09 CET 2003


Update of /cvsroot/scummvm/scummvm/common
In directory sc8-pr-cvs1:/tmp/cvs-serv15749/common

Modified Files:
	debugger.cpp debugger.h module.mk singleton.h system.h 
Log Message:
turned NewGui into a singleton, and made OSystem a pseudo-singleton; added Widget::findWidget (preparing to add support for nested widgets, for the tab widget)

Index: debugger.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/common/debugger.cpp,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- debugger.cpp	26 Oct 2003 21:30:40 -0000	1.1
+++ debugger.cpp	2 Nov 2003 02:18:13 -0000	1.2
@@ -33,7 +33,7 @@
 namespace Common {
 
 template <class T>
-Debugger<T>::Debugger(NewGui *gui) {
+Debugger<T>::Debugger() {
 	_frame_countdown = 0;
 	_dvar_count = 0;
 	_dcmd_count = 0;
@@ -41,7 +41,7 @@
 	_isAttached = false;
 	_errStr = NULL;
 	_firstTime = true;
-	_debuggerDialog = new ConsoleDialog(gui, 1.0, 0.67F);
+	_debuggerDialog = new ConsoleDialog(1.0, 0.67F);
 	_debuggerDialog->setInputCallback(debuggerInputCallback, this);
 	_debuggerDialog->setCompletionCallback(debuggerCompletionCallback, this);
 }

Index: debugger.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/common/debugger.h,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- debugger.h	26 Oct 2003 21:30:39 -0000	1.1
+++ debugger.h	2 Nov 2003 02:18:13 -0000	1.2
@@ -22,7 +22,6 @@
 #define COMMON_DEBUGGER_H
 
 class ConsoleDialog;
-class NewGui;
 
 namespace Common {
 
@@ -32,7 +31,7 @@
 template <class T>
 class Debugger {
 public:
-	Debugger(NewGui *gui);
+	Debugger();
 	virtual ~Debugger();
 	
 	int DebugPrintf(const char *format, ...);

Index: module.mk
===================================================================
RCS file: /cvsroot/scummvm/scummvm/common/module.mk,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -d -r1.11 -r1.12
--- module.mk	8 Oct 2003 21:59:22 -0000	1.11
+++ module.mk	2 Nov 2003 02:18:13 -0000	1.12
@@ -8,6 +8,7 @@
 	common/timer.o \
 	common/util.o \
 	common/savefile.o \
+	common/system.o \
 	common/scaler/2xsai.o \
 	common/scaler/aspect.o \
 	common/scaler/hq2x.o \

Index: singleton.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/common/singleton.h,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- singleton.h	8 Oct 2003 21:59:22 -0000	1.1
+++ singleton.h	2 Nov 2003 02:18:13 -0000	1.2
@@ -48,8 +48,8 @@
 	~Singleton<T>()		{ }
 
 private:
-	Singleton(const Singleton&);
-	Singleton& operator= (const Singleton&);
+	Singleton<T>(const Singleton<T>&);
+	Singleton<T>& operator= (const Singleton<T>&);
 }; 
 
 }	// End of namespace Common

Index: system.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/common/system.h,v
retrieving revision 1.45
retrieving revision 1.46
diff -u -d -r1.45 -r1.46
--- system.h	28 Sep 2003 21:08:47 -0000	1.45
+++ system.h	2 Nov 2003 02:18:13 -0000	1.46
@@ -38,6 +38,9 @@
  */
 class OSystem {
 public:
+	static OSystem *instance();
+
+public:
 	typedef struct Mutex *MutexRef;
 	typedef void (*SoundProc)(void *param, byte *buf, int len);
 	typedef int (*TimerProc)(int interval);





More information about the Scummvm-git-logs mailing list