mirror of
git://git.tartarus.org/simon/puzzles.git
synced 2025-04-21 08:01:30 -07:00
Add a jumble' key (
J') to Net, which scrambles the positions of all unlocked
tiles randomly. (Rachel asked for this; it's been being tested for a good few months now, and Simon didn't care either way, so in it goes :) As part of this, the front end can now be asked to provide a random random seed (IYSWIM). [originally from svn r5019]
This commit is contained in:
12
windows.c
12
windows.c
@ -121,6 +121,14 @@ void fatal(char *fmt, ...)
|
||||
exit(1);
|
||||
}
|
||||
|
||||
void get_random_seed(void **randseed, int *randseedsize)
|
||||
{
|
||||
time_t *tp = snew(time_t);
|
||||
time(tp);
|
||||
*randseed = (void *)tp;
|
||||
*randseedsize = sizeof(time_t);
|
||||
}
|
||||
|
||||
void status_bar(frontend *fe, char *text)
|
||||
{
|
||||
SetWindowText(fe->statusbar, text);
|
||||
@ -352,12 +360,10 @@ static frontend *new_window(HINSTANCE inst, char *game_id, char **error)
|
||||
int x, y;
|
||||
RECT r, sr;
|
||||
HDC hdc;
|
||||
time_t t;
|
||||
|
||||
fe = snew(frontend);
|
||||
|
||||
time(&t);
|
||||
fe->me = midend_new(fe, &t, sizeof(t));
|
||||
fe->me = midend_new(fe);
|
||||
|
||||
if (game_id) {
|
||||
*error = midend_game_id(fe->me, game_id, FALSE);
|
||||
|
Reference in New Issue
Block a user