1 /* Catacomb Armageddon Source Code
\r
2 * Copyright (C) 1993-2014 Flat Rock Software
\r
4 * This program is free software; you can redistribute it and/or modify
\r
5 * it under the terms of the GNU General Public License as published by
\r
6 * the Free Software Foundation; either version 2 of the License, or
\r
7 * (at your option) any later version.
\r
9 * This program is distributed in the hope that it will be useful,
\r
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
\r
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
\r
12 * GNU General Public License for more details.
\r
14 * You should have received a copy of the GNU General Public License along
\r
15 * with this program; if not, write to the Free Software Foundation, Inc.,
\r
16 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
\r
21 // ID_US.c - User Manager
\r
23 // By Jason Blochowiak
\r
27 // This module handles dealing with user input & feedback
\r
29 // Depends on: Input Mgr, View Mgr, some variables from the Sound, Caching,
\r
30 // and Refresh Mgrs, Memory Mgr for background save/restore
\r
33 // ingame - Flag set by game indicating if a game is in progress
\r
34 // abortgame - Flag set if the current game should be aborted (if a load
\r
36 // loadedgame - Flag set if a game was loaded
\r
37 // abortprogram - Normally nil, this points to a terminal error message
\r
38 // if the program needs to abort
\r
39 // restartgame - Normally set to gd_Continue, this is set to one of the
\r
40 // difficulty levels if a new game should be started
\r
41 // PrintX, PrintY - Where the User Mgr will print (global coords)
\r
42 // WindowX,WindowY,WindowW,WindowH - The dimensions of the current
\r
46 // DEBUG - handle LPT3 for Sound Source
\r
50 ///////////////////////////////////////////////////////////////////////////
\r
52 // US_CheckParm() - checks to see if a string matches one of a set of
\r
53 // strings. The check is case insensitive. The routine returns the
\r
54 // index of the string that matched, or -1 if no matches were found
\r
56 ///////////////////////////////////////////////////////////////////////////
\r
58 US_CheckParm(char *parm,char **strings)
\r
64 while (!isalpha(*parm)) // Skip non-alphas
\r
67 for (i = 0;*strings && **strings;i++)
\r
69 for (s = *strings++,p = parm,cs = cp = 0;cs == cp;)
\r