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 0bdff1530a11888b825a7bf4d13be7b484168703..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()
@@
-475,13
+479,13
@@
void TapeErase()
tape.pos[tape.counter].delay = 0;
tape.changed = TRUE;
tape.pos[tape.counter].delay = 0;
tape.changed = TRUE;
- tape.random_seed = InitRND(
NEW_RANDOMIZE
);
+ tape.random_seed = InitRND(
level.random_seed
);
tape.file_version = FILE_VERSION_ACTUAL;
tape.game_version = GAME_VERSION_ACTUAL;
tape.engine_version = level.game_version;
tape.file_version = FILE_VERSION_ACTUAL;
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;
@@
-538,7
+542,7
@@
void TapeStartRecording(long random_seed)
static void TapeStartGameRecording()
{
static void TapeStartGameRecording()
{
- TapeStartRecording(
NEW_RANDOMIZE
);
+ TapeStartRecording(
level.random_seed
);
#if defined(NETWORK_AVALIABLE)
if (options.network)
#if defined(NETWORK_AVALIABLE)
if (options.network)
@@
-562,10
+566,14
@@
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);
+
+#if 1
+ UpdateAndDisplayGameControlValues();
+#endif
}
void TapeHaltRecording()
}
void TapeHaltRecording()
@@
-1239,6
+1247,7
@@
void CreateTapeButtons()
GDI_STATE, GD_BUTTON_UNPRESSED,
GDI_DESIGN_UNPRESSED, gd_bitmap, gd_x1, gd_y,
GDI_DESIGN_PRESSED, gd_bitmap, gd_x2, gd_y,
GDI_STATE, GD_BUTTON_UNPRESSED,
GDI_DESIGN_UNPRESSED, gd_bitmap, gd_x1, gd_y,
GDI_DESIGN_PRESSED, gd_bitmap, gd_x2, gd_y,
+ GDI_DIRECT_DRAW, FALSE,
GDI_EVENT_MASK, GD_EVENT_RELEASED,
GDI_CALLBACK_ACTION, HandleTapeButtons,
GDI_END);
GDI_EVENT_MASK, GD_EVENT_RELEASED,
GDI_CALLBACK_ACTION, HandleTapeButtons,
GDI_END);