[Scummvm-cvs-logs] scummvm master -> 1b1b1d6615c4555e133a59c2c221bae65853c1f2
lordhoto
lordhoto at gmail.com
Mon Jun 18 02:17:29 CEST 2012
This automated email contains information about 4 new commits which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
b2f5721e58 COMMON: Add tm_wday to our TimeDate struct
6d4f2753cf SCUMM: Implement football2002's getDayOfWeek() u32 function
249d48f77b BACKENDS: Add #error for platforms not setting tm_wday in release builds
1b1b1d6615 Merge pull request #244 from clone2727/football2002-wday
Commit: b2f5721e58e94b918c5b7032e315396f4fb6c51d
https://github.com/scummvm/scummvm/commit/b2f5721e58e94b918c5b7032e315396f4fb6c51d
Author: Matthew Hoops (clone2727 at gmail.com)
Date: 2012-06-09T17:21:48-07:00
Commit Message:
COMMON: Add tm_wday to our TimeDate struct
Did not adapt bada or ps2 backends as I'm not sure how they should be handled
Changed paths:
backends/platform/android/android.cpp
backends/platform/bada/system.cpp
backends/platform/dc/dcmain.cpp
backends/platform/ds/arm9/source/osystem_ds.cpp
backends/platform/iphone/osys_main.cpp
backends/platform/n64/osys_n64_base.cpp
backends/platform/ps2/ps2time.cpp
backends/platform/psp/osys_psp.cpp
backends/platform/sdl/sdl.cpp
backends/platform/wii/osystem.cpp
backends/platform/wince/wince-sdl.cpp
common/system.h
diff --git a/backends/platform/android/android.cpp b/backends/platform/android/android.cpp
index 902599d..0b31ee7 100644
--- a/backends/platform/android/android.cpp
+++ b/backends/platform/android/android.cpp
@@ -554,6 +554,7 @@ void OSystem_Android::getTimeAndDate(TimeDate &td) const {
td.tm_mday = tm.tm_mday;
td.tm_mon = tm.tm_mon;
td.tm_year = tm.tm_year;
+ td.tm_wday = tm.tm_wday;
}
void OSystem_Android::addSysArchivesToSearchSet(Common::SearchSet &s,
diff --git a/backends/platform/bada/system.cpp b/backends/platform/bada/system.cpp
index d284688..29ce954 100644
--- a/backends/platform/bada/system.cpp
+++ b/backends/platform/bada/system.cpp
@@ -399,6 +399,7 @@ void BadaSystem::getTimeAndDate(TimeDate &td) const {
td.tm_mday = currentTime.GetDay();
td.tm_mon = currentTime.GetMonth();
td.tm_year = currentTime.GetYear();
+ td.tm_wday = 0; // FIXME
}
}
diff --git a/backends/platform/dc/dcmain.cpp b/backends/platform/dc/dcmain.cpp
index 3e3279f..bec1fda 100644
--- a/backends/platform/dc/dcmain.cpp
+++ b/backends/platform/dc/dcmain.cpp
@@ -213,6 +213,7 @@ void OSystem_Dreamcast::getTimeAndDate(TimeDate &td) const {
td.tm_mday = t.tm_mday;
td.tm_mon = t.tm_mon;
td.tm_year = t.tm_year;
+ td.tm_wday = t.tm_wday;
}
Common::SeekableReadStream *OSystem_Dreamcast::createConfigReadStream() {
diff --git a/backends/platform/ds/arm9/source/osystem_ds.cpp b/backends/platform/ds/arm9/source/osystem_ds.cpp
index a6b85f2..b72d959 100644
--- a/backends/platform/ds/arm9/source/osystem_ds.cpp
+++ b/backends/platform/ds/arm9/source/osystem_ds.cpp
@@ -690,6 +690,7 @@ void OSystem_DS::getTimeAndDate(TimeDate &td) const {
td.tm_mday = t.tm_mday;
td.tm_mon = t.tm_mon;
td.tm_year = t.tm_year;
+ td.tm_wday = t.tm_wday;
}
FilesystemFactory *OSystem_DS::getFilesystemFactory() {
diff --git a/backends/platform/iphone/osys_main.cpp b/backends/platform/iphone/osys_main.cpp
index 6935399..f9b2a81 100644
--- a/backends/platform/iphone/osys_main.cpp
+++ b/backends/platform/iphone/osys_main.cpp
@@ -235,6 +235,7 @@ void OSystem_IPHONE::getTimeAndDate(TimeDate &td) const {
td.tm_mday = t.tm_mday;
td.tm_mon = t.tm_mon;
td.tm_year = t.tm_year;
+ td.tm_wday = t.tm_wday;
}
Audio::Mixer *OSystem_IPHONE::getMixer() {
diff --git a/backends/platform/n64/osys_n64_base.cpp b/backends/platform/n64/osys_n64_base.cpp
index f36f739..d10682f 100644
--- a/backends/platform/n64/osys_n64_base.cpp
+++ b/backends/platform/n64/osys_n64_base.cpp
@@ -866,6 +866,7 @@ void OSystem_N64::getTimeAndDate(TimeDate &t) const {
t.tm_mday = 1;
t.tm_mon = 0;
t.tm_year = 110;
+ t.tm_wday = 0;
return;
}
diff --git a/backends/platform/ps2/ps2time.cpp b/backends/platform/ps2/ps2time.cpp
index 2c3275b..c8da0f4 100644
--- a/backends/platform/ps2/ps2time.cpp
+++ b/backends/platform/ps2/ps2time.cpp
@@ -120,4 +120,5 @@ void OSystem_PS2::getTimeAndDate(TimeDate &t) const {
t.tm_year = g_year + 100;
t.tm_mday = g_day;
t.tm_mon = g_month - 1;
+ t.tm_wday = 0; // FIXME
}
diff --git a/backends/platform/psp/osys_psp.cpp b/backends/platform/psp/osys_psp.cpp
index 958a3a2..510b4ea 100644
--- a/backends/platform/psp/osys_psp.cpp
+++ b/backends/platform/psp/osys_psp.cpp
@@ -446,6 +446,7 @@ void OSystem_PSP::getTimeAndDate(TimeDate &td) const {
td.tm_mday = t.tm_mday;
td.tm_mon = t.tm_mon;
td.tm_year = t.tm_year;
+ td.tm_wday = t.tm_wday;
}
Common::String OSystem_PSP::getDefaultConfigFileName() {
diff --git a/backends/platform/sdl/sdl.cpp b/backends/platform/sdl/sdl.cpp
index 8dff5ce..d548543 100644
--- a/backends/platform/sdl/sdl.cpp
+++ b/backends/platform/sdl/sdl.cpp
@@ -486,6 +486,7 @@ void OSystem_SDL::getTimeAndDate(TimeDate &td) const {
td.tm_mday = t.tm_mday;
td.tm_mon = t.tm_mon;
td.tm_year = t.tm_year;
+ td.tm_wday = t.tm_wday;
}
Audio::Mixer *OSystem_SDL::getMixer() {
diff --git a/backends/platform/wii/osystem.cpp b/backends/platform/wii/osystem.cpp
index 258a782..6816755 100644
--- a/backends/platform/wii/osystem.cpp
+++ b/backends/platform/wii/osystem.cpp
@@ -269,6 +269,7 @@ void OSystem_Wii::getTimeAndDate(TimeDate &td) const {
td.tm_mday = t.tm_mday;
td.tm_mon = t.tm_mon;
td.tm_year = t.tm_year;
+ td.tm_wday = t.tm_wday;
}
void OSystem_Wii::showOptionsDialog() {
diff --git a/backends/platform/wince/wince-sdl.cpp b/backends/platform/wince/wince-sdl.cpp
index a57fcb9..3897731 100644
--- a/backends/platform/wince/wince-sdl.cpp
+++ b/backends/platform/wince/wince-sdl.cpp
@@ -622,6 +622,7 @@ void OSystem_WINCE3::getTimeAndDate(TimeDate &t) const {
t.tm_hour = systime.wHour;
t.tm_min = systime.wMinute;
t.tm_sec = systime.wSecond;
+ t.tm_wday = systime.wDayOfWeek;
}
Common::String OSystem_WINCE3::getSystemLanguage() const {
diff --git a/common/system.h b/common/system.h
index 976a3d2..b57d200 100644
--- a/common/system.h
+++ b/common/system.h
@@ -78,6 +78,7 @@ struct TimeDate {
int tm_mday; ///< day of month (1 - 31)
int tm_mon; ///< month of year (0 - 11)
int tm_year; ///< year - 1900
+ int tm_wday; ///< days since Sunday (0 - 6)
};
namespace LogMessageType {
Commit: 6d4f2753cfa0da81a7ca17054d193fc8c10cb401
https://github.com/scummvm/scummvm/commit/6d4f2753cfa0da81a7ca17054d193fc8c10cb401
Author: Matthew Hoops (clone2727 at gmail.com)
Date: 2012-06-09T17:22:14-07:00
Commit Message:
SCUMM: Implement football2002's getDayOfWeek() u32 function
Changed paths:
engines/scumm/he/logic/football.cpp
diff --git a/engines/scumm/he/logic/football.cpp b/engines/scumm/he/logic/football.cpp
index f67e07c..b405d63 100644
--- a/engines/scumm/he/logic/football.cpp
+++ b/engines/scumm/he/logic/football.cpp
@@ -348,7 +348,12 @@ int LogicHEfootball2002::translateScreenToWorld(int32 *args) {
}
int LogicHEfootball2002::getDayOfWeek() {
- // TODO: Get day of week, store in var 108
+ // Get day of week, store in var 108
+
+ TimeDate time;
+ _vm->_system->getTimeAndDate(time);
+ writeScummVar(108, time.tm_wday);
+
return 1;
}
Commit: 249d48f77b395d82b8f2bb67360c5539212f5bc4
https://github.com/scummvm/scummvm/commit/249d48f77b395d82b8f2bb67360c5539212f5bc4
Author: Matthew Hoops (clone2727 at gmail.com)
Date: 2012-06-10T11:53:26-07:00
Commit Message:
BACKENDS: Add #error for platforms not setting tm_wday in release builds
Changed paths:
backends/platform/bada/system.cpp
backends/platform/ps2/ps2time.cpp
diff --git a/backends/platform/bada/system.cpp b/backends/platform/bada/system.cpp
index 29ce954..816a675 100644
--- a/backends/platform/bada/system.cpp
+++ b/backends/platform/bada/system.cpp
@@ -399,7 +399,11 @@ void BadaSystem::getTimeAndDate(TimeDate &td) const {
td.tm_mday = currentTime.GetDay();
td.tm_mon = currentTime.GetMonth();
td.tm_year = currentTime.GetYear();
+#ifdef RELEASE_BUILD
+ #error getTimeAndDate() is not setting the day of the week
+#else
td.tm_wday = 0; // FIXME
+#endif
}
}
diff --git a/backends/platform/ps2/ps2time.cpp b/backends/platform/ps2/ps2time.cpp
index c8da0f4..decfc55 100644
--- a/backends/platform/ps2/ps2time.cpp
+++ b/backends/platform/ps2/ps2time.cpp
@@ -120,5 +120,9 @@ void OSystem_PS2::getTimeAndDate(TimeDate &t) const {
t.tm_year = g_year + 100;
t.tm_mday = g_day;
t.tm_mon = g_month - 1;
+#ifdef RELEASE_BUILD
+ #error getTimeAndDate() is not setting the day of the week
+#else
t.tm_wday = 0; // FIXME
+#endif
}
Commit: 1b1b1d6615c4555e133a59c2c221bae65853c1f2
https://github.com/scummvm/scummvm/commit/1b1b1d6615c4555e133a59c2c221bae65853c1f2
Author: Johannes Schickel (lordhoto at gmail.com)
Date: 2012-06-17T17:17:06-07:00
Commit Message:
Merge pull request #244 from clone2727/football2002-wday
COMMON: Add tm_wday to our TimeDate struct
Changed paths:
backends/platform/android/android.cpp
backends/platform/bada/system.cpp
backends/platform/dc/dcmain.cpp
backends/platform/ds/arm9/source/osystem_ds.cpp
backends/platform/iphone/osys_main.cpp
backends/platform/n64/osys_n64_base.cpp
backends/platform/ps2/ps2time.cpp
backends/platform/psp/osys_psp.cpp
backends/platform/sdl/sdl.cpp
backends/platform/wii/osystem.cpp
backends/platform/wince/wince-sdl.cpp
common/system.h
engines/scumm/he/logic/football.cpp
More information about the Scummvm-git-logs
mailing list