[Scummvm-cvs-logs] CVS: scummvm/gui EditTextWidget.cpp,1.25,1.26 ListWidget.cpp,1.36,1.37 PopUpWidget.cpp,1.31,1.32 console.cpp,1.49,1.50 message.cpp,1.20,1.21 newgui.cpp,1.86,1.87

Max Horn fingolfin at users.sourceforge.net
Tue Sep 28 13:28:32 CEST 2004


Update of /cvsroot/scummvm/scummvm/gui
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv3612/gui

Modified Files:
	EditTextWidget.cpp ListWidget.cpp PopUpWidget.cpp console.cpp 
	message.cpp newgui.cpp 
Log Message:
Rename remaining OSystem methods to match our coding guidelines

Index: EditTextWidget.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/gui/EditTextWidget.cpp,v
retrieving revision 1.25
retrieving revision 1.26
diff -u -d -r1.25 -r1.26
--- EditTextWidget.cpp	5 Feb 2004 00:19:54 -0000	1.25
+++ EditTextWidget.cpp	28 Sep 2004 20:19:26 -0000	1.26
@@ -42,7 +42,7 @@
 }
 
 void EditTextWidget::handleTickle() {
-	uint32 time = g_system->get_msecs();
+	uint32 time = g_system->getMillis();
 	if (_caretTime < time) {
 		_caretTime = time + kCaretBlinkTime;
 		drawCaret(_caretVisible);

Index: ListWidget.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/gui/ListWidget.cpp,v
retrieving revision 1.36
retrieving revision 1.37
diff -u -d -r1.36 -r1.37
--- ListWidget.cpp	21 Jul 2004 14:28:57 -0000	1.36
+++ ListWidget.cpp	28 Sep 2004 20:19:26 -0000	1.37
@@ -88,7 +88,7 @@
 }
 
 void ListWidget::handleTickle() {
-	uint32 time = g_system->get_msecs();
+	uint32 time = g_system->getMillis();
 	if (_editMode && _caretTime < time) {
 		_caretTime = time + kCaretBlinkTime;
 		drawCaret(_caretVisible);
@@ -150,7 +150,7 @@
 		// Only works in a useful fashion if the list entries are sorted.
 		// TODO: Maybe this should be off by default, and instead we add a
 		// method "enableQuickSelect()" or so ?
-		uint32 time = g_system->get_msecs();
+		uint32 time = g_system->getMillis();
 		if (_quickSelectTime < time) {
 			_quickSelectStr = (char)ascii;
 		} else {

Index: PopUpWidget.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/gui/PopUpWidget.cpp,v
retrieving revision 1.31
retrieving revision 1.32
diff -u -d -r1.31 -r1.32
--- PopUpWidget.cpp	13 Mar 2004 13:03:25 -0000	1.31
+++ PopUpWidget.cpp	28 Sep 2004 20:19:26 -0000	1.32
@@ -102,7 +102,7 @@
 	_clickY = clickY - _y;
 
 	// Time the popup was opened
-	_openTime = g_system->get_msecs();
+	_openTime = g_system->getMillis();
 }
 
 void PopUpDialog::drawDialog() {
@@ -125,7 +125,7 @@
 	// Mouse was released. If it wasn't moved much since the original mouse down, 
 	// let the popup stay open. If it did move, assume the user made his selection.
 	int dist = (_clickX - x) * (_clickX - x) + (_clickY - y) * (_clickY - y);
-	if (dist > 3 * 3 || g_system->get_msecs() - _openTime > 300) {
+	if (dist > 3 * 3 || g_system->getMillis() - _openTime > 300) {
 		setResult(_selection);
 		close();
 	}

Index: console.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/gui/console.cpp,v
retrieving revision 1.49
retrieving revision 1.50
diff -u -d -r1.49 -r1.50
--- console.cpp	15 Aug 2004 14:39:35 -0000	1.49
+++ console.cpp	28 Sep 2004 20:19:26 -0000	1.50
@@ -139,7 +139,7 @@
 }
 
 void ConsoleDialog::handleTickle() {
-	uint32 time = g_system->get_msecs();
+	uint32 time = g_system->getMillis();
 	if (_caretTime < time) {
 		_caretTime = time + kCaretBlinkTime;
 		drawCaret(_caretVisible);

Index: message.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/gui/message.cpp,v
retrieving revision 1.20
retrieving revision 1.21
diff -u -d -r1.20 -r1.21
--- message.cpp	11 Aug 2004 21:49:57 -0000	1.20
+++ message.cpp	28 Sep 2004 20:19:26 -0000	1.21
@@ -156,12 +156,12 @@
 
 TimedMessageDialog::TimedMessageDialog(const Common::String &message, uint32 duration)
 	: MessageDialog(message, 0, 0) {
-	_timer = g_system->get_msecs() + duration;
+	_timer = g_system->getMillis() + duration;
 }
 
 void TimedMessageDialog::handleTickle() {
 	MessageDialog::handleTickle();
-	if (g_system->get_msecs() > _timer)
+	if (g_system->getMillis() > _timer)
 		close();
 }
 

Index: newgui.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/gui/newgui.cpp,v
retrieving revision 1.86
retrieving revision 1.87
diff -u -d -r1.86 -r1.87
--- newgui.cpp	15 Aug 2004 13:49:13 -0000	1.86
+++ newgui.cpp	28 Sep 2004 20:19:26 -0000	1.87
@@ -107,9 +107,9 @@
 		_system->updateScreen();		
 
 		OSystem::Event event;
-		uint32 time = _system->get_msecs();
+		uint32 time = _system->getMillis();
 
-		while (_system->poll_event(&event)) {
+		while (_system->pollEvent(event)) {
 			switch (event.event_code) {
 			case OSystem::EVENT_KEYDOWN:
 #if !defined(__PALM_OS__)
@@ -177,7 +177,7 @@
 		}
 
 		// Delay for a moment
-		_system->delay_msecs(10);
+		_system->delayMillis(10);
 	}
 	
 	if (didSaveState)
@@ -413,7 +413,7 @@
 // We could plug in a different cursor here if we like to.
 //
 void NewGui::animateCursor() {
-	int time = _system->get_msecs(); 
+	int time = _system->getMillis(); 
 	if (time > _cursorAnimateTimer + kCursorAnimateDelay) {
 		const byte colors[4] = { 15, 15, 7, 8 };
 		const byte color = colors[_cursorAnimateCounter];





More information about the Scummvm-git-logs mailing list