summaryrefslogtreecommitdiff
path: root/games/xdoom/patches/patch-ac
blob: 2889ceb0607601937f9c306b0a7d595b4dce77ae (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
$NetBSD: patch-ac,v 1.3 2000/02/03 16:01:15 abs Exp $

--- linuxdoom-1.10/d_main.c.orig	Mon Dec 22 20:32:03 1997
+++ linuxdoom-1.10/d_main.c	Thu Feb  3 13:35:25 2000
@@ -577,7 +577,11 @@
     char *doomwaddir;
     doomwaddir = getenv("DOOMWADDIR");
     if (!doomwaddir)
+#ifdef INSTALL_PREFIX
+	doomwaddir = INSTALL_PREFIX"/share/doom";
+#else
 	doomwaddir = ".";
+#endif
 
     // Commercial.
     doom2wad = malloc(strlen(doomwaddir)+1+9+1);
@@ -804,7 +808,32 @@
 	
     setbuf (stdout, NULL);
     modifiedgame = false;
-	
+
+    if (myargc > 1 && strcmp(myargv[1], "-h")==0)
+    {
+	printf(
+"Many options are not explained, and some are just plain broken.\n\
+Some more useful ones are:\n\
+  -2 -3 -4	Scale the window by 2, 3, or 4 times.\n\
+  -config	FILE	Load/save configuration from FILE.\n\
+  -episode N	Set starting expisode to N.\n\
+  -grabmouse	Grab the mouse to control movement.\n\
+  -volume N	Set volume (default 8).\n\
+  -skill N	Set starting skill level to N.\n\
+\n\
+Others are:\n\
+
+-altdeath   -debugfile	-file	    -nodraw	-respawn    -warp \n\
+-avg	    -devparm	-geom	    -nomonsters	-shdev	    -wart \n\
+-cdrom	    -disp	-loadgame   -playdemo	-statcopy \n\
+-comdev	    -dup	-maxdemo    -port	-timedemo \n\
+	    -extratic	-net	    -record	-timer \n\
+-deathmatch -fast	-noblit	    -regdev	-turbo \n\
+
+");
+    exit(0);
+    }
+
     nomonsters = M_CheckParm ("-nomonsters");
     respawnparm = M_CheckParm ("-respawn");
     fastparm = M_CheckParm ("-fast");
@@ -1013,6 +1042,15 @@
 
     printf ("M_LoadDefaults: Load system defaults.\n");
     M_LoadDefaults ();              // load before initing other systems
+
+    /* Must be after M_LoadDefaults */
+    p = M_CheckParm ("-volume");
+    if (p && p < myargc-1)
+    {
+	int vol = atoi(myargv[p+1]);
+	S_SetSfxVolume(vol);
+	S_SetMusicVolume(vol);
+    }
 
     printf ("Z_Init: Init zone memory allocation daemon. \n");
     Z_Init ();