Skip to content

Commit baef483

Browse files
committed
vita: add timelimit option to launcher
1 parent dbf8c52 commit baef483

File tree

3 files changed

+8
-2
lines changed

3 files changed

+8
-2
lines changed

vita/launcher/files.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -199,6 +199,9 @@ static void WriteResponseFile(int game, const char *fname)
199199
if (g->skill)
200200
fprintf(f, "-skill %d\n", g->skill);
201201

202+
if (g->timer)
203+
fprintf(f, "-timer %d\n", g->timer);
204+
202205
if (g->warp)
203206
{
204207
if (game < GAME_DOOM2 || game == GAME_HERETIC || game == GAME_HERETIC_SW)

vita/launcher/files.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,7 @@ struct Game
5757
int warp;
5858
char monsters[2];
5959
int record;
60+
int timer;
6061
int charclass;
6162
};
6263

vita/launcher/ui_misc.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ static struct Option misc_opts[] =
3030
{ OPT_BOOLEAN, "Record demo" },
3131
{ OPT_INTEGER, "Skill", .inum = { 0, 5, 1, 0 } },
3232
{ OPT_INTEGER, "Starting map", .inum = { 0, 99, 1, 0 } },
33+
{ OPT_INTEGER, "Time limit (min)", .inum = { 0, 120, 1, 0 } },
3334
// hexen only
3435
{
3536
OPT_INTEGER,
@@ -73,8 +74,9 @@ void UI_MenuMisc_Reload(void)
7374
misc_opts[1].codevar = &fs_games[ui_game].record;
7475
misc_opts[2].codevar = &fs_games[ui_game].skill;
7576
misc_opts[3].codevar = &fs_games[ui_game].warp;
76-
misc_opts[4].codevar = &fs_games[ui_game].charclass;
77+
misc_opts[4].codevar = &fs_games[ui_game].timer;
78+
misc_opts[5].codevar = &fs_games[ui_game].charclass;
7779

7880
self->opts = misc_opts;
79-
self->numopts = 4 + (ui_game == GAME_HEXEN);
81+
self->numopts = 5 + (ui_game == GAME_HEXEN);
8082
}

0 commit comments

Comments
 (0)