Skip to content

Commit

Permalink
vita: add timelimit option to launcher
Browse files Browse the repository at this point in the history
  • Loading branch information
fgsfdsfgs committed Apr 15, 2018
1 parent dbf8c52 commit baef483
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 2 deletions.
3 changes: 3 additions & 0 deletions vita/launcher/files.c
Expand Up @@ -199,6 +199,9 @@ static void WriteResponseFile(int game, const char *fname)
if (g->skill)
fprintf(f, "-skill %d\n", g->skill);

if (g->timer)
fprintf(f, "-timer %d\n", g->timer);

if (g->warp)
{
if (game < GAME_DOOM2 || game == GAME_HERETIC || game == GAME_HERETIC_SW)
Expand Down
1 change: 1 addition & 0 deletions vita/launcher/files.h
Expand Up @@ -57,6 +57,7 @@ struct Game
int warp;
char monsters[2];
int record;
int timer;
int charclass;
};

Expand Down
6 changes: 4 additions & 2 deletions vita/launcher/ui_misc.c
Expand Up @@ -30,6 +30,7 @@ static struct Option misc_opts[] =
{ OPT_BOOLEAN, "Record demo" },
{ OPT_INTEGER, "Skill", .inum = { 0, 5, 1, 0 } },
{ OPT_INTEGER, "Starting map", .inum = { 0, 99, 1, 0 } },
{ OPT_INTEGER, "Time limit (min)", .inum = { 0, 120, 1, 0 } },
// hexen only
{
OPT_INTEGER,
Expand Down Expand Up @@ -73,8 +74,9 @@ void UI_MenuMisc_Reload(void)
misc_opts[1].codevar = &fs_games[ui_game].record;
misc_opts[2].codevar = &fs_games[ui_game].skill;
misc_opts[3].codevar = &fs_games[ui_game].warp;
misc_opts[4].codevar = &fs_games[ui_game].charclass;
misc_opts[4].codevar = &fs_games[ui_game].timer;
misc_opts[5].codevar = &fs_games[ui_game].charclass;

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

0 comments on commit baef483

Please sign in to comment.