From 645e33ef2522d402cc11f7f5252abc27819c4d66 Mon Sep 17 00:00:00 2001 From: Simon Howard Date: Mon, 14 Feb 2011 20:40:23 +0000 Subject: Increase buffer size to 32 to fix overflow (thanks Quasar). Subversion-branch: /branches/raven-branch Subversion-revision: 2267 --- src/m_controls.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/m_controls.c b/src/m_controls.c index 60a96ac2..685a0f13 100644 --- a/src/m_controls.c +++ b/src/m_controls.c @@ -303,7 +303,7 @@ void M_BindMenuControls(void) void M_BindChatControls(unsigned int num_players) { - char name[20]; + char name[32]; int i; M_BindVariable("key_multi_msg", &key_multi_msg); -- cgit v1.2.3 From 8bf9496eeb4b9b32f1863cd10765b31f80bb971c Mon Sep 17 00:00:00 2001 From: Simon Howard Date: Sun, 20 Feb 2011 22:29:52 +0000 Subject: Looks like a merge error - oops. Subversion-branch: /branches/raven-branch Subversion-revision: 2270 --- src/setup/keyboard.c | 6 ------ 1 file changed, 6 deletions(-) (limited to 'src') diff --git a/src/setup/keyboard.c b/src/setup/keyboard.c index 3d9f9977..a128b3ab 100644 --- a/src/setup/keyboard.c +++ b/src/setup/keyboard.c @@ -294,12 +294,6 @@ static void OtherKeysDialog(TXT_UNCAST_ARG(widget), TXT_UNCAST_ARG(unused)) AddKeyControl(table, "- to brown", &key_multi_msgplayer[2]); AddKeyControl(table, "- to red", &key_multi_msgplayer[3]); - TXT_AddWidgets(table, TXT_NewStrut(0, 1), - TXT_NewStrut(0, 1), - TXT_NewLabel(" - Map - "), - TXT_NewStrut(0, 0), - NULL); - scrollpane = TXT_NewScrollPane(0, 13, table); TXT_AddWidget(window, scrollpane); -- cgit v1.2.3 From b24a72cfd68ccf06ab86a70356f5c6df87bd9eb6 Mon Sep 17 00:00:00 2001 From: Simon Howard Date: Thu, 24 Feb 2011 20:55:54 +0000 Subject: Load response files from main() before calling D_DoomMain, so that all executables load response files, including the setup tool. Subversion-branch: /branches/raven-branch Subversion-revision: 2276 --- src/doom/d_main.c | 2 -- src/heretic/d_main.c | 1 - src/hexen/h2_main.c | 1 - src/i_main.c | 2 ++ 4 files changed, 2 insertions(+), 4 deletions(-) (limited to 'src') diff --git a/src/doom/d_main.c b/src/doom/d_main.c index 2f116f1e..991907fa 100644 --- a/src/doom/d_main.c +++ b/src/doom/d_main.c @@ -1100,8 +1100,6 @@ void D_DoomMain (void) I_AtExit(D_Endoom, false); - M_FindResponseFile (); - // print banner I_PrintBanner(PACKAGE_STRING); diff --git a/src/heretic/d_main.c b/src/heretic/d_main.c index 169a86ea..5c2d5cf2 100644 --- a/src/heretic/d_main.c +++ b/src/heretic/d_main.c @@ -805,7 +805,6 @@ void D_DoomMain(void) I_AtExit(D_Endoom, false); - M_FindResponseFile(); nomonsters = M_CheckParm("-nomonsters"); respawnparm = M_CheckParm("-respawn"); ravpic = M_CheckParm("-ravpic"); diff --git a/src/hexen/h2_main.c b/src/hexen/h2_main.c index abc58f15..4f9fe312 100644 --- a/src/hexen/h2_main.c +++ b/src/hexen/h2_main.c @@ -232,7 +232,6 @@ void D_DoomMain(void) int p; I_AtExit(D_HexenQuitMessage, false); - M_FindResponseFile(); startepisode = 1; autostart = false; startskill = sk_medium; diff --git a/src/i_main.c b/src/i_main.c index 1ccc52c0..fdfa3cbc 100644 --- a/src/i_main.c +++ b/src/i_main.c @@ -154,6 +154,8 @@ int main(int argc, char **argv) LockCPUAffinity(); + M_FindResponseFile(); + // start doom D_DoomMain (); -- cgit v1.2.3 From 52db6da5814c867fc6dd6bb0ec5d51d76b1fcc4e Mon Sep 17 00:00:00 2001 From: Simon Howard Date: Mon, 28 Feb 2011 21:19:09 +0000 Subject: Bind screen_bpp variable in setup tool. Subversion-branch: /branches/raven-branch Subversion-revision: 2284 --- src/setup/display.c | 1 + 1 file changed, 1 insertion(+) (limited to 'src') diff --git a/src/setup/display.c b/src/setup/display.c index f5f190f2..1e5e9e31 100644 --- a/src/setup/display.c +++ b/src/setup/display.c @@ -715,6 +715,7 @@ void BindDisplayVariables(void) M_BindVariable("fullscreen", &fullscreen); M_BindVariable("screen_width", &screen_width); M_BindVariable("screen_height", &screen_height); + M_BindVariable("screen_bpp", &screen_bpp); M_BindVariable("startup_delay", &startup_delay); M_BindVariable("video_driver", &video_driver); M_BindVariable("usegamma", &usegamma); -- cgit v1.2.3 From b0519667da8edcea1592a0ba7b0dfa4b4709e034 Mon Sep 17 00:00:00 2001 From: Simon Howard Date: Sun, 6 Mar 2011 20:59:51 +0000 Subject: Discard very short sound effects and strip lead-in / lead-out samples that apparently aren't played by Vanilla Doom (thanks Quasar). Subversion-branch: /trunk/chocolate-doom Subversion-revision: 2291 --- src/i_sdlsound.c | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/i_sdlsound.c b/src/i_sdlsound.c index a26a81dd..14a5147f 100644 --- a/src/i_sdlsound.c +++ b/src/i_sdlsound.c @@ -359,7 +359,13 @@ static boolean LoadSoundLump(int sound, // greater than the length of the lump itself, this is an invalid // sound lump. - if (*length > lumplen - 8) + // We also discard sound lumps that are less than 49 samples long, + // as this is how DMX behaves - although the actual cut-off length + // seems to vary slightly depending on the sample rate. This needs + // further investigation to better understand the correct + // behavior. + + if (*length > lumplen - 8 || *length <= 48) { W_ReleaseLumpNum(*lumpnum); return false; @@ -368,6 +374,12 @@ static boolean LoadSoundLump(int sound, // Prune header *data_ref += 8; + // The DMX sound library seems to skip the first 16 and last 16 + // bytes of the lump - reason unknown. + + *data_ref += 16; + *length -= 32; + return true; } -- cgit v1.2.3