commit 0f5de61b743fdf05335436c1c71b4b488870483f
Merge: ec034483 43748a36
Author: Simon Howard <fraggle@gmail.com>
AuthorDate: Fri Jun 12 00:23:33 2009 +0000
Commit: Simon Howard <fraggle@gmail.com>
CommitDate: Fri Jun 12 00:23:33 2009 +0000
Merge from trunk.
Subversion-branch: /branches/raven-branch
Subversion-revision: 1596
pcsound/pcsound.c | 5 ++++-
src/Makefile.am | 4 +++-
src/doom/g_game.c | 10 ++++++----
src/doom/hu_stuff.c | 4 ++--
src/doom/hu_stuff.h | 1 -
src/i_endoom.c | 17 +++++++++++++++--
src/i_video.c | 9 +++++++++
src/m_config.c | 12 ++++++++++++
src/m_controls.c | 33 +++++++++++++++++++--------------
src/m_controls.h | 3 +++
src/setup/display.c | 4 ++++
src/setup/keyboard.c | 7 ++++++-
src/setup/txt_keyinput.c | 12 ++++++++++++
textscreen/txt_sdl.c | 10 ++++++++++
wince/env.h | 7 +++++++
15 files changed, 112 insertions(+), 26 deletions(-)
diff --cc src/Makefile.am
index f885f828,208039a5..73256b98
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@@ -36,21 -20,35 +36,22 @@@ net_server.c net_server.
net_structrw.c net_structrw.h \
z_native.c z_zone.h
-chocolate_server_SOURCES=$(DEDSERV_FILES)
-chocolate_server_LDADD = ../wince/libc_wince.a @LDFLAGS@ @SDLNET_LIBS@
+chocolate_server_SOURCES=$(COMMON_SOURCE_FILES) $(DEDSERV_FILES)
- chocolate_server_LDADD = @LDFLAGS@ @SDLNET_LIBS@
++chocolate_server_LDADD = $(top_builddir)/wince/libc_wince.a \
++ @LDFLAGS@ @SDLNET_LIBS@
+
+# Source files used by the game binaries (chocolate-doom, etc.)
-MAIN_SOURCE_FILES=\
-am_map.c am_map.h \
-d_englsh.h \
-d_event.h \
-d_items.c d_items.h \
+GAME_SOURCE_FILES=\
+d_event.c d_event.h \
+ doomkeys.h \
+ doomfeatures.h \
+ doomtype.h \
d_iwad.c d_iwad.h \
-d_main.c d_main.h \
-d_net.c d_net.h \
-doomdata.h \
-doomdef.c doomdef.h \
-doomkeys.h \
-doomfeatures.h \
-doomstat.c doomstat.h \
-doomtype.h \
-d_player.h \
-dstrings.c dstrings.h \
-d_textur.h \
-d_think.h \
-d_ticcmd.h \
-f_finale.c f_finale.h \
-f_wipe.c f_wipe.h \
-g_game.c g_game.h \
-hu_lib.c hu_lib.h \
-hu_stuff.c hu_stuff.h \
-i_main.c \
-info.c info.h \
+d_mode.c d_mode.h \
+ d_ticcmd.h \
+i_cdmus.c i_cdmus.h \
+i_endoom.c i_endoom.h \
i_joystick.c i_joystick.h \
i_scale.c i_scale.h \
i_swap.h \
@@@ -132,38 -169,13 +133,39 @@@ els
chocolate_doom_SOURCES=$(SOURCE_FILES)
endif
-chocolate_doom_LDADD = \
- ../wince/libc_wince.a \
- ../textscreen/libtextscreen.a \
- ../pcsound/libpcsound.a \
- @LDFLAGS@ \
- @SDLMIXER_LIBS@ \
- @SDLNET_LIBS@
+chocolate_doom_LDADD = doom/libdoom.a $(EXTRA_LIBS)
+
+if HAVE_WINDRES
+chocolate_heretic_SOURCES=$(SOURCE_FILES) resource.rc
+else
+chocolate_heretic_SOURCES=$(SOURCE_FILES)
+endif
+
+chocolate_heretic_LDADD = heretic/libheretic.a $(EXTRA_LIBS)
+
+if HAVE_WINDRES
+chocolate_hexen_SOURCES=$(SOURCE_FILES) resource.rc
+else
+chocolate_hexen_SOURCES=$(SOURCE_FILES)
+endif
+
+chocolate_hexen_LDADD = hexen/libhexen.a $(EXTRA_LIBS)
+
+# Source files needed for chocolate-setup:
+
+SETUP_FILES= \
+deh_str.c deh_str.h \
+d_mode.c d_mode.h \
+d_iwad.c d_iwad.h \
+m_config.c m_config.h \
+m_controls.c m_controls.h \
+z_native.c z_zone.h
+
+chocolate_setup_SOURCES=$(SETUP_FILES) $(COMMON_SOURCE_FILES)
+chocolate_setup_LDADD = setup/libsetup.a \
++ $(top_builddir)/wince/libc_wince.a \
+ $(top_builddir)/textscreen/libtextscreen.a \
+ @LDFLAGS@ @SDL_LIBS@ @SDLNET_LIBS@
EXTRA_DIST = \
icon.c \
diff --cc src/doom/hu_stuff.c
index 7cd06bd5,0ab750fb..a106978e
--- a/src/doom/hu_stuff.c
+++ b/src/doom/hu_stuff.c
@@@ -37,6 -36,6 +37,7 @@@
#include "hu_stuff.h"
#include "hu_lib.h"
++#include "m_controls.h"
#include "w_wad.h"
#include "s_sound.h"
@@@ -89,7 -88,8 +90,6 @@@ char* player_names[]
HUSTR_PLRRED
};
-int key_message_refresh = KEY_ENTER;
--
char chat_char; // remove later.
static player_t* plr;
patch_t* hu_font[HU_FONTSIZE];
diff --cc src/i_endoom.c
index 08cfb99e,00000000..a05d1662
mode 100644,000000..100644
--- a/src/i_endoom.c
+++ b/src/i_endoom.c
@@@ -1,68 -1,0 +1,81 @@@
+// Emacs style mode select -*- C++ -*-
+//-----------------------------------------------------------------------------
+//
+// Copyright(C) 2005-8 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.
+//
+// DESCRIPTION:
+// Exit text-mode ENDOOM screen.
+//
+//-----------------------------------------------------------------------------
+
+#include <string.h>
+
+#include "doomtype.h"
+#include "i_video.h"
+
+#include "txt_main.h"
+
++#define ENDOOM_W 80
++#define ENDOOM_H 25
++
+//
+// Displays the text mode ending screen after the game quits
+//
+
+void I_Endoom(byte *endoom_data)
+{
+ unsigned char *screendata;
++ int y;
++ int indent;
+
+ // Set up text mode screen
+
+ TXT_Init();
+
+ // Write the data to the screen memory
-
++
+ screendata = TXT_GetScreenData();
- memcpy(screendata, endoom_data, 4000);
++
++ indent = (ENDOOM_W - TXT_SCREEN_W) / 2;
++
++ for (y=0; y<TXT_SCREEN_H; ++y)
++ {
++ memcpy(screendata + (y * TXT_SCREEN_W * 2),
++ endoom_data + (y * ENDOOM_W + indent) * 2,
++ TXT_SCREEN_W * 2);
++ }
+
+ // Wait for a keypress
+
+ while (true)
+ {
+ TXT_UpdateScreen();
+
+ if (TXT_GetChar() >= 0)
+ {
+ break;
+ }
+
+ TXT_Sleep(0);
+ }
+
+ // Shut down text mode screen
+
+ TXT_Shutdown();
+}
+
diff --cc src/m_config.c
index 25e59917,9e770e48..f70e112a
--- a/src/m_config.c
+++ b/src/m_config.c
@@@ -731,6 -770,12 +731,12 @@@ static default_t extra_defaults_list[]
#endif
+ //!
+ // Key to pause or unpause the game.
+ //
+
- CONFIG_VARIABLE_KEY(key_pause, key_pause),
++ CONFIG_VARIABLE_KEY(key_pause),
+
//!
// Key that activates the menu when pressed.
//
@@@ -981,7 -1026,13 +987,13 @@@
// Key to select weapon 8.
//
- CONFIG_VARIABLE_KEY(key_weapon8, key_weapon8),
+ CONFIG_VARIABLE_KEY(key_weapon8),
+
+ //!
+ // Key to re-display last message.
+ //
+
- CONFIG_VARIABLE_KEY(key_message_refresh, key_message_refresh),
++ CONFIG_VARIABLE_KEY(key_message_refresh),
};
static default_collection_t extra_defaults =
diff --cc src/m_controls.c
index a4a14c02,00000000..1cca6263
mode 100644,000000..100644
--- a/src/m_controls.c
+++ b/src/m_controls.c
@@@ -1,269 -1,0 +1,274 @@@
+// Emacs style mode select -*- C++ -*-
+//-----------------------------------------------------------------------------
+//
+// Copyright(C) 1993-1996 Id Software, Inc.
+// Copyright(C) 1993-2008 Raven Software
+// Copyright(C) 2005-8 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.
+//
+//-----------------------------------------------------------------------------
+
+#include "doomtype.h"
+#include "doomkeys.h"
+
+#include "m_config.h"
+
+//
+// Keyboard controls
+//
+
+int key_right = KEY_RIGHTARROW;
+int key_left = KEY_LEFTARROW;
+
+int key_up = KEY_UPARROW;
+int key_down = KEY_DOWNARROW;
+int key_strafeleft = ',';
+int key_straferight = '.';
+int key_fire = KEY_RCTRL;
+int key_use = ' ';
+int key_strafe = KEY_RALT;
+int key_speed = KEY_RSHIFT;
+
+//
+// Heretic keyboard controls
+//
+
+int key_flyup = KEY_PGUP;
+int key_flydown = KEY_INS;
+int key_flycenter = KEY_HOME;
+
+int key_lookup = KEY_PGDN;
+int key_lookdown = KEY_DEL;
+int key_lookcenter = KEY_END;
+
+int key_invleft = '[';
+int key_invright = ']';
+int key_useartifact = KEY_ENTER;
+
+//
+// Hexen key controls
+//
+
+int key_jump = '/';
+
+//
+// Mouse controls
+//
+
+int mousebfire = 0;
+int mousebstrafe = 1;
+int mousebforward = 2;
+
+int mousebjump = -1;
+
+int mousebstrafeleft = -1;
+int mousebstraferight = -1;
+int mousebbackward = -1;
+int mousebuse = -1;
+
++int key_message_refresh = KEY_ENTER;
++int key_pause = KEY_PAUSE;
++
+// Weapon selection keys:
+
+int key_weapon1 = '1';
+int key_weapon2 = '2';
+int key_weapon3 = '3';
+int key_weapon4 = '4';
+int key_weapon5 = '5';
+int key_weapon6 = '6';
+int key_weapon7 = '7';
+int key_weapon8 = '8';
+
+// Map cotnrols keys:
+
+int key_map_north = KEY_UPARROW;
+int key_map_south = KEY_DOWNARROW;
+int key_map_east = KEY_RIGHTARROW;
+int key_map_west = KEY_LEFTARROW;
+int key_map_zoomin = '=';
+int key_map_zoomout = '-';
+int key_map_toggle = KEY_TAB;
+int key_map_maxzoom = '0';
+int key_map_follow = 'f';
+int key_map_grid = 'g';
+int key_map_mark = 'm';
+int key_map_clearmark = 'c';
+
+// menu keys:
+
+int key_menu_activate = KEY_ESCAPE;
+int key_menu_up = KEY_UPARROW;
+int key_menu_down = KEY_DOWNARROW;
+int key_menu_left = KEY_LEFTARROW;
+int key_menu_right = KEY_RIGHTARROW;
+int key_menu_back = KEY_BACKSPACE;
+int key_menu_forward = KEY_ENTER;
+int key_menu_confirm = 'y';
+int key_menu_abort = 'n';
+
+int key_menu_help = KEY_F1;
+int key_menu_save = KEY_F2;
+int key_menu_load = KEY_F3;
+int key_menu_volume = KEY_F4;
+int key_menu_detail = KEY_F5;
+int key_menu_qsave = KEY_F6;
+int key_menu_endgame = KEY_F7;
+int key_menu_messages = KEY_F8;
+int key_menu_qload = KEY_F9;
+int key_menu_quit = KEY_F10;
+int key_menu_gamma = KEY_F11;
+
+int key_menu_incscreen = KEY_EQUALS;
+int key_menu_decscreen = KEY_MINUS;
+
+//
+// Joystick controls
+//
+
+int joybfire = 0;
+int joybstrafe = 1;
+int joybuse = 3;
+int joybspeed = 2;
+
+int joybstrafeleft = -1;
+int joybstraferight = -1;
+
+int joybjump = -1;
+
+// Control whether if a mouse button is double clicked, it acts like
+// "use" has been pressed
+
+int dclick_use = 1;
+
+//
+// Bind all of the common controls used by Doom and all other games.
+//
+
+void M_BindBaseControls(void)
+{
+ M_BindVariable("key_right", &key_right),
+ M_BindVariable("key_left", &key_left),
+ M_BindVariable("key_up", &key_up),
+ M_BindVariable("key_down", &key_down),
+ M_BindVariable("key_strafeleft", &key_strafeleft),
+ M_BindVariable("key_straferight", &key_straferight),
+ M_BindVariable("key_fire", &key_fire),
+ M_BindVariable("key_use", &key_use),
+ M_BindVariable("key_strafe", &key_strafe),
+ M_BindVariable("key_speed", &key_speed),
+
+ M_BindVariable("mouseb_fire", &mousebfire),
+ M_BindVariable("mouseb_strafe", &mousebstrafe),
+ M_BindVariable("mouseb_forward", &mousebforward),
+
+ M_BindVariable("joyb_fire", &joybfire),
+ M_BindVariable("joyb_strafe", &joybstrafe),
+ M_BindVariable("joyb_use", &joybuse),
+ M_BindVariable("joyb_speed", &joybspeed),
+
+ // Extra controls that are not in the Vanilla versions:
+
+ M_BindVariable("joyb_strafeleft", &joybstrafeleft);
+ M_BindVariable("joyb_straferight", &joybstraferight);
+ M_BindVariable("mouseb_strafeleft", &mousebstrafeleft);
+ M_BindVariable("mouseb_straferight", &mousebstraferight);
+ M_BindVariable("mouseb_use", &mousebuse);
+ M_BindVariable("mouseb_backward", &mousebbackward);
+ M_BindVariable("dclick_use", &dclick_use);
++ M_BindVariable("key_pause", &key_pause);
++ M_BindVariable("key_message_refresh", &key_message_refresh);
+}
+
+void M_BindHereticControls(void)
+{
+ M_BindVariable("key_flyup", &key_flyup);
+ M_BindVariable("key_flydown", &key_flydown);
+ M_BindVariable("key_flycenter", &key_flycenter);
+
+ M_BindVariable("key_lookup", &key_lookup);
+ M_BindVariable("key_lookdown", &key_lookdown);
+ M_BindVariable("key_lookcenter", &key_lookcenter);
+
+ M_BindVariable("key_invleft", &key_invleft);
+ M_BindVariable("key_invright", &key_invright);
+ M_BindVariable("key_useartifact", &key_useartifact);
+}
+
+void M_BindHexenControls(void)
+{
+ M_BindVariable("key_jump", &key_jump);
+ M_BindVariable("mouseb_jump", &mousebjump);
+ M_BindVariable("joyb_jump", &joybjump);
+}
+
+void M_BindWeaponControls(void)
+{
+ M_BindVariable("key_weapon1", &key_weapon1);
+ M_BindVariable("key_weapon2", &key_weapon2);
+ M_BindVariable("key_weapon3", &key_weapon3);
+ M_BindVariable("key_weapon4", &key_weapon4);
+ M_BindVariable("key_weapon5", &key_weapon5);
+ M_BindVariable("key_weapon6", &key_weapon6);
+ M_BindVariable("key_weapon7", &key_weapon7);
+ M_BindVariable("key_weapon8", &key_weapon8);
+}
+
+void M_BindMapControls(void)
+{
+ M_BindVariable("key_map_north", &key_map_north);
+ M_BindVariable("key_map_south", &key_map_south);
+ M_BindVariable("key_map_east", &key_map_east);
+ M_BindVariable("key_map_west", &key_map_west);
+ M_BindVariable("key_map_zoomin", &key_map_zoomin);
+ M_BindVariable("key_map_zoomout", &key_map_zoomout);
+ M_BindVariable("key_map_toggle", &key_map_toggle);
+ M_BindVariable("key_map_maxzoom", &key_map_maxzoom);
+ M_BindVariable("key_map_follow", &key_map_follow);
+ M_BindVariable("key_map_grid", &key_map_grid);
+ M_BindVariable("key_map_mark", &key_map_mark);
+ M_BindVariable("key_map_clearmark", &key_map_clearmark);
+}
+
+void M_BindMenuControls(void)
+{
+ M_BindVariable("key_menu_activate", &key_menu_activate);
+ M_BindVariable("key_menu_up", &key_menu_up);
+ M_BindVariable("key_menu_down", &key_menu_down);
+ M_BindVariable("key_menu_left", &key_menu_left);
+ M_BindVariable("key_menu_right", &key_menu_right);
+ M_BindVariable("key_menu_back", &key_menu_back);
+ M_BindVariable("key_menu_forward", &key_menu_forward);
+ M_BindVariable("key_menu_confirm", &key_menu_confirm);
+ M_BindVariable("key_menu_abort", &key_menu_abort);
+
- M_BindVariable("key_menu_help", &key_menu_help);
- M_BindVariable("key_menu_save", &key_menu_save);
- M_BindVariable("key_menu_load", &key_menu_load);
- M_BindVariable("key_menu_volume", &key_menu_volume);
- M_BindVariable("key_menu_detail", &key_menu_detail);
- M_BindVariable("key_menu_qsave", &key_menu_qsave);
- M_BindVariable("key_menu_endgame", &key_menu_endgame);
- M_BindVariable("key_menu_messages", &key_menu_messages);
- M_BindVariable("key_menu_qload", &key_menu_qload);
- M_BindVariable("key_menu_quit", &key_menu_quit);
- M_BindVariable("key_menu_gamma", &key_menu_gamma);
-
- M_BindVariable("key_menu_incscreen", &key_menu_incscreen);
- M_BindVariable("key_menu_decscreen", &key_menu_decscreen);
++ M_BindVariable("key_menu_help", &key_menu_help);
++ M_BindVariable("key_menu_save", &key_menu_save);
++ M_BindVariable("key_menu_load", &key_menu_load);
++ M_BindVariable("key_menu_volume", &key_menu_volume);
++ M_BindVariable("key_menu_detail", &key_menu_detail);
++ M_BindVariable("key_menu_qsave", &key_menu_qsave);
++ M_BindVariable("key_menu_endgame", &key_menu_endgame);
++ M_BindVariable("key_menu_messages", &key_menu_messages);
++ M_BindVariable("key_menu_qload", &key_menu_qload);
++ M_BindVariable("key_menu_quit", &key_menu_quit);
++ M_BindVariable("key_menu_gamma", &key_menu_gamma);
++
++ M_BindVariable("key_menu_incscreen", &key_menu_incscreen);
++ M_BindVariable("key_menu_decscreen", &key_menu_decscreen);
+}
+
diff --cc src/m_controls.h
index 4591348c,00000000..5054212e
mode 100644,000000..100644
--- a/src/m_controls.h
+++ b/src/m_controls.h
@@@ -1,145 -1,0 +1,148 @@@
+// Emacs style mode select -*- C++ -*-
+//-----------------------------------------------------------------------------
+//
+// Copyright(C) 1993-1996 Id Software, Inc.
+// Copyright(C) 1993-2008 Raven Software
+// Copyright(C) 2005-8 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.
+//
+//-----------------------------------------------------------------------------
+
+#ifndef __M_CONTROLS_H__
+#define __M_CONTROLS_H__
+
+extern int key_right;
+extern int key_left;
+
+extern int key_up;
+extern int key_down;
+extern int key_strafeleft;
+extern int key_straferight;
+extern int key_fire;
+extern int key_use;
+extern int key_strafe;
+extern int key_speed;
+
+extern int key_jump;
+
+extern int key_flyup;
+extern int key_flydown;
+extern int key_flycenter;
+extern int key_lookup;
+extern int key_lookdown;
+extern int key_lookcenter;
+extern int key_invleft;
+extern int key_invright;
+extern int key_useartifact;
+
++extern int key_message_refresh;
++extern int key_pause;
++
+extern int key_weapon1;
+extern int key_weapon2;
+extern int key_weapon3;
+extern int key_weapon4;
+extern int key_weapon5;
+extern int key_weapon6;
+extern int key_weapon7;
+extern int key_weapon8;
+
+extern int key_map_north;
+extern int key_map_south;
+extern int key_map_east;
+extern int key_map_west;
+extern int key_map_zoomin;
+extern int key_map_zoomout;
+extern int key_map_toggle;
+extern int key_map_maxzoom;
+extern int key_map_follow;
+extern int key_map_grid;
+extern int key_map_mark;
+extern int key_map_clearmark;
+
+extern int key_map_north;
+extern int key_map_south;
+extern int key_map_east;
+extern int key_map_west;
+extern int key_map_zoomin;
+extern int key_map_zoomout;
+extern int key_map_toggle;
+extern int key_map_maxzoom;
+extern int key_map_follow;
+extern int key_map_grid;
+extern int key_map_mark;
+extern int key_map_clearmark;
+
+// menu keys:
+
+extern int key_menu_activate;
+extern int key_menu_up;
+extern int key_menu_down;
+extern int key_menu_left;
+extern int key_menu_right;
+extern int key_menu_back;
+extern int key_menu_forward;
+extern int key_menu_confirm;
+extern int key_menu_abort;
+
+extern int key_menu_help;
+extern int key_menu_save;
+extern int key_menu_load;
+extern int key_menu_volume;
+extern int key_menu_detail;
+extern int key_menu_qsave;
+extern int key_menu_endgame;
+extern int key_menu_messages;
+extern int key_menu_qload;
+extern int key_menu_quit;
+extern int key_menu_gamma;
+
+extern int key_menu_incscreen;
+extern int key_menu_decscreen;
+
+extern int mousebfire;
+extern int mousebstrafe;
+extern int mousebforward;
+
+extern int mousebjump;
+
+extern int mousebstrafeleft;
+extern int mousebstraferight;
+extern int mousebbackward;
+extern int mousebuse;
+
+extern int joybfire;
+extern int joybstrafe;
+extern int joybuse;
+extern int joybspeed;
+
+extern int joybjump;
+
+extern int joybstrafeleft;
+extern int joybstraferight;
+
+extern int dclick_use;
+
+void M_BindBaseControls(void);
+void M_BindHereticControls(void);
+void M_BindHexenControls(void);
+void M_BindWeaponControls(void);
+void M_BindMapControls(void);
+void M_BindMenuControls(void);
+
+#endif /* #ifndef __M_CONTROLS_H__ */
+
diff --cc src/setup/display.c
index 4918d045,596b8a43..9fd0963b
--- a/src/setup/display.c
+++ b/src/setup/display.c
@@@ -19,12 -19,13 +19,16 @@@
// 02111-1307, USA.
//
+#include <stdlib.h>
#include <string.h>
+ #ifdef _WIN32_WCE
+ #include "libc_wince.h"
+ #endif
+
#include "textscreen.h"
+#include "m_config.h"
+#include "mode.h"
#include "display.h"
diff --cc src/setup/keyboard.c
index cd5eb4f5,79cb90e7..6e746ee9
--- a/src/setup/keyboard.c
+++ b/src/setup/keyboard.c
@@@ -39,14 -100,11 +39,15 @@@ static int always_run = 0
static int *controls[] = { &key_left, &key_right, &key_up, &key_down,
&key_strafeleft, &key_straferight, &key_fire,
- &key_use, &key_strafe, &key_speed,
+ &key_use, &key_strafe, &key_speed, &key_jump,
+ &key_flyup, &key_flydown, &key_flycenter,
+ &key_lookup, &key_lookdown, &key_lookcenter,
+ &key_invleft, &key_invright, &key_useartifact,
+ &key_pause,
&key_weapon1, &key_weapon2, &key_weapon3,
&key_weapon4, &key_weapon5, &key_weapon6,
- &key_weapon7, &key_weapon8, NULL };
+ &key_weapon7, &key_weapon8,
+ NULL };
static int *menu_nav[] = { &key_menu_activate, &key_menu_up, &key_menu_down,
&key_menu_left, &key_menu_right, &key_menu_back,
@@@ -244,8 -250,13 +246,9 @@@ static void OtherKeysDialog(TXT_UNCAST_
AddKeyControl(table, "Confirm action", &key_menu_confirm);
AddKeyControl(table, "Cancel action", &key_menu_abort);
- TXT_AddWidgets(table, TXT_NewStrut(0, 1),
- TXT_NewStrut(0, 1),
- TXT_NewLabel(" - Shortcut keys - "),
- TXT_NewStrut(0, 0),
- NULL);
+ AddSectionLabel(table, "Shortcut keys", true);
+ AddKeyControl(table, "Pause game", &key_pause);
AddKeyControl(table, "Help screen", &key_menu_help);
AddKeyControl(table, "Save game", &key_menu_save);
AddKeyControl(table, "Load game", &key_menu_load);
@@@ -261,7 -272,13 +264,9 @@@
AddKeyControl(table, "Increase screen size", &key_menu_incscreen);
AddKeyControl(table, "Decrease screen size", &key_menu_decscreen);
+ AddKeyControl(table, "Display last message", &key_message_refresh);
+
- TXT_AddWidgets(table, TXT_NewStrut(0, 1),
- TXT_NewStrut(0, 1),
- TXT_NewLabel(" - Map - "),
- TXT_NewStrut(0, 0),
- NULL);
+ AddSectionLabel(table, "Map", true);
AddKeyControl(table, "Toggle map", &key_map_toggle);
AddKeyControl(table, "Zoom in", &key_map_zoomin);