[Scummvm-cvs-logs] SF.net SVN: scummvm:[36012] scummvm/trunk/backends/platform/ds/arm9/source

fingolfin at users.sourceforge.net fingolfin at users.sourceforge.net
Fri Jan 23 04:23:30 CET 2009


Revision: 36012
          http://scummvm.svn.sourceforge.net/scummvm/?rev=36012&view=rev
Author:   fingolfin
Date:     2009-01-23 03:23:30 +0000 (Fri, 23 Jan 2009)

Log Message:
-----------
DS: Nothing is supposed to use time(), so don't globally include <time.h> -- in particular, no need to fake a time() impl if the only code using it is the backend itself ;)

Modified Paths:
--------------
    scummvm/trunk/backends/platform/ds/arm9/source/osystem_ds.cpp
    scummvm/trunk/backends/platform/ds/arm9/source/portdefs.cpp
    scummvm/trunk/backends/platform/ds/arm9/source/portdefs.h

Modified: scummvm/trunk/backends/platform/ds/arm9/source/osystem_ds.cpp
===================================================================
--- scummvm/trunk/backends/platform/ds/arm9/source/osystem_ds.cpp	2009-01-23 03:06:21 UTC (rev 36011)
+++ scummvm/trunk/backends/platform/ds/arm9/source/osystem_ds.cpp	2009-01-23 03:23:30 UTC (rev 36012)
@@ -38,6 +38,9 @@
 #include "touchkeyboard.h"
 #include "backends/fs/ds/ds-fs-factory.h"
 
+#include <time.h>
+
+
 OSystem_DS* OSystem_DS::_instance = NULL;
 
 OSystem_DS::OSystem_DS()
@@ -545,8 +548,14 @@
 	DS::addEventsToQueue();
 }
 
+
 void OSystem_DS::getTimeAndDate(struct tm &t) const {
-	time_t curTime = time(0);
+	time_t curTime;
+#if 0
+	curTime = time(0);
+#else
+	curTime = 0xABCD1234 + getMillis() / 1000;
+#endif
 	t = *localtime(&curTime);
 }
 

Modified: scummvm/trunk/backends/platform/ds/arm9/source/portdefs.cpp
===================================================================
--- scummvm/trunk/backends/platform/ds/arm9/source/portdefs.cpp	2009-01-23 03:06:21 UTC (rev 36011)
+++ scummvm/trunk/backends/platform/ds/arm9/source/portdefs.cpp	2009-01-23 03:23:30 UTC (rev 36012)
@@ -33,24 +33,3 @@
 	return OSystem_DS::instance()->getMillis() / 1000;
 }
 */
-
-
-
-time_t DS_time(time_t) {
-	if (OSystem_DS::instance()) {
-		return 0xABCD1234 + (OSystem_DS::instance()->getMillis() / 1000);
-	} else {
-		return 0xABCD1234;
-	}
-}
-
-time_t DS_time(long* t) {
-	if (OSystem_DS::instance()) {
-		if (t) *t = 0xABCD1234 + (OSystem_DS::instance()->getMillis() / 1000);
-		return 0xABCD1234 + (OSystem_DS::instance()->getMillis() / 1000);
-	} else {
-		if (t) *t = 0xABCD1234;
-		return 0xABCD1234;
-	}
-}
-

Modified: scummvm/trunk/backends/platform/ds/arm9/source/portdefs.h
===================================================================
--- scummvm/trunk/backends/platform/ds/arm9/source/portdefs.h	2009-01-23 03:06:21 UTC (rev 36011)
+++ scummvm/trunk/backends/platform/ds/arm9/source/portdefs.h	2009-01-23 03:23:30 UTC (rev 36012)
@@ -38,7 +38,6 @@
 
 #include "nds/jtypes.h"
 
-
 // Somebody removed these from scummsys.h, but they're still required, so I'm adding them here
 // in the hope that they'll stay.
 #include <stdio.h>
@@ -47,7 +46,6 @@
 #include <stdarg.h>
 #include <ctype.h>
 #include <math.h>
-#include <time.h>
 
 #define double float
 
@@ -76,8 +74,6 @@
 
 //#define debug(fmt, ...) consolePrintf(fmt, ##__VA_ARGS__)
 //#define debug(fmt, ...) debug(0, fmt, ##__VA_ARGS__)
-#define time(t) DS_time(t)
-//#define memcpy(dest, src, size) DS_memcpy(dest, src, size)
 
 #define ITCM_DATA	__attribute__((section(".itcm")))
 
@@ -86,11 +82,4 @@
 // a more conventional form of input where the menus can be clicked on.
 #define LURE_CLICKABLE_MENUS
 
-//#include "common/array.h"
-//#include "common/str.h"
-
-time_t DS_time(time_t* t);
-time_t DS_time(long* t);
-void* DS_memcpy(void* s1, void const* s2, size_t n);
-
 #endif


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