ref: abfc7bfe709000c1ca82654b64e6b43d3e06308a
parent: d6693cc9e17fdbee7033e47b7b8da249da118d8f
author: Simon Howard <fraggle@gmail.com>
date: Thu Oct 20 17:13:35 EDT 2011
Fix Konami code. Subversion-branch: /branches/v2-branch Subversion-revision: 2445
--- a/src/setup/compatibility.h
+++ b/src/setup/compatibility.h
@@ -25,5 +25,7 @@
void CompatibilitySettings(void);
void BindCompatibilityVariables(void);
-#endif /* #ifndef SETUP_COMPATIBILITY_H */
+extern int vanilla_savegame_limit;
+extern int vanilla_demo_limit;
+#endif /* #ifndef SETUP_COMPATIBILITY_H */
--- a/src/setup/display.c
+++ b/src/setup/display.c
@@ -109,10 +109,11 @@
static int screen_height = 200;
static int screen_bpp = 8;
static int startup_delay = 1000;
-static int graphical_startup = 1;
-static int show_endoom = 1;
static int usegamma = 0;
+int graphical_startup = 1;
+int show_endoom = 1;
+
// These are the last screen width/height values that were chosen by the
// user. These are used when finding the "nearest" mode, so when
// changing the fullscreen / aspect ratio options, the setting does not
@@ -824,4 +825,3 @@
}
#endif
}
-
--- a/src/setup/display.h
+++ b/src/setup/display.h
@@ -26,5 +26,7 @@
void SetDisplayDriver(void);
void BindDisplayVariables(void);
-#endif /* #ifndef SETUP_DISPLAY_H */
+extern int show_endoom;
+extern int graphical_startup;
+#endif /* #ifndef SETUP_DISPLAY_H */
--- a/src/setup/keyboard.c
+++ b/src/setup/keyboard.c
@@ -31,7 +31,7 @@
#include "joystick.h"
#include "keyboard.h"
-static int vanilla_keyboard_mapping = 1;
+int vanilla_keyboard_mapping = 1;
static int always_run = 0;
@@ -385,4 +385,3 @@
{
M_BindVariable("vanilla_keyboard_mapping", &vanilla_keyboard_mapping);
}
-
--- a/src/setup/keyboard.h
+++ b/src/setup/keyboard.h
@@ -25,5 +25,6 @@
void ConfigKeyboard(void);
void BindKeyboardVariables(void);
-#endif /* #ifndef SETUP_KEYBOARD_H */
+extern int vanilla_keyboard_mapping;
+#endif /* #ifndef SETUP_KEYBOARD_H */
--- a/src/setup/mainmenu.c
+++ b/src/setup/mainmenu.c
@@ -34,6 +34,7 @@
#include "m_argv.h"
#include "m_config.h"
+#include "m_controls.h"
#include "setup_icon.c"
#include "mode.h"
@@ -59,12 +60,22 @@
static void SensibleDefaults(void)
{
-#if 0
- // TODO for raven-branch
key_up = 'w';
key_down = 's';
key_strafeleft = 'a';
key_straferight = 'd';
+ key_jump = '/';
+ key_lookup = KEY_PGUP;
+ key_lookdown = KEY_PGDN;
+ key_lookcenter = KEY_HOME;
+ key_flyup = KEY_INS;
+ key_flydown = KEY_DEL;
+ key_flycenter = KEY_END;
+ key_prevweapon = ',';
+ key_nextweapon = '.';
+ key_invleft = '[';
+ key_invright = ']';
+ key_message_refresh = KEY_ENTER;
mousebprevweapon = 4;
mousebnextweapon = 3;
snd_musicdevice = 3;
@@ -72,10 +83,10 @@
vanilla_savegame_limit = 0;
vanilla_keyboard_mapping = 0;
vanilla_demo_limit = 0;
+ graphical_startup = 0;
show_endoom = 0;
dclick_use = 0;
novert = 1;
-#endif
}
static int MainMenuKeyPress(txt_window_t *window, int key, void *user_data)
@@ -348,4 +359,3 @@
RunGUI();
}
-
--- a/src/setup/mouse.c
+++ b/src/setup/mouse.c
@@ -34,12 +34,13 @@
static int usemouse = 1;
-static int novert = 0;
static int mouseSensitivity = 5;
static float mouse_acceleration = 2.0;
static int mouse_threshold = 10;
static int grabmouse = 1;
+int novert = 0;
+
static int *all_mouse_buttons[] = {
&mousebfire,
&mousebstrafe,
@@ -166,4 +167,3 @@
M_BindVariable("mouse_threshold", &mouse_threshold);
M_BindVariable("grabmouse", &grabmouse);
}
-
--- a/src/setup/mouse.h
+++ b/src/setup/mouse.h
@@ -25,5 +25,6 @@
void ConfigMouse(void);
void BindMouseVariables(void);
-#endif /* #ifndef SETUP_MOUSE_H */
+extern int novert;
+#endif /* #ifndef SETUP_MOUSE_H */
--- a/src/setup/sound.h
+++ b/src/setup/sound.h
@@ -25,5 +25,6 @@
void ConfigSound(void);
void BindSoundVariables(void);
-#endif /* #ifndef SETUP_SOUND_H */
+extern int snd_musicdevice;
+#endif /* #ifndef SETUP_SOUND_H */