[Scummvm-cvs-logs] SF.net SVN: scummvm:[50095] scummvm/branches/gsoc2010-opengl/backends
vgvgf at users.sourceforge.net
vgvgf at users.sourceforge.net
Sun Jun 20 22:11:30 CEST 2010
Revision: 50095
http://scummvm.svn.sourceforge.net/scummvm/?rev=50095&view=rev
Author: vgvgf
Date: 2010-06-20 20:11:30 +0000 (Sun, 20 Jun 2010)
Log Message:
-----------
Removed getMillis, delayMillis and getTimeAndDate functions from TimerManager.
Modified Paths:
--------------
scummvm/branches/gsoc2010-opengl/backends/modular-backend.cpp
scummvm/branches/gsoc2010-opengl/backends/modular-backend.h
scummvm/branches/gsoc2010-opengl/backends/platform/sdl/sdl.cpp
scummvm/branches/gsoc2010-opengl/backends/platform/sdl/sdl.h
scummvm/branches/gsoc2010-opengl/backends/timer/default/default-timer.h
scummvm/branches/gsoc2010-opengl/backends/timer/sdl/sdl-timer.cpp
scummvm/branches/gsoc2010-opengl/backends/timer/sdl/sdl-timer.h
Modified: scummvm/branches/gsoc2010-opengl/backends/modular-backend.cpp
===================================================================
--- scummvm/branches/gsoc2010-opengl/backends/modular-backend.cpp 2010-06-20 20:09:07 UTC (rev 50094)
+++ scummvm/branches/gsoc2010-opengl/backends/modular-backend.cpp 2010-06-20 20:11:30 UTC (rev 50095)
@@ -209,21 +209,6 @@
_graphicsManager->disableCursorPalette(disable);
}
-uint32 ModularBackend::getMillis() {
- assert(_timerManager);
- return _timerManager->getMillis();
-}
-
-void ModularBackend::delayMillis(uint msecs) {
- assert(_timerManager);
- _timerManager->delayMillis(msecs);
-}
-
-void ModularBackend::getTimeAndDate(TimeDate &t) const {
- assert(_timerManager);
- return _timerManager->getTimeAndDate(t);
-}
-
Common::TimerManager *ModularBackend::getTimerManager() {
assert(_timerManager);
return _timerManager;
Modified: scummvm/branches/gsoc2010-opengl/backends/modular-backend.h
===================================================================
--- scummvm/branches/gsoc2010-opengl/backends/modular-backend.h 2010-06-20 20:09:07 UTC (rev 50094)
+++ scummvm/branches/gsoc2010-opengl/backends/modular-backend.h 2010-06-20 20:11:30 UTC (rev 50095)
@@ -85,9 +85,6 @@
virtual void setCursorPalette(const byte *colors, uint start, uint num);
virtual void disableCursorPalette(bool disable);
- virtual uint32 getMillis();
- virtual void delayMillis(uint msecs);
- virtual void getTimeAndDate(TimeDate &t) const;
virtual Common::TimerManager *getTimerManager();
virtual Common::EventManager *getEventManager();
virtual Common::HardwareKeySet *getHardwareKeySet() { return 0; }
Modified: scummvm/branches/gsoc2010-opengl/backends/platform/sdl/sdl.cpp
===================================================================
--- scummvm/branches/gsoc2010-opengl/backends/platform/sdl/sdl.cpp 2010-06-20 20:09:07 UTC (rev 50094)
+++ scummvm/branches/gsoc2010-opengl/backends/platform/sdl/sdl.cpp 2010-06-20 20:11:30 UTC (rev 50095)
@@ -34,6 +34,7 @@
#include "common/config-manager.h"
#include "common/debug.h"
#include "common/util.h"
+#include "common/EventRecorder.h"
#ifdef UNIX
#include "backends/saves/posix/posix-saves.h"
@@ -75,6 +76,7 @@
#include "CoreFoundation/CoreFoundation.h"
#endif
+#include <time.h>
void OSystem_SDL::initBackend() {
assert(!_inited);
@@ -384,3 +386,24 @@
assert(_eventManager);
return ((SdlEventManager *)_eventManager)->pollSdlEvent(event);
}
+
+uint32 OSystem_SDL::getMillis() {
+ uint32 millis = SDL_GetTicks();
+ g_eventRec.processMillis(millis);
+ return millis;
+}
+
+void OSystem_SDL::delayMillis(uint msecs) {
+ SDL_Delay(msecs);
+}
+
+void OSystem_SDL::getTimeAndDate(TimeDate &td) const {
+ time_t curTime = time(0);
+ struct tm t = *localtime(&curTime);
+ td.tm_sec = t.tm_sec;
+ td.tm_min = t.tm_min;
+ td.tm_hour = t.tm_hour;
+ td.tm_mday = t.tm_mday;
+ td.tm_mon = t.tm_mon;
+ td.tm_year = t.tm_year;
+}
Modified: scummvm/branches/gsoc2010-opengl/backends/platform/sdl/sdl.h
===================================================================
--- scummvm/branches/gsoc2010-opengl/backends/platform/sdl/sdl.h 2010-06-20 20:09:07 UTC (rev 50094)
+++ scummvm/branches/gsoc2010-opengl/backends/platform/sdl/sdl.h 2010-06-20 20:11:30 UTC (rev 50095)
@@ -60,6 +60,10 @@
virtual bool pollEvent(Common::Event &event);
+ uint32 getMillis();
+ void delayMillis(uint msecs);
+ void getTimeAndDate(TimeDate &td) const;
+
protected:
bool _inited;
Modified: scummvm/branches/gsoc2010-opengl/backends/timer/default/default-timer.h
===================================================================
--- scummvm/branches/gsoc2010-opengl/backends/timer/default/default-timer.h 2010-06-20 20:09:07 UTC (rev 50094)
+++ scummvm/branches/gsoc2010-opengl/backends/timer/default/default-timer.h 2010-06-20 20:11:30 UTC (rev 50095)
@@ -48,10 +48,6 @@
* Timer callback, to be invoked at regular time intervals by the backend.
*/
void handler();
-
- virtual uint32 getMillis() { return 0; }
- virtual void delayMillis(uint msecs) {}
- virtual void getTimeAndDate(TimeDate &t) const {}
};
#endif
Modified: scummvm/branches/gsoc2010-opengl/backends/timer/sdl/sdl-timer.cpp
===================================================================
--- scummvm/branches/gsoc2010-opengl/backends/timer/sdl/sdl-timer.cpp 2010-06-20 20:09:07 UTC (rev 50094)
+++ scummvm/branches/gsoc2010-opengl/backends/timer/sdl/sdl-timer.cpp 2010-06-20 20:11:30 UTC (rev 50095)
@@ -27,8 +27,6 @@
#if defined(WIN32) || defined(UNIX) || defined(MACOSX)
#include "backends/timer/sdl/sdl-timer.h"
-#include "common/EventRecorder.h"
-#include <time.h>
static Uint32 timer_handler(Uint32 interval, void *param) {
((DefaultTimerManager *)param)->handler();
@@ -47,25 +45,4 @@
SDL_RemoveTimer(_timerID);
}
-uint32 SdlTimerManager::getMillis() {
- uint32 millis = SDL_GetTicks();
- g_eventRec.processMillis(millis);
- return millis;
-}
-
-void SdlTimerManager::delayMillis(uint msecs) {
- SDL_Delay(msecs);
-}
-
-void SdlTimerManager::getTimeAndDate(TimeDate &td) const {
- time_t curTime = time(0);
- struct tm t = *localtime(&curTime);
- td.tm_sec = t.tm_sec;
- td.tm_min = t.tm_min;
- td.tm_hour = t.tm_hour;
- td.tm_mday = t.tm_mday;
- td.tm_mon = t.tm_mon;
- td.tm_year = t.tm_year;
-}
-
#endif
Modified: scummvm/branches/gsoc2010-opengl/backends/timer/sdl/sdl-timer.h
===================================================================
--- scummvm/branches/gsoc2010-opengl/backends/timer/sdl/sdl-timer.h 2010-06-20 20:09:07 UTC (rev 50094)
+++ scummvm/branches/gsoc2010-opengl/backends/timer/sdl/sdl-timer.h 2010-06-20 20:11:30 UTC (rev 50095)
@@ -39,10 +39,6 @@
SdlTimerManager();
~SdlTimerManager();
- uint32 getMillis();
- void delayMillis(uint msecs);
- void getTimeAndDate(TimeDate &t) const;
-
protected:
SDL_TimerID _timerID;
};
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