From 9e3418c42b1e5d8dd83778b529bf5ed11fc7f281 Mon Sep 17 00:00:00 2001 From: Simon Howard Date: Thu, 31 Aug 2006 18:14:03 +0000 Subject: Add display.c with missing ConfigDisplay and multiplayer.c with multiplayer game start window. Subversion-branch: /trunk/chocolate-doom Subversion-revision: 584 --- setup/display.c | 24 ++++++++++++ setup/multiplayer.c | 110 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 134 insertions(+) create mode 100644 setup/display.c create mode 100644 setup/multiplayer.c (limited to 'setup') diff --git a/setup/display.c b/setup/display.c new file mode 100644 index 00000000..f4250590 --- /dev/null +++ b/setup/display.c @@ -0,0 +1,24 @@ +#include "textscreen.h" + +static int vidmode = 1; +static int fullscreen = 0; +static int grabmouse = 1; + +static char *modes[] = { "320x200", "640x400" }; + +void ConfigDisplay(void) +{ + txt_window_t *window; + txt_table_t *box; + + window = TXT_NewWindow("Display Configuration"); + + box = TXT_NewTable(2); + TXT_AddWidget(box, TXT_NewLabel("Screen mode: ")); + TXT_AddWidget(box, TXT_NewDropdownList(&vidmode, modes, 2)); + TXT_AddWidget(window, box); + + TXT_AddWidget(window, TXT_NewCheckBox("Fullscreen", &fullscreen)); + TXT_AddWidget(window, TXT_NewCheckBox("Grab mouse", &grabmouse)); +} + diff --git a/setup/multiplayer.c b/setup/multiplayer.c new file mode 100644 index 00000000..8e9a2e6b --- /dev/null +++ b/setup/multiplayer.c @@ -0,0 +1,110 @@ +#include +#include + +#include "textscreen.h" + +#define NUM_WADS 10 + +static char *skills[] = +{ + "I'm too young to die!", + "Hey, not too rough.", + "Hurt me plenty.", + "Ultra-violence", + "NIGHTMARE!", +}; + +static char *gamemodes[] = +{ + "Co-operative", + "Deathmatch", + "Deathmatch 2.0", +}; + +char *wads[NUM_WADS] = {}; +int skill = 0; +int nomonsters = 0; +int deathmatch = 0; +int fast = 0; +int respawn = 0; +int udpport = 4815; + +static void StartGame(void) +{ + printf("Now we start the game.\n"); + exit(0); +} + +static txt_window_action_t *StartGameAction(void) +{ + txt_window_action_t *action; + + action = TXT_NewWindowAction(KEY_F10, "Start"); + TXT_SignalConnect(action, "pressed", StartGame, NULL); + + return action; +} + +static void OpenWadsWindow(void) +{ + txt_window_t *window; + int i; + + window = TXT_NewWindow("Add WADs"); + + for (i=0; i