summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon Howard2006-09-21 18:21:16 +0000
committerSimon Howard2006-09-21 18:21:16 +0000
commit72c7a4ad783891a232d125aea2d3c4213e5dcebb (patch)
treec3504352e8a34ddd79589f9a951dcf48f01755f8
parent89a9c8e003d5b415ee7f940e5231cf7c4d8e75e1 (diff)
downloadchocolate-doom-72c7a4ad783891a232d125aea2d3c4213e5dcebb.tar.gz
chocolate-doom-72c7a4ad783891a232d125aea2d3c4213e5dcebb.tar.bz2
chocolate-doom-72c7a4ad783891a232d125aea2d3c4213e5dcebb.zip
Add compatibility options dialog.
Subversion-branch: /trunk/chocolate-doom Subversion-revision: 647
-rw-r--r--setup/Makefile.am5
-rw-r--r--setup/compatibility.c42
-rw-r--r--setup/mainmenu.c5
3 files changed, 50 insertions, 2 deletions
diff --git a/setup/Makefile.am b/setup/Makefile.am
index b3af951f..22ad81b0 100644
--- a/setup/Makefile.am
+++ b/setup/Makefile.am
@@ -6,9 +6,10 @@ games_PROGRAMS = chocolate-setup
chocolate_setup_LDADD = @LDFLAGS@ @SDL_LIBS@ ../textscreen/libtextscreen.a
chocolate_setup_SOURCES = \
- mainmenu.c \
- keyboard.c \
+ compatibility.c \
display.c \
+ keyboard.c \
+ mainmenu.c \
mouse.c \
multiplayer.c \
sound.c \
diff --git a/setup/compatibility.c b/setup/compatibility.c
new file mode 100644
index 00000000..4a3c1206
--- /dev/null
+++ b/setup/compatibility.c
@@ -0,0 +1,42 @@
+// Emacs style mode select -*- C++ -*-
+//-----------------------------------------------------------------------------
+//
+// Copyright(C) 2006 Simon Howard
+//
+// This program is free software; you can redistribute it and/or
+// modify it under the terms of the GNU General Public License
+// as published by the Free Software Foundation; either version 2
+// of the License, or (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+// 02111-1307, USA.
+//
+
+// Sound control menu
+
+#include <stdlib.h>
+
+#include "textscreen.h"
+
+int vanilla_savegame_limit = 1;
+int vanilla_demo_limit = 1;
+
+void CompatibilitySettings(void)
+{
+ txt_window_t *window;
+
+ window = TXT_NewWindow("Compatibility");
+
+ TXT_AddWidget(window, TXT_NewCheckBox("Vanilla savegame limit",
+ &vanilla_savegame_limit));
+ TXT_AddWidget(window, TXT_NewCheckBox("Vanilla demo limit",
+ &vanilla_demo_limit));
+}
+
diff --git a/setup/mainmenu.c b/setup/mainmenu.c
index 0d02a19b..853bba56 100644
--- a/setup/mainmenu.c
+++ b/setup/mainmenu.c
@@ -69,6 +69,7 @@ extern void ConfigDisplay();
extern void ConfigKeyboard();
extern void ConfigMouse();
extern void ConfigSound();
+extern void CompatibilitySettings();
extern void StartMultiGame();
extern void MultiplayerConfig();
@@ -96,6 +97,10 @@ void MainMenu(void)
TXT_AddWidget(window, button);
TXT_SignalConnect(button, "pressed", ConfigSound, NULL);
+ button = TXT_NewButton("Compatibility");
+ TXT_AddWidget(window, button);
+ TXT_SignalConnect(button, "pressed", CompatibilitySettings, NULL);
+
TXT_AddWidget(window, TXT_NewButton("Save parameters and launch DOOM"));
TXT_AddWidget(window, TXT_NewStrut(0, 1));