ref: 72c7a4ad783891a232d125aea2d3c4213e5dcebb
parent: 89a9c8e003d5b415ee7f940e5231cf7c4d8e75e1
author: Simon Howard <[email protected]>
date: Thu Sep 21 14:21:16 EDT 2006
Add compatibility options dialog. Subversion-branch: /trunk/chocolate-doom Subversion-revision: 647
--- a/setup/Makefile.am
+++ b/setup/Makefile.am
@@ -6,9 +6,10 @@
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 \
--- /dev/null
+++ b/setup/compatibility.c
@@ -1,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));
+}
+
--- a/setup/mainmenu.c
+++ b/setup/mainmenu.c
@@ -69,6 +69,7 @@
extern void ConfigKeyboard();
extern void ConfigMouse();
extern void ConfigSound();
+extern void CompatibilitySettings();
extern void StartMultiGame();
extern void MultiplayerConfig();
@@ -95,6 +96,10 @@
button = TXT_NewButton("Configure sound");
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));