projects
/
rocksndiamonds.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
rnd-20100309-1-src
[rocksndiamonds.git]
/
src
/
tape.c
diff --git
a/src/tape.c
b/src/tape.c
index 49f06aa32272c5f77c13e0de6584d78411a23561..88f0f5a0300e4e0799ff9abf40cda0e138d3fd51 100644
(file)
--- a/
src/tape.c
+++ b/
src/tape.c
@@
-453,12
+453,16
@@
void TapeDeactivateDisplayOff(boolean redraw_display)
/* tape control functions */
/* ========================================================================= */
/* tape control functions */
/* ========================================================================= */
-
static void TapeSetDate(
)
+
void TapeSetDateFromEpochSeconds(time_t epoch_seconds
)
{
{
- time_t epoch_seconds = time(NULL);
- struct tm *now = localtime(&epoch_seconds);
+ struct tm *lt = localtime(&epoch_seconds);
- tape.date = 10000 * (now->tm_year % 100) + 100 * now->tm_mon + now->tm_mday;
+ tape.date = 10000 * (lt->tm_year % 100) + 100 * lt->tm_mon + lt->tm_mday;
+}
+
+void TapeSetDateFromNow()
+{
+ TapeSetDateFromEpochSeconds(time(NULL));
}
void TapeErase()
}
void TapeErase()
@@
-481,7
+485,7
@@
void TapeErase()
tape.game_version = GAME_VERSION_ACTUAL;
tape.engine_version = level.game_version;
tape.game_version = GAME_VERSION_ACTUAL;
tape.engine_version = level.game_version;
- TapeSetDate();
+ TapeSetDate
FromNow
();
for (i = 0; i < MAX_PLAYERS; i++)
tape.player_participates[i] = FALSE;
for (i = 0; i < MAX_PLAYERS; i++)
tape.player_participates[i] = FALSE;
@@
-562,7
+566,7
@@
static void TapeAppendRecording()
tape.recording = TRUE;
tape.changed = TRUE;
tape.recording = TRUE;
tape.changed = TRUE;
- TapeSetDate();
+ TapeSetDate
FromNow
();
DrawVideoDisplay(VIDEO_STATE_DATE_ON, tape.date);
DrawVideoDisplay(VIDEO_STATE_PLAY_OFF | VIDEO_STATE_REC_ON, 0);
DrawVideoDisplay(VIDEO_STATE_DATE_ON, tape.date);
DrawVideoDisplay(VIDEO_STATE_PLAY_OFF | VIDEO_STATE_REC_ON, 0);