2006-02-24 04:48:15 +00:00
|
|
|
/*
|
|
|
|
** m_options.cpp
|
|
|
|
** New options menu code
|
|
|
|
**
|
|
|
|
**---------------------------------------------------------------------------
|
2009-06-26 02:45:05 +00:00
|
|
|
** Copyright 1998-2009 Randy Heit
|
2006-02-24 04:48:15 +00:00
|
|
|
** All rights reserved.
|
|
|
|
**
|
|
|
|
** Redistribution and use in source and binary forms, with or without
|
|
|
|
** modification, are permitted provided that the following conditions
|
|
|
|
** are met:
|
|
|
|
**
|
|
|
|
** 1. Redistributions of source code must retain the above copyright
|
|
|
|
** notice, this list of conditions and the following disclaimer.
|
|
|
|
** 2. Redistributions in binary form must reproduce the above copyright
|
|
|
|
** notice, this list of conditions and the following disclaimer in the
|
|
|
|
** documentation and/or other materials provided with the distribution.
|
|
|
|
** 3. The name of the author may not be used to endorse or promote products
|
|
|
|
** derived from this software without specific prior written permission.
|
|
|
|
**
|
|
|
|
** THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
|
|
|
|
** IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
|
|
|
|
** OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
|
|
|
|
** IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
|
|
|
|
** INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
|
|
|
|
** NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
|
|
|
** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
|
|
|
** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
|
|
|
** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
|
|
|
** THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
|
|
**---------------------------------------------------------------------------
|
|
|
|
**
|
|
|
|
** Sorry this got so convoluted. It was originally much cleaner until
|
|
|
|
** I started adding all sorts of gadgets to the menus. I might someday
|
|
|
|
** make a project of rewriting the entire menu system using Amiga-style
|
|
|
|
** taglists to describe each menu item. We'll see... (Probably not.)
|
|
|
|
*/
|
|
|
|
|
|
|
|
#include "templates.h"
|
|
|
|
|
|
|
|
#include "doomdef.h"
|
|
|
|
#include "gstrings.h"
|
|
|
|
|
|
|
|
#include "c_console.h"
|
|
|
|
#include "c_dispatch.h"
|
|
|
|
#include "c_bind.h"
|
|
|
|
|
|
|
|
#include "d_main.h"
|
|
|
|
#include "d_gui.h"
|
|
|
|
|
|
|
|
#include "i_system.h"
|
|
|
|
#include "i_video.h"
|
|
|
|
|
|
|
|
#include "i_music.h"
|
|
|
|
#include "i_input.h"
|
2009-07-11 01:40:01 +00:00
|
|
|
#include "m_joy.h"
|
2006-02-24 04:48:15 +00:00
|
|
|
|
|
|
|
#include "v_video.h"
|
|
|
|
#include "v_text.h"
|
|
|
|
#include "w_wad.h"
|
|
|
|
#include "gi.h"
|
|
|
|
|
|
|
|
#include "r_local.h"
|
2008-09-15 14:11:05 +00:00
|
|
|
#include "v_palette.h"
|
2006-02-24 04:48:15 +00:00
|
|
|
#include "gameconfigfile.h"
|
|
|
|
|
|
|
|
#include "hu_stuff.h"
|
|
|
|
|
|
|
|
#include "g_game.h"
|
|
|
|
|
|
|
|
#include "m_argv.h"
|
|
|
|
#include "m_swap.h"
|
|
|
|
|
|
|
|
#include "s_sound.h"
|
|
|
|
|
|
|
|
#include "doomstat.h"
|
|
|
|
|
|
|
|
#include "m_misc.h"
|
Note: I have not tried compiling these recent changes under Linux. I wouldn't
be surprised if it doesn't work.
- Reorganized the network startup loops so now they are event driven. There is
a single function that gets called to drive it, and it uses callbacks to
perform the different stages of the synchronization. This lets me have a nice,
responsive abort button instead of the previous unannounced hit-escape-to-
abort behavior, and I think the rearranged code is slightly easier to
understand too.
- Increased the number of bytes for version info during D_ArbitrateNetStart(),
in preparation for the day when NETGAMEVERSION requires more than one byte.
- I noticed an issue with Vista RC1 and the new fatal error setup. Even after
releasing a DirectDraw or Direct3D interface, the DWM can still use the
last image drawn using them when it composites the window. It doesn't always
do it but it does often enough that it is a real problem. At this point, I
don't know if it's a problem with the release version of Vista or not.
After messing around, I discovered the problem was caused by ~Win32Video()
hiding the window and then having it immediately shown soon after. The DWM
kept an image of the window to do the transition effect with, and then when
it didn't get a chance to do the transition, it didn't properly forget about
its saved image and kept plastering it on top of everything else
underneath.
- Added a network synchronization panel to the window during netgame startup.
- Fixed: PClass::CreateDerivedClass() must initialize StateList to NULL.
Otherwise, classic DECORATE definitions generate a big, fat crash.
- Resurrected the R_Init progress bar, now as a standard Windows control.
- Removed the sound failure dialog. The FMOD setup already defaulted to no
sound if initialization failed, so this only applies when snd_output is set
to "alternate" which now also falls back to no sound. In addition, it wasn't
working right, and I didn't feel like fixing it for the probably 0% of users
it affected.
- Fixed: The edit control used for logging output added text in reverse order
on Win9x.
- Went back to the roots and made graphics initialization one of the last
things to happen during setup. Now the startup text is visible again. More
importantly, the main window is no longer created invisible, which seems
to cause trouble with it not always appearing in the taskbar. The fatal
error dialog is now also embedded in the main window instead of being a
separate modal dialog, so you can play with the log window to see any
problems that might be reported there.
Rather than completely restoring the original startup order, I tried to
keep things as close to the way they were with early graphics startup. In
particular, V_Init() now creates a dummy screen so that things that need
screen dimensions can get them. It gets replaced by the real screen later
in I_InitGraphics(). Will need to check this under Linux to make sure it
didn't cause any problems there.
- Removed the following stubs that just called functions in Video:
- I_StartModeIterator()
- I_NextMode()
- I_DisplayType()
I_FullscreenChanged() was also removed, and a new fullscreen parameter
was added to IVideo::StartModeIterator(), since that's all it controlled.
- Renamed I_InitHardware() back to I_InitGraphics(), since that's all it's
initialized post-1.22.
SVN r416 (trunk)
2006-12-19 04:09:10 +00:00
|
|
|
#include "hardware.h"
|
2008-01-08 04:00:43 +00:00
|
|
|
#include "sc_man.h"
|
2008-09-14 23:54:38 +00:00
|
|
|
#include "cmdlib.h"
|
|
|
|
#include "d_event.h"
|
2006-02-24 04:48:15 +00:00
|
|
|
|
2009-06-06 15:21:57 +00:00
|
|
|
#include "sbar.h"
|
|
|
|
|
2006-02-24 04:48:15 +00:00
|
|
|
// Data.
|
|
|
|
#include "m_menu.h"
|
|
|
|
|
2009-07-26 03:25:18 +00:00
|
|
|
extern FButtonStatus MenuButtons[NUM_MKEYS];
|
|
|
|
|
2006-04-11 16:27:41 +00:00
|
|
|
EXTERN_CVAR(Bool, nomonsterinterpolation)
|
2007-01-07 09:43:58 +00:00
|
|
|
EXTERN_CVAR(Int, showendoom)
|
2008-01-11 22:38:10 +00:00
|
|
|
EXTERN_CVAR(Bool, hud_althud)
|
2009-01-25 21:59:38 +00:00
|
|
|
EXTERN_CVAR(Int, compatmode)
|
2009-06-14 13:47:38 +00:00
|
|
|
EXTERN_CVAR (Bool, vid_vsync)
|
2009-09-14 21:41:44 +00:00
|
|
|
EXTERN_CVAR(Bool, displaynametags)
|
2009-12-23 11:41:24 +00:00
|
|
|
EXTERN_CVAR (Int, snd_channels)
|
2009-09-14 21:41:44 +00:00
|
|
|
|
2006-02-24 04:48:15 +00:00
|
|
|
//
|
|
|
|
// defaulted values
|
|
|
|
//
|
|
|
|
CVAR (Float, mouse_sensitivity, 1.f, CVAR_ARCHIVE|CVAR_GLOBALCONFIG)
|
|
|
|
|
|
|
|
// Show messages has default, 0 = off, 1 = on
|
|
|
|
CVAR (Bool, show_messages, true, CVAR_ARCHIVE|CVAR_GLOBALCONFIG)
|
2006-05-15 15:28:46 +00:00
|
|
|
CVAR (Bool, show_obituaries, true, CVAR_ARCHIVE)
|
2008-02-16 10:23:12 +00:00
|
|
|
EXTERN_CVAR (Bool, longsavemessages)
|
|
|
|
EXTERN_CVAR (Bool, screenshot_quiet)
|
2006-02-24 04:48:15 +00:00
|
|
|
|
|
|
|
EXTERN_CVAR (Bool, cl_run)
|
|
|
|
EXTERN_CVAR (Int, crosshair)
|
|
|
|
EXTERN_CVAR (Bool, freelook)
|
2006-12-16 11:49:48 +00:00
|
|
|
EXTERN_CVAR (Int, sv_smartaim)
|
2008-08-23 08:48:19 +00:00
|
|
|
EXTERN_CVAR (Int, am_colorset)
|
2009-06-06 15:21:57 +00:00
|
|
|
EXTERN_CVAR (Int, vid_aspect)
|
2006-02-24 04:48:15 +00:00
|
|
|
|
|
|
|
static void CalcIndent (menu_t *menu);
|
|
|
|
|
|
|
|
void M_ChangeMessages ();
|
|
|
|
void M_SizeDisplay (int diff);
|
|
|
|
|
|
|
|
int M_StringHeight (char *string);
|
|
|
|
|
|
|
|
EColorRange LabelColor;
|
|
|
|
EColorRange ValueColor;
|
|
|
|
EColorRange MoreColor;
|
|
|
|
|
|
|
|
static bool CanScrollUp;
|
|
|
|
static bool CanScrollDown;
|
|
|
|
static int VisBottom;
|
|
|
|
|
|
|
|
value_t YesNo[2] = {
|
|
|
|
{ 0.0, "No" },
|
|
|
|
{ 1.0, "Yes" }
|
|
|
|
};
|
|
|
|
|
|
|
|
value_t NoYes[2] = {
|
|
|
|
{ 0.0, "Yes" },
|
|
|
|
{ 1.0, "No" }
|
|
|
|
};
|
|
|
|
|
|
|
|
value_t OnOff[2] = {
|
|
|
|
{ 0.0, "Off" },
|
|
|
|
{ 1.0, "On" }
|
|
|
|
};
|
|
|
|
|
2008-02-16 10:23:12 +00:00
|
|
|
value_t OffOn[2] = {
|
|
|
|
{ 0.0, "On" },
|
|
|
|
{ 1.0, "Off" }
|
|
|
|
};
|
|
|
|
|
2009-09-14 20:47:53 +00:00
|
|
|
value_t CompatModes[6] = {
|
2009-01-25 21:59:38 +00:00
|
|
|
{ 0.0, "Default" },
|
|
|
|
{ 1.0, "Doom" },
|
|
|
|
{ 2.0, "Doom (strict)" },
|
|
|
|
{ 3.0, "Boom" },
|
2009-09-14 20:47:53 +00:00
|
|
|
{ 4.0, "ZDoom 2.0.63" },
|
|
|
|
{ 5.0, "MBF" },
|
2009-01-25 21:59:38 +00:00
|
|
|
};
|
|
|
|
|
2006-02-24 04:48:15 +00:00
|
|
|
menu_t *CurrentMenu;
|
|
|
|
int CurrentItem;
|
2006-12-29 03:38:37 +00:00
|
|
|
static const char *OldMessage;
|
2006-02-24 04:48:15 +00:00
|
|
|
static itemtype OldType;
|
|
|
|
|
|
|
|
int flagsvar;
|
|
|
|
enum
|
|
|
|
{
|
|
|
|
SHOW_DMFlags = 1,
|
|
|
|
SHOW_DMFlags2 = 2,
|
|
|
|
SHOW_CompatFlags = 4
|
|
|
|
};
|
|
|
|
|
|
|
|
/*=======================================
|
|
|
|
*
|
|
|
|
* Confirm Menu - Used by safemore
|
|
|
|
*
|
|
|
|
*=======================================*/
|
2006-12-29 03:38:37 +00:00
|
|
|
static void ActivateConfirm (const char *text, void (*func)());
|
2006-02-24 04:48:15 +00:00
|
|
|
static void ConfirmIsAGo ();
|
|
|
|
|
|
|
|
static menuitem_t ConfirmItems[] = {
|
|
|
|
{ whitetext,NULL, {NULL}, {0}, {0}, {0}, {NULL} },
|
|
|
|
{ redtext, "Do you really want to do this?", {NULL}, {0}, {0}, {0}, {NULL} },
|
|
|
|
{ redtext, " ", {NULL}, {0}, {0}, {0}, {NULL} },
|
|
|
|
{ rightmore,"Yes", {NULL}, {0}, {0}, {0}, {(value_t*)ConfirmIsAGo} },
|
|
|
|
{ rightmore,"No", {NULL}, {0}, {0}, {0}, {(value_t*)M_PopMenuStack} },
|
|
|
|
};
|
|
|
|
|
|
|
|
static menu_t ConfirmMenu = {
|
|
|
|
"PLEASE CONFIRM",
|
|
|
|
3,
|
- Fixed compilation with mingw again.
- Added multiple-choice sound sequences. These overcome one of the major
deficiences of the Hexen-inherited SNDSEQ system while still being Hexen
compatible: Custom door sounds can now use different opening and closing
sequences, for both normal and blazing speeds.
- Added a serializer for TArray.
- Added a countof macro to doomtype.h. See the1's blog to find out why
it's implemented the way it is.
<http://blogs.msdn.com/the1/articles/210011.aspx>
- Added a new method to FRandom for getting random numbers larger than 255,
which lets me:
- Fixed: SNDSEQ delayrand commands could delay for no more than 255 tics.
- Fixed: If you're going to have sector_t.SoundTarget, then they need to
be included in the pointer cleanup scans.
- Ported back newer name code from 2.1.
- Fixed: Using -warp with only one parameter in Doom and Heretic to
select a map on episode 1 no longer worked.
- New: Loading a multiplayer save now restores the players based on
their names rather than on their connection order. Using connection
order was sensible when -net was the only way to start a network game,
but with -host/-join, it's not so nice. Also, if there aren't enough
players in the save, then the extra players will be spawned normally,
so you can continue a saved game with more players than you started it
with.
- Added some new SNDSEQ commands to make it possible to define Heretic's
ambient sounds in SNDSEQ: volumerel, volumerand, slot, randomsequence,
delayonce, and restart. With these, it is basically possible to obsolete
all of the $ambient SNDINFO commands.
- Fixed: Sound sequences would only execute one command each time they were
ticked.
- Fixed: No bounds checking was done on the volume sound sequences played at.
- Fixed: The tic parameter to playloop was useless and caused it to
act like a redundant playrepeat. I have removed all the logic that
caused playloop to play repeating sounds, and now it acts like an
infinite sequence of play/delay commands until the sequence is
stopped.
- Fixed: Sound sequences were ticked every frame, not every tic, so all
the delay commands were timed incorrectly and varied depending on your
framerate. Since this is useful for restarting looping sounds that got
cut off, I have not changed this. Instead, the delay commands now
record the tic when execution should resume, not the number of tics
left to delay.
SVN r57 (trunk)
2006-04-21 01:22:55 +00:00
|
|
|
countof(ConfirmItems),
|
2006-02-24 04:48:15 +00:00
|
|
|
140,
|
|
|
|
ConfirmItems,
|
|
|
|
};
|
|
|
|
|
|
|
|
/*=======================================
|
|
|
|
*
|
|
|
|
* Options Menu
|
|
|
|
*
|
|
|
|
*=======================================*/
|
|
|
|
|
|
|
|
static void CustomizeControls (void);
|
|
|
|
static void GameplayOptions (void);
|
|
|
|
static void CompatibilityOptions (void);
|
|
|
|
static void VideoOptions (void);
|
|
|
|
static void SoundOptions (void);
|
|
|
|
static void MouseOptions (void);
|
|
|
|
static void JoystickOptions (void);
|
|
|
|
static void GoToConsole (void);
|
|
|
|
void M_PlayerSetup (void);
|
|
|
|
void Reset2Defaults (void);
|
|
|
|
void Reset2Saved (void);
|
|
|
|
|
|
|
|
static void SetVidMode (void);
|
|
|
|
|
|
|
|
static menuitem_t OptionItems[] =
|
|
|
|
{
|
|
|
|
{ more, "Customize Controls", {NULL}, {0.0}, {0.0}, {0.0}, {(value_t *)CustomizeControls} },
|
|
|
|
{ more, "Mouse options", {NULL}, {0.0}, {0.0}, {0.0}, {(value_t *)MouseOptions} },
|
|
|
|
{ more, "Joystick options", {NULL}, {0.0}, {0.0}, {0.0}, {(value_t *)JoystickOptions} },
|
|
|
|
{ discrete, "Always Run", {&cl_run}, {2.0}, {0.0}, {0.0}, {OnOff} },
|
|
|
|
{ redtext, " ", {NULL}, {0.0}, {0.0}, {0.0}, {NULL} },
|
|
|
|
{ more, "Player Setup", {NULL}, {0.0}, {0.0}, {0.0}, {(value_t *)M_PlayerSetup} },
|
|
|
|
{ more, "Gameplay Options", {NULL}, {0.0}, {0.0}, {0.0}, {(value_t *)GameplayOptions} },
|
|
|
|
{ more, "Compatibility Options",{NULL}, {0.0}, {0.0}, {0.0}, {(value_t *)CompatibilityOptions} },
|
|
|
|
{ more, "Sound Options", {NULL}, {0.0}, {0.0}, {0.0}, {(value_t *)SoundOptions} },
|
|
|
|
{ more, "Display Options", {NULL}, {0.0}, {0.0}, {0.0}, {(value_t *)VideoOptions} },
|
|
|
|
{ more, "Set video mode", {NULL}, {0.0}, {0.0}, {0.0}, {(value_t *)SetVidMode} },
|
|
|
|
{ redtext, " ", {NULL}, {0.0}, {0.0}, {0.0}, {NULL} },
|
|
|
|
{ safemore, "Reset to defaults", {NULL}, {0.0}, {0.0}, {0.0}, {(value_t *)Reset2Defaults} },
|
|
|
|
{ safemore, "Reset to last saved", {NULL}, {0.0}, {0.0}, {0.0}, {(value_t *)Reset2Saved} },
|
|
|
|
{ more, "Go to console", {NULL}, {0.0}, {0.0}, {0.0}, {(value_t *)GoToConsole} },
|
|
|
|
};
|
|
|
|
|
|
|
|
menu_t OptionMenu =
|
|
|
|
{
|
|
|
|
"OPTIONS",
|
|
|
|
0,
|
- Fixed compilation with mingw again.
- Added multiple-choice sound sequences. These overcome one of the major
deficiences of the Hexen-inherited SNDSEQ system while still being Hexen
compatible: Custom door sounds can now use different opening and closing
sequences, for both normal and blazing speeds.
- Added a serializer for TArray.
- Added a countof macro to doomtype.h. See the1's blog to find out why
it's implemented the way it is.
<http://blogs.msdn.com/the1/articles/210011.aspx>
- Added a new method to FRandom for getting random numbers larger than 255,
which lets me:
- Fixed: SNDSEQ delayrand commands could delay for no more than 255 tics.
- Fixed: If you're going to have sector_t.SoundTarget, then they need to
be included in the pointer cleanup scans.
- Ported back newer name code from 2.1.
- Fixed: Using -warp with only one parameter in Doom and Heretic to
select a map on episode 1 no longer worked.
- New: Loading a multiplayer save now restores the players based on
their names rather than on their connection order. Using connection
order was sensible when -net was the only way to start a network game,
but with -host/-join, it's not so nice. Also, if there aren't enough
players in the save, then the extra players will be spawned normally,
so you can continue a saved game with more players than you started it
with.
- Added some new SNDSEQ commands to make it possible to define Heretic's
ambient sounds in SNDSEQ: volumerel, volumerand, slot, randomsequence,
delayonce, and restart. With these, it is basically possible to obsolete
all of the $ambient SNDINFO commands.
- Fixed: Sound sequences would only execute one command each time they were
ticked.
- Fixed: No bounds checking was done on the volume sound sequences played at.
- Fixed: The tic parameter to playloop was useless and caused it to
act like a redundant playrepeat. I have removed all the logic that
caused playloop to play repeating sounds, and now it acts like an
infinite sequence of play/delay commands until the sequence is
stopped.
- Fixed: Sound sequences were ticked every frame, not every tic, so all
the delay commands were timed incorrectly and varied depending on your
framerate. Since this is useful for restarting looping sounds that got
cut off, I have not changed this. Instead, the delay commands now
record the tic when execution should resume, not the number of tics
left to delay.
SVN r57 (trunk)
2006-04-21 01:22:55 +00:00
|
|
|
countof(OptionItems),
|
2006-02-24 04:48:15 +00:00
|
|
|
0,
|
|
|
|
OptionItems,
|
|
|
|
};
|
|
|
|
|
|
|
|
/*=======================================
|
|
|
|
*
|
|
|
|
* Mouse Menu
|
|
|
|
*
|
|
|
|
*=======================================*/
|
|
|
|
|
|
|
|
EXTERN_CVAR (Bool, use_mouse)
|
2008-05-30 06:56:50 +00:00
|
|
|
EXTERN_CVAR (Bool, smooth_mouse)
|
2006-02-24 04:48:15 +00:00
|
|
|
EXTERN_CVAR (Float, m_forward)
|
|
|
|
EXTERN_CVAR (Float, m_pitch)
|
|
|
|
EXTERN_CVAR (Float, m_side)
|
|
|
|
EXTERN_CVAR (Float, m_yaw)
|
|
|
|
EXTERN_CVAR (Bool, invertmouse)
|
|
|
|
EXTERN_CVAR (Bool, lookspring)
|
|
|
|
EXTERN_CVAR (Bool, lookstrafe)
|
|
|
|
EXTERN_CVAR (Bool, m_noprescale)
|
|
|
|
|
|
|
|
static menuitem_t MouseItems[] =
|
|
|
|
{
|
|
|
|
{ discrete, "Enable mouse", {&use_mouse}, {2.0}, {0.0}, {0.0}, {YesNo} },
|
|
|
|
{ redtext, " ", {NULL}, {0.0}, {0.0}, {0.0}, {NULL} },
|
2009-05-15 10:39:40 +00:00
|
|
|
{ slider, "Overall sensitivity", {&mouse_sensitivity}, {0.5}, {2.5}, {0.1f}, {NULL} },
|
2006-02-24 04:48:15 +00:00
|
|
|
{ discrete, "Prescale mouse movement",{&m_noprescale}, {2.0}, {0.0}, {0.0}, {NoYes} },
|
2009-07-23 03:03:15 +00:00
|
|
|
{ discrete, "Smooth mouse movement",{&smooth_mouse}, {2.0}, {0.0}, {0.0}, {YesNo} },
|
2006-02-24 04:48:15 +00:00
|
|
|
{ redtext, " ", {NULL}, {0.0}, {0.0}, {0.0}, {NULL} },
|
2009-07-23 03:03:15 +00:00
|
|
|
{ slider, "Turning speed", {&m_yaw}, {0.0}, {2.5}, {0.1f}, {NULL} },
|
|
|
|
{ slider, "Mouselook speed", {&m_pitch}, {0.0}, {2.5}, {0.1f}, {NULL} },
|
|
|
|
{ slider, "Forward/Backward speed",{&m_forward}, {0.0}, {2.5}, {0.1f}, {NULL} },
|
|
|
|
{ slider, "Strafing speed", {&m_side}, {0.0}, {2.5}, {0.1f}, {NULL} },
|
2006-02-24 04:48:15 +00:00
|
|
|
{ redtext, " ", {NULL}, {0.0}, {0.0}, {0.0}, {NULL} },
|
|
|
|
{ discrete, "Always Mouselook", {&freelook}, {2.0}, {0.0}, {0.0}, {OnOff} },
|
|
|
|
{ discrete, "Invert Mouse", {&invertmouse}, {2.0}, {0.0}, {0.0}, {OnOff} },
|
|
|
|
{ discrete, "Lookspring", {&lookspring}, {2.0}, {0.0}, {0.0}, {OnOff} },
|
|
|
|
{ discrete, "Lookstrafe", {&lookstrafe}, {2.0}, {0.0}, {0.0}, {OnOff} },
|
|
|
|
};
|
|
|
|
|
|
|
|
menu_t MouseMenu =
|
|
|
|
{
|
|
|
|
"MOUSE OPTIONS",
|
|
|
|
0,
|
- Fixed compilation with mingw again.
- Added multiple-choice sound sequences. These overcome one of the major
deficiences of the Hexen-inherited SNDSEQ system while still being Hexen
compatible: Custom door sounds can now use different opening and closing
sequences, for both normal and blazing speeds.
- Added a serializer for TArray.
- Added a countof macro to doomtype.h. See the1's blog to find out why
it's implemented the way it is.
<http://blogs.msdn.com/the1/articles/210011.aspx>
- Added a new method to FRandom for getting random numbers larger than 255,
which lets me:
- Fixed: SNDSEQ delayrand commands could delay for no more than 255 tics.
- Fixed: If you're going to have sector_t.SoundTarget, then they need to
be included in the pointer cleanup scans.
- Ported back newer name code from 2.1.
- Fixed: Using -warp with only one parameter in Doom and Heretic to
select a map on episode 1 no longer worked.
- New: Loading a multiplayer save now restores the players based on
their names rather than on their connection order. Using connection
order was sensible when -net was the only way to start a network game,
but with -host/-join, it's not so nice. Also, if there aren't enough
players in the save, then the extra players will be spawned normally,
so you can continue a saved game with more players than you started it
with.
- Added some new SNDSEQ commands to make it possible to define Heretic's
ambient sounds in SNDSEQ: volumerel, volumerand, slot, randomsequence,
delayonce, and restart. With these, it is basically possible to obsolete
all of the $ambient SNDINFO commands.
- Fixed: Sound sequences would only execute one command each time they were
ticked.
- Fixed: No bounds checking was done on the volume sound sequences played at.
- Fixed: The tic parameter to playloop was useless and caused it to
act like a redundant playrepeat. I have removed all the logic that
caused playloop to play repeating sounds, and now it acts like an
infinite sequence of play/delay commands until the sequence is
stopped.
- Fixed: Sound sequences were ticked every frame, not every tic, so all
the delay commands were timed incorrectly and varied depending on your
framerate. Since this is useful for restarting looping sounds that got
cut off, I have not changed this. Instead, the delay commands now
record the tic when execution should resume, not the number of tics
left to delay.
SVN r57 (trunk)
2006-04-21 01:22:55 +00:00
|
|
|
countof(MouseItems),
|
2006-02-24 04:48:15 +00:00
|
|
|
0,
|
|
|
|
MouseItems,
|
|
|
|
};
|
|
|
|
|
|
|
|
/*=======================================
|
|
|
|
*
|
|
|
|
* Joystick Menu
|
|
|
|
*
|
|
|
|
*=======================================*/
|
|
|
|
|
2009-07-15 05:53:06 +00:00
|
|
|
EXTERN_CVAR(Bool, use_joystick)
|
|
|
|
EXTERN_CVAR(Bool, joy_ps2raw)
|
|
|
|
EXTERN_CVAR(Bool, joy_dinput)
|
|
|
|
EXTERN_CVAR(Bool, joy_xinput)
|
|
|
|
|
|
|
|
static TArray<IJoystickConfig *> Joysticks;
|
|
|
|
static TArray<menuitem_t> JoystickItems;
|
|
|
|
|
|
|
|
menu_t JoystickMenu =
|
|
|
|
{
|
|
|
|
"CONTROLLER OPTIONS",
|
|
|
|
};
|
|
|
|
|
|
|
|
/*=======================================
|
|
|
|
*
|
|
|
|
* Joystick Config Menu
|
|
|
|
*
|
|
|
|
*=======================================*/
|
|
|
|
|
|
|
|
IJoystickConfig *SELECTED_JOYSTICK;
|
2006-02-24 04:48:15 +00:00
|
|
|
|
|
|
|
static value_t JoyAxisMapNames[6] =
|
|
|
|
{
|
2009-06-26 02:45:05 +00:00
|
|
|
{ (float)JOYAXIS_None, "None" },
|
|
|
|
{ (float)JOYAXIS_Yaw, "Turning" },
|
|
|
|
{ (float)JOYAXIS_Pitch, "Looking Up/Down" },
|
|
|
|
{ (float)JOYAXIS_Forward, "Moving Forward" },
|
|
|
|
{ (float)JOYAXIS_Side, "Strafing" },
|
|
|
|
{ (float)JOYAXIS_Up, "Moving Up/Down" }
|
2006-02-24 04:48:15 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
static value_t Inversion[2] =
|
|
|
|
{
|
|
|
|
{ 0.0, "Not Inverted" },
|
|
|
|
{ 1.0, "Inverted" }
|
|
|
|
};
|
|
|
|
|
2009-07-15 05:53:06 +00:00
|
|
|
static TArray<menuitem_t> JoystickConfigItems;
|
2006-02-24 04:48:15 +00:00
|
|
|
|
2009-07-15 05:53:06 +00:00
|
|
|
menu_t JoystickConfigMenu =
|
2006-02-24 04:48:15 +00:00
|
|
|
{
|
2009-07-15 05:53:06 +00:00
|
|
|
"CONFIGURE CONTROLLER",
|
2006-02-24 04:48:15 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
/*=======================================
|
|
|
|
*
|
|
|
|
* Controls Menu
|
|
|
|
*
|
|
|
|
*=======================================*/
|
|
|
|
|
2009-10-25 15:26:19 +00:00
|
|
|
menuitem_t ControlsItems[] =
|
2006-02-24 04:48:15 +00:00
|
|
|
{
|
|
|
|
{ redtext,"ENTER to change, BACKSPACE to clear", {NULL}, {0.0}, {0.0}, {0.0}, {NULL} },
|
|
|
|
{ redtext, " ", {NULL}, {0.0}, {0.0}, {0.0}, {NULL} },
|
|
|
|
{ whitetext,"Controls", {NULL}, {0.0}, {0.0}, {0.0}, {NULL} },
|
|
|
|
{ control, "Fire", {NULL}, {0.0}, {0.0}, {0.0}, {(value_t *)"+attack"} },
|
|
|
|
{ control, "Secondary Fire", {NULL}, {0.0}, {0.0}, {0.0}, {(value_t *)"+altattack"} },
|
|
|
|
{ control, "Use / Open", {NULL}, {0.0}, {0.0}, {0.0}, {(value_t *)"+use"} },
|
|
|
|
{ control, "Move forward", {NULL}, {0.0}, {0.0}, {0.0}, {(value_t *)"+forward"} },
|
|
|
|
{ control, "Move backward", {NULL}, {0.0}, {0.0}, {0.0}, {(value_t *)"+back"} },
|
|
|
|
{ control, "Strafe left", {NULL}, {0.0}, {0.0}, {0.0}, {(value_t *)"+moveleft"} },
|
|
|
|
{ control, "Strafe right", {NULL}, {0.0}, {0.0}, {0.0}, {(value_t *)"+moveright"} },
|
|
|
|
{ control, "Turn left", {NULL}, {0.0}, {0.0}, {0.0}, {(value_t *)"+left"} },
|
|
|
|
{ control, "Turn right", {NULL}, {0.0}, {0.0}, {0.0}, {(value_t *)"+right"} },
|
|
|
|
{ control, "Jump", {NULL}, {0.0}, {0.0}, {0.0}, {(value_t *)"+jump"} },
|
2006-05-14 14:30:13 +00:00
|
|
|
{ control, "Crouch", {NULL}, {0.0}, {0.0}, {0.0}, {(value_t *)"+crouch"} },
|
|
|
|
{ control, "Crouch Toggle", {NULL}, {0.0}, {0.0}, {0.0}, {(value_t *)"crouch"} },
|
2006-02-24 04:48:15 +00:00
|
|
|
{ control, "Fly / Swim up", {NULL}, {0.0}, {0.0}, {0.0}, {(value_t *)"+moveup"} },
|
|
|
|
{ control, "Fly / Swim down", {NULL}, {0.0}, {0.0}, {0.0}, {(value_t *)"+movedown"} },
|
|
|
|
{ control, "Stop flying", {NULL}, {0.0}, {0.0}, {0.0}, {(value_t *)"land"} },
|
|
|
|
{ control, "Mouse look", {NULL}, {0.0}, {0.0}, {0.0}, {(value_t *)"+mlook"} },
|
|
|
|
{ control, "Keyboard look", {NULL}, {0.0}, {0.0}, {0.0}, {(value_t *)"+klook"} },
|
|
|
|
{ control, "Look up", {NULL}, {0.0}, {0.0}, {0.0}, {(value_t *)"+lookup"} },
|
|
|
|
{ control, "Look down", {NULL}, {0.0}, {0.0}, {0.0}, {(value_t *)"+lookdown"} },
|
|
|
|
{ control, "Center view", {NULL}, {0.0}, {0.0}, {0.0}, {(value_t *)"centerview"} },
|
|
|
|
{ control, "Run", {NULL}, {0.0}, {0.0}, {0.0}, {(value_t *)"+speed"} },
|
|
|
|
{ control, "Strafe", {NULL}, {0.0}, {0.0}, {0.0}, {(value_t *)"+strafe"} },
|
2007-12-06 14:33:28 +00:00
|
|
|
{ control, "Show Scoreboard", {NULL}, {0.0}, {0.0}, {0.0}, {(value_t *)"+showscores"} },
|
2006-02-24 04:48:15 +00:00
|
|
|
{ redtext, " ", {NULL}, {0.0}, {0.0}, {0.0}, {NULL} },
|
|
|
|
{ whitetext,"Chat", {NULL}, {0.0}, {0.0}, {0.0}, {NULL} },
|
|
|
|
{ control, "Say", {NULL}, {0.0}, {0.0}, {0.0}, {(value_t *)"messagemode"} },
|
|
|
|
{ control, "Team say", {NULL}, {0.0}, {0.0}, {0.0}, {(value_t *)"messagemode2"} },
|
|
|
|
{ redtext, " ", {NULL}, {0.0}, {0.0}, {0.0}, {NULL} },
|
|
|
|
{ whitetext,"Weapons", {NULL}, {0.0}, {0.0}, {0.0}, {NULL} },
|
|
|
|
{ control, "Next weapon", {NULL}, {0.0}, {0.0}, {0.0}, {(value_t *)"weapnext"} },
|
|
|
|
{ control, "Previous weapon", {NULL}, {0.0}, {0.0}, {0.0}, {(value_t *)"weapprev"} },
|
|
|
|
{ redtext, " ", {NULL}, {0.0}, {0.0}, {0.0}, {NULL} },
|
|
|
|
{ whitetext,"Inventory", {NULL}, {0.0}, {0.0}, {0.0}, {NULL} },
|
|
|
|
{ control, "Activate item", {NULL}, {0.0}, {0.0}, {0.0}, {(value_t *)"invuse"} },
|
|
|
|
{ control, "Activate all items", {NULL}, {0.0}, {0.0}, {0.0}, {(value_t *)"invuseall"} },
|
|
|
|
{ control, "Next item", {NULL}, {0.0}, {0.0}, {0.0}, {(value_t *)"invnext"} },
|
|
|
|
{ control, "Previous item", {NULL}, {0.0}, {0.0}, {0.0}, {(value_t *)"invprev"} },
|
|
|
|
{ control, "Drop item", {NULL}, {0.0}, {0.0}, {0.0}, {(value_t *)"invdrop"} },
|
2009-02-28 21:38:20 +00:00
|
|
|
{ control, "Query item", {NULL}, {0.0}, {0.0}, {0.0}, {(value_t *)"invquery"} },
|
2009-01-31 03:07:02 +00:00
|
|
|
{ control, "Drop weapon", {NULL}, {0.0}, {0.0}, {0.0}, {(value_t *)"weapdrop"} },
|
2006-02-24 04:48:15 +00:00
|
|
|
{ redtext, " ", {NULL}, {0.0}, {0.0}, {0.0}, {NULL} },
|
|
|
|
{ whitetext,"Other", {NULL}, {0.0}, {0.0}, {0.0}, {NULL} },
|
|
|
|
{ control, "Toggle automap", {NULL}, {0.0}, {0.0}, {0.0}, {(value_t *)"togglemap"} },
|
|
|
|
{ control, "Chasecam", {NULL}, {0.0}, {0.0}, {0.0}, {(value_t *)"chase"} },
|
|
|
|
{ control, "Coop spy", {NULL}, {0.0}, {0.0}, {0.0}, {(value_t *)"spynext"} },
|
|
|
|
{ control, "Screenshot", {NULL}, {0.0}, {0.0}, {0.0}, {(value_t *)"screenshot"} },
|
|
|
|
{ control, "Open console", {NULL}, {0.0}, {0.0}, {0.0}, {(value_t *)"toggleconsole"} },
|
|
|
|
{ redtext, " ", {NULL}, {0.0}, {0.0}, {0.0}, {NULL} },
|
|
|
|
{ whitetext,"Strife Popup Screens", {NULL}, {0.0}, {0.0}, {0.0}, {NULL} },
|
|
|
|
{ control, "Mission objectives", {NULL}, {0.0}, {0.0}, {0.0}, {(value_t *)"showpop 1"} },
|
|
|
|
{ control, "Keys list", {NULL}, {0.0}, {0.0}, {0.0}, {(value_t *)"showpop 2"} },
|
|
|
|
{ control, "Weapons/ammo/stats", {NULL}, {0.0}, {0.0}, {0.0}, {(value_t *)"showpop 3"} },
|
|
|
|
};
|
|
|
|
|
|
|
|
static TArray<menuitem_t> CustomControlsItems (0);
|
|
|
|
|
|
|
|
menu_t ControlsMenu =
|
|
|
|
{
|
|
|
|
"CUSTOMIZE CONTROLS",
|
|
|
|
3,
|
- Fixed compilation with mingw again.
- Added multiple-choice sound sequences. These overcome one of the major
deficiences of the Hexen-inherited SNDSEQ system while still being Hexen
compatible: Custom door sounds can now use different opening and closing
sequences, for both normal and blazing speeds.
- Added a serializer for TArray.
- Added a countof macro to doomtype.h. See the1's blog to find out why
it's implemented the way it is.
<http://blogs.msdn.com/the1/articles/210011.aspx>
- Added a new method to FRandom for getting random numbers larger than 255,
which lets me:
- Fixed: SNDSEQ delayrand commands could delay for no more than 255 tics.
- Fixed: If you're going to have sector_t.SoundTarget, then they need to
be included in the pointer cleanup scans.
- Ported back newer name code from 2.1.
- Fixed: Using -warp with only one parameter in Doom and Heretic to
select a map on episode 1 no longer worked.
- New: Loading a multiplayer save now restores the players based on
their names rather than on their connection order. Using connection
order was sensible when -net was the only way to start a network game,
but with -host/-join, it's not so nice. Also, if there aren't enough
players in the save, then the extra players will be spawned normally,
so you can continue a saved game with more players than you started it
with.
- Added some new SNDSEQ commands to make it possible to define Heretic's
ambient sounds in SNDSEQ: volumerel, volumerand, slot, randomsequence,
delayonce, and restart. With these, it is basically possible to obsolete
all of the $ambient SNDINFO commands.
- Fixed: Sound sequences would only execute one command each time they were
ticked.
- Fixed: No bounds checking was done on the volume sound sequences played at.
- Fixed: The tic parameter to playloop was useless and caused it to
act like a redundant playrepeat. I have removed all the logic that
caused playloop to play repeating sounds, and now it acts like an
infinite sequence of play/delay commands until the sequence is
stopped.
- Fixed: Sound sequences were ticked every frame, not every tic, so all
the delay commands were timed incorrectly and varied depending on your
framerate. Since this is useful for restarting looping sounds that got
cut off, I have not changed this. Instead, the delay commands now
record the tic when execution should resume, not the number of tics
left to delay.
SVN r57 (trunk)
2006-04-21 01:22:55 +00:00
|
|
|
countof(ControlsItems),
|
2006-02-24 04:48:15 +00:00
|
|
|
0,
|
|
|
|
ControlsItems,
|
|
|
|
2,
|
|
|
|
};
|
|
|
|
|
|
|
|
/*=======================================
|
|
|
|
*
|
|
|
|
* Display Options Menu
|
|
|
|
*
|
|
|
|
*=======================================*/
|
|
|
|
static void StartMessagesMenu (void);
|
|
|
|
static void StartAutomapMenu (void);
|
2007-12-06 14:33:28 +00:00
|
|
|
static void StartScoreboardMenu (void);
|
2008-01-08 04:00:43 +00:00
|
|
|
static void InitCrosshairsList();
|
2006-02-24 04:48:15 +00:00
|
|
|
|
|
|
|
EXTERN_CVAR (Bool, st_scale)
|
|
|
|
EXTERN_CVAR (Bool, r_stretchsky)
|
|
|
|
EXTERN_CVAR (Int, r_columnmethod)
|
|
|
|
EXTERN_CVAR (Bool, r_drawfuzz)
|
|
|
|
EXTERN_CVAR (Int, cl_rockettrails)
|
|
|
|
EXTERN_CVAR (Int, cl_pufftype)
|
|
|
|
EXTERN_CVAR (Int, cl_bloodtype)
|
|
|
|
EXTERN_CVAR (Int, wipetype)
|
|
|
|
EXTERN_CVAR (Bool, vid_palettehack)
|
|
|
|
EXTERN_CVAR (Bool, vid_attachedsurfaces)
|
|
|
|
EXTERN_CVAR (Int, screenblocks)
|
|
|
|
|
2008-01-08 04:00:43 +00:00
|
|
|
static TArray<valuestring_t> Crosshairs;
|
2006-02-24 04:48:15 +00:00
|
|
|
|
|
|
|
static value_t ColumnMethods[] = {
|
|
|
|
{ 0.0, "Original" },
|
|
|
|
{ 1.0, "Optimized" }
|
|
|
|
};
|
|
|
|
|
2008-04-04 14:31:20 +00:00
|
|
|
static value_t RocketTrailTypes[] = {
|
|
|
|
{ 0.0, "Off" },
|
|
|
|
{ 1.0, "Particles" },
|
|
|
|
{ 2.0, "Sprites" },
|
|
|
|
{ 3.0, "Sprites & Particles" }
|
|
|
|
};
|
|
|
|
|
2006-02-24 04:48:15 +00:00
|
|
|
static value_t BloodTypes[] = {
|
|
|
|
{ 0.0, "Sprites" },
|
2006-05-14 14:30:13 +00:00
|
|
|
{ 1.0, "Sprites & Particles" },
|
2006-02-24 04:48:15 +00:00
|
|
|
{ 2.0, "Particles" }
|
|
|
|
};
|
|
|
|
|
|
|
|
static value_t PuffTypes[] = {
|
|
|
|
{ 0.0, "Sprites" },
|
|
|
|
{ 1.0, "Particles" }
|
|
|
|
};
|
|
|
|
|
|
|
|
static value_t Wipes[] = {
|
|
|
|
{ 0.0, "None" },
|
|
|
|
{ 1.0, "Melt" },
|
|
|
|
{ 2.0, "Burn" },
|
|
|
|
{ 3.0, "Crossfade" }
|
|
|
|
};
|
|
|
|
|
2007-01-07 09:43:58 +00:00
|
|
|
static value_t Endoom[] = {
|
|
|
|
{ 0.0, "Off" },
|
|
|
|
{ 1.0, "On" },
|
|
|
|
{ 2.0, "Only modified" }
|
|
|
|
};
|
|
|
|
|
2006-02-24 04:48:15 +00:00
|
|
|
static menuitem_t VideoItems[] = {
|
|
|
|
{ more, "Message Options", {NULL}, {0.0}, {0.0}, {0.0}, {(value_t *)StartMessagesMenu} },
|
|
|
|
{ more, "Automap Options", {NULL}, {0.0}, {0.0}, {0.0}, {(value_t *)StartAutomapMenu} },
|
2007-12-06 14:33:28 +00:00
|
|
|
{ more, "Scoreboard Options", {NULL}, {0.0}, {0.0}, {0.0}, {(value_t *)StartScoreboardMenu} },
|
2006-02-24 04:48:15 +00:00
|
|
|
{ redtext, " ", {NULL}, {0.0}, {0.0}, {0.0}, {NULL} },
|
|
|
|
{ slider, "Screen size", {&screenblocks}, {3.0}, {12.0}, {1.0}, {NULL} },
|
2009-05-15 10:39:40 +00:00
|
|
|
{ slider, "Brightness", {&Gamma}, {1.0}, {3.0}, {0.1f}, {NULL} },
|
2009-06-14 13:47:38 +00:00
|
|
|
{ discrete, "Vertical Sync", {&vid_vsync}, {2.0}, {0.0}, {0.0}, {OnOff} },
|
2008-01-08 04:00:43 +00:00
|
|
|
{ discretes,"Crosshair", {&crosshair}, {8.0}, {0.0}, {0.0}, {NULL} },
|
2006-02-24 04:48:15 +00:00
|
|
|
{ discrete, "Column render mode", {&r_columnmethod}, {2.0}, {0.0}, {0.0}, {ColumnMethods} },
|
|
|
|
{ discrete, "Stretch short skies", {&r_stretchsky}, {2.0}, {0.0}, {0.0}, {OnOff} },
|
|
|
|
{ discrete, "Stretch status bar", {&st_scale}, {2.0}, {0.0}, {0.0}, {OnOff} },
|
2008-01-11 22:38:10 +00:00
|
|
|
{ discrete, "Alternative HUD", {&hud_althud}, {2.0}, {0.0}, {0.0}, {OnOff} },
|
2006-02-24 04:48:15 +00:00
|
|
|
{ discrete, "Screen wipe style", {&wipetype}, {4.0}, {0.0}, {0.0}, {Wipes} },
|
|
|
|
#ifdef _WIN32
|
2007-01-07 09:43:58 +00:00
|
|
|
{ discrete, "Show ENDOOM screen", {&showendoom}, {3.0}, {0.0}, {0.0}, {Endoom} },
|
2006-02-24 04:48:15 +00:00
|
|
|
{ discrete, "DirectDraw palette hack", {&vid_palettehack}, {2.0}, {0.0}, {0.0}, {OnOff} },
|
|
|
|
{ discrete, "Use attached surfaces", {&vid_attachedsurfaces},{2.0}, {0.0}, {0.0}, {OnOff} },
|
|
|
|
#endif
|
|
|
|
{ redtext, " ", {NULL}, {0.0}, {0.0}, {0.0}, {NULL} },
|
|
|
|
{ discrete, "Use fuzz effect", {&r_drawfuzz}, {2.0}, {0.0}, {0.0}, {YesNo} },
|
2008-04-04 14:31:20 +00:00
|
|
|
{ discrete, "Rocket Trails", {&cl_rockettrails}, {4.0}, {0.0}, {0.0}, {RocketTrailTypes} },
|
2006-02-24 04:48:15 +00:00
|
|
|
{ discrete, "Blood Type", {&cl_bloodtype}, {3.0}, {0.0}, {0.0}, {BloodTypes} },
|
|
|
|
{ discrete, "Bullet Puff Type", {&cl_pufftype}, {2.0}, {0.0}, {0.0}, {PuffTypes} },
|
2009-09-14 21:41:44 +00:00
|
|
|
{ discrete, "Display nametags", {&displaynametags}, {2.0}, {0.0}, {0.0}, {YesNo} },
|
2006-02-24 04:48:15 +00:00
|
|
|
};
|
|
|
|
|
2009-06-14 13:47:38 +00:00
|
|
|
#define CROSSHAIR_INDEX 7
|
2008-01-10 11:02:07 +00:00
|
|
|
|
2006-02-24 04:48:15 +00:00
|
|
|
menu_t VideoMenu =
|
|
|
|
{
|
|
|
|
"DISPLAY OPTIONS",
|
|
|
|
0,
|
- Fixed compilation with mingw again.
- Added multiple-choice sound sequences. These overcome one of the major
deficiences of the Hexen-inherited SNDSEQ system while still being Hexen
compatible: Custom door sounds can now use different opening and closing
sequences, for both normal and blazing speeds.
- Added a serializer for TArray.
- Added a countof macro to doomtype.h. See the1's blog to find out why
it's implemented the way it is.
<http://blogs.msdn.com/the1/articles/210011.aspx>
- Added a new method to FRandom for getting random numbers larger than 255,
which lets me:
- Fixed: SNDSEQ delayrand commands could delay for no more than 255 tics.
- Fixed: If you're going to have sector_t.SoundTarget, then they need to
be included in the pointer cleanup scans.
- Ported back newer name code from 2.1.
- Fixed: Using -warp with only one parameter in Doom and Heretic to
select a map on episode 1 no longer worked.
- New: Loading a multiplayer save now restores the players based on
their names rather than on their connection order. Using connection
order was sensible when -net was the only way to start a network game,
but with -host/-join, it's not so nice. Also, if there aren't enough
players in the save, then the extra players will be spawned normally,
so you can continue a saved game with more players than you started it
with.
- Added some new SNDSEQ commands to make it possible to define Heretic's
ambient sounds in SNDSEQ: volumerel, volumerand, slot, randomsequence,
delayonce, and restart. With these, it is basically possible to obsolete
all of the $ambient SNDINFO commands.
- Fixed: Sound sequences would only execute one command each time they were
ticked.
- Fixed: No bounds checking was done on the volume sound sequences played at.
- Fixed: The tic parameter to playloop was useless and caused it to
act like a redundant playrepeat. I have removed all the logic that
caused playloop to play repeating sounds, and now it acts like an
infinite sequence of play/delay commands until the sequence is
stopped.
- Fixed: Sound sequences were ticked every frame, not every tic, so all
the delay commands were timed incorrectly and varied depending on your
framerate. Since this is useful for restarting looping sounds that got
cut off, I have not changed this. Instead, the delay commands now
record the tic when execution should resume, not the number of tics
left to delay.
SVN r57 (trunk)
2006-04-21 01:22:55 +00:00
|
|
|
countof(VideoItems),
|
2006-02-24 04:48:15 +00:00
|
|
|
0,
|
|
|
|
VideoItems,
|
|
|
|
};
|
|
|
|
|
|
|
|
/*=======================================
|
|
|
|
*
|
|
|
|
* Automap Menu
|
|
|
|
*
|
|
|
|
*=======================================*/
|
|
|
|
static void StartMapColorsMenu (void);
|
|
|
|
|
2006-05-10 03:24:32 +00:00
|
|
|
EXTERN_CVAR (Int, am_rotate)
|
2006-05-10 03:17:34 +00:00
|
|
|
EXTERN_CVAR (Int, am_overlay)
|
2006-02-24 04:48:15 +00:00
|
|
|
EXTERN_CVAR (Bool, am_showitems)
|
|
|
|
EXTERN_CVAR (Bool, am_showmonsters)
|
|
|
|
EXTERN_CVAR (Bool, am_showsecrets)
|
|
|
|
EXTERN_CVAR (Bool, am_showtime)
|
2006-04-11 16:27:41 +00:00
|
|
|
EXTERN_CVAR (Int, am_map_secrets)
|
|
|
|
EXTERN_CVAR (Bool, am_showtotaltime)
|
|
|
|
EXTERN_CVAR (Bool, am_drawmapback)
|
2006-02-24 04:48:15 +00:00
|
|
|
|
|
|
|
static value_t MapColorTypes[] = {
|
2008-08-23 08:48:19 +00:00
|
|
|
{ 0, "Custom" },
|
|
|
|
{ 1, "Traditional Doom" },
|
2009-04-14 09:06:03 +00:00
|
|
|
{ 2, "Traditional Strife" },
|
|
|
|
{ 3, "Traditional Raven" }
|
2006-02-24 04:48:15 +00:00
|
|
|
};
|
|
|
|
|
2006-04-11 16:27:41 +00:00
|
|
|
static value_t SecretTypes[] = {
|
|
|
|
{ 0, "Never" },
|
|
|
|
{ 1, "Only when found" },
|
|
|
|
{ 2, "Always" },
|
|
|
|
};
|
|
|
|
|
2006-05-10 03:24:32 +00:00
|
|
|
static value_t RotateTypes[] = {
|
2006-05-10 03:17:34 +00:00
|
|
|
{ 0, "Off" },
|
|
|
|
{ 1, "On" },
|
2006-05-10 03:24:32 +00:00
|
|
|
{ 2, "On for overlay only" }
|
|
|
|
};
|
|
|
|
|
|
|
|
static value_t OverlayTypes[] = {
|
|
|
|
{ 0, "Off" },
|
|
|
|
{ 1, "Overlay+Normal" },
|
|
|
|
{ 2, "Overlay Only" }
|
2006-05-10 03:17:34 +00:00
|
|
|
};
|
|
|
|
|
2006-02-24 04:48:15 +00:00
|
|
|
static menuitem_t AutomapItems[] = {
|
2009-04-14 09:06:03 +00:00
|
|
|
{ discrete, "Map color set", {&am_colorset}, {4.0}, {0.0}, {0.0}, {MapColorTypes} },
|
2006-02-24 04:48:15 +00:00
|
|
|
{ more, "Set custom colors", {NULL}, {0.0}, {0.0}, {0.0}, {(value_t*)StartMapColorsMenu} },
|
|
|
|
{ redtext, " ", {NULL}, {0.0}, {0.0}, {0.0}, {NULL} },
|
2006-05-10 03:24:32 +00:00
|
|
|
{ discrete, "Rotate automap", {&am_rotate}, {3.0}, {0.0}, {0.0}, {RotateTypes} },
|
2006-05-10 03:17:34 +00:00
|
|
|
{ discrete, "Overlay automap", {&am_overlay}, {3.0}, {0.0}, {0.0}, {OverlayTypes} },
|
2006-02-24 04:48:15 +00:00
|
|
|
{ redtext, " ", {NULL}, {0.0}, {0.0}, {0.0}, {NULL} },
|
|
|
|
{ discrete, "Show item counts", {&am_showitems}, {2.0}, {0.0}, {0.0}, {OnOff} },
|
|
|
|
{ discrete, "Show monster counts", {&am_showmonsters}, {2.0}, {0.0}, {0.0}, {OnOff} },
|
|
|
|
{ discrete, "Show secret counts", {&am_showsecrets}, {2.0}, {0.0}, {0.0}, {OnOff} },
|
|
|
|
{ discrete, "Show time elapsed", {&am_showtime}, {2.0}, {0.0}, {0.0}, {OnOff} },
|
2006-04-11 16:27:41 +00:00
|
|
|
{ discrete, "Show total time elapsed", {&am_showtotaltime}, {2.0}, {0.0}, {0.0}, {OnOff} },
|
|
|
|
{ discrete, "Show secrets on map", {&am_map_secrets}, {3.0}, {0.0}, {0.0}, {SecretTypes} },
|
2006-05-10 03:24:32 +00:00
|
|
|
{ discrete, "Draw map background", {&am_drawmapback}, {2.0}, {0.0}, {0.0}, {OnOff} },
|
2006-02-24 04:48:15 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
menu_t AutomapMenu =
|
|
|
|
{
|
|
|
|
"AUTOMAP OPTIONS",
|
|
|
|
0,
|
- Fixed compilation with mingw again.
- Added multiple-choice sound sequences. These overcome one of the major
deficiences of the Hexen-inherited SNDSEQ system while still being Hexen
compatible: Custom door sounds can now use different opening and closing
sequences, for both normal and blazing speeds.
- Added a serializer for TArray.
- Added a countof macro to doomtype.h. See the1's blog to find out why
it's implemented the way it is.
<http://blogs.msdn.com/the1/articles/210011.aspx>
- Added a new method to FRandom for getting random numbers larger than 255,
which lets me:
- Fixed: SNDSEQ delayrand commands could delay for no more than 255 tics.
- Fixed: If you're going to have sector_t.SoundTarget, then they need to
be included in the pointer cleanup scans.
- Ported back newer name code from 2.1.
- Fixed: Using -warp with only one parameter in Doom and Heretic to
select a map on episode 1 no longer worked.
- New: Loading a multiplayer save now restores the players based on
their names rather than on their connection order. Using connection
order was sensible when -net was the only way to start a network game,
but with -host/-join, it's not so nice. Also, if there aren't enough
players in the save, then the extra players will be spawned normally,
so you can continue a saved game with more players than you started it
with.
- Added some new SNDSEQ commands to make it possible to define Heretic's
ambient sounds in SNDSEQ: volumerel, volumerand, slot, randomsequence,
delayonce, and restart. With these, it is basically possible to obsolete
all of the $ambient SNDINFO commands.
- Fixed: Sound sequences would only execute one command each time they were
ticked.
- Fixed: No bounds checking was done on the volume sound sequences played at.
- Fixed: The tic parameter to playloop was useless and caused it to
act like a redundant playrepeat. I have removed all the logic that
caused playloop to play repeating sounds, and now it acts like an
infinite sequence of play/delay commands until the sequence is
stopped.
- Fixed: Sound sequences were ticked every frame, not every tic, so all
the delay commands were timed incorrectly and varied depending on your
framerate. Since this is useful for restarting looping sounds that got
cut off, I have not changed this. Instead, the delay commands now
record the tic when execution should resume, not the number of tics
left to delay.
SVN r57 (trunk)
2006-04-21 01:22:55 +00:00
|
|
|
countof(AutomapItems),
|
2006-02-24 04:48:15 +00:00
|
|
|
0,
|
|
|
|
AutomapItems,
|
|
|
|
};
|
|
|
|
|
|
|
|
/*=======================================
|
|
|
|
*
|
|
|
|
* Map Colors Menu
|
|
|
|
*
|
|
|
|
*=======================================*/
|
|
|
|
static void DefaultCustomColors();
|
|
|
|
|
|
|
|
EXTERN_CVAR (Color, am_backcolor)
|
|
|
|
EXTERN_CVAR (Color, am_yourcolor)
|
|
|
|
EXTERN_CVAR (Color, am_wallcolor)
|
|
|
|
EXTERN_CVAR (Color, am_secretwallcolor)
|
|
|
|
EXTERN_CVAR (Color, am_tswallcolor)
|
|
|
|
EXTERN_CVAR (Color, am_fdwallcolor)
|
|
|
|
EXTERN_CVAR (Color, am_cdwallcolor)
|
|
|
|
EXTERN_CVAR (Color, am_thingcolor)
|
|
|
|
EXTERN_CVAR (Color, am_gridcolor)
|
|
|
|
EXTERN_CVAR (Color, am_xhaircolor)
|
|
|
|
EXTERN_CVAR (Color, am_notseencolor)
|
|
|
|
EXTERN_CVAR (Color, am_lockedcolor)
|
|
|
|
EXTERN_CVAR (Color, am_ovyourcolor)
|
|
|
|
EXTERN_CVAR (Color, am_ovwallcolor)
|
|
|
|
EXTERN_CVAR (Color, am_ovthingcolor)
|
|
|
|
EXTERN_CVAR (Color, am_ovotherwallscolor)
|
|
|
|
EXTERN_CVAR (Color, am_ovunseencolor)
|
|
|
|
EXTERN_CVAR (Color, am_ovtelecolor)
|
|
|
|
EXTERN_CVAR (Color, am_intralevelcolor)
|
|
|
|
EXTERN_CVAR (Color, am_interlevelcolor)
|
2006-04-11 16:27:41 +00:00
|
|
|
EXTERN_CVAR (Color, am_secretsectorcolor)
|
|
|
|
EXTERN_CVAR (Color, am_thingcolor_friend)
|
|
|
|
EXTERN_CVAR (Color, am_thingcolor_monster)
|
|
|
|
EXTERN_CVAR (Color, am_thingcolor_item)
|
|
|
|
EXTERN_CVAR (Color, am_ovthingcolor_friend)
|
|
|
|
EXTERN_CVAR (Color, am_ovthingcolor_monster)
|
|
|
|
EXTERN_CVAR (Color, am_ovthingcolor_item)
|
2006-02-24 04:48:15 +00:00
|
|
|
|
|
|
|
static menuitem_t MapColorsItems[] = {
|
|
|
|
{ rsafemore, "Restore default custom colors", {NULL}, {0}, {0}, {0}, {(value_t*)DefaultCustomColors} },
|
|
|
|
{ redtext, " ", {NULL}, {0}, {0}, {0}, {0} },
|
|
|
|
{ colorpicker, "Background", {&am_backcolor}, {0}, {0}, {0}, {0} },
|
|
|
|
{ colorpicker, "You", {&am_yourcolor}, {0}, {0}, {0}, {0} },
|
|
|
|
{ colorpicker, "1-sided walls", {&am_wallcolor}, {0}, {0}, {0}, {0} },
|
|
|
|
{ colorpicker, "2-sided walls with different floors", {&am_fdwallcolor}, {0}, {0}, {0}, {0} },
|
|
|
|
{ colorpicker, "2-sided walls with different ceilings", {&am_cdwallcolor}, {0}, {0}, {0}, {0} },
|
|
|
|
{ colorpicker, "Map grid", {&am_gridcolor}, {0}, {0}, {0}, {0} },
|
|
|
|
{ colorpicker, "Center point", {&am_xhaircolor}, {0}, {0}, {0}, {0} },
|
|
|
|
{ colorpicker, "Not-yet-seen walls", {&am_notseencolor}, {0}, {0}, {0}, {0} },
|
|
|
|
{ colorpicker, "Locked doors", {&am_lockedcolor}, {0}, {0}, {0}, {0} },
|
|
|
|
{ colorpicker, "Teleporter to the same map", {&am_intralevelcolor}, {0}, {0}, {0}, {0} },
|
|
|
|
{ colorpicker, "Teleporter to a different map", {&am_interlevelcolor}, {0}, {0}, {0}, {0} },
|
2006-04-11 16:27:41 +00:00
|
|
|
{ colorpicker, "Secret sector", {&am_secretsectorcolor}, {0}, {0}, {0}, {0} },
|
2006-02-24 04:48:15 +00:00
|
|
|
{ redtext, " ", {NULL}, {0}, {0}, {0}, {0} },
|
|
|
|
{ colorpicker, "Invisible 2-sided walls (for cheat)", {&am_tswallcolor}, {0}, {0}, {0}, {0} },
|
|
|
|
{ colorpicker, "Secret walls (for cheat)", {&am_secretwallcolor}, {0}, {0}, {0}, {0} },
|
|
|
|
{ colorpicker, "Actors (for cheat)", {&am_thingcolor}, {0}, {0}, {0}, {0} },
|
2006-04-11 16:27:41 +00:00
|
|
|
{ colorpicker, "Monsters (for cheat)", {&am_thingcolor_monster}, {0}, {0}, {0}, {0} },
|
|
|
|
{ colorpicker, "Friends (for cheat)", {&am_thingcolor_friend}, {0}, {0}, {0}, {0} },
|
|
|
|
{ colorpicker, "Items (for cheat)", {&am_thingcolor_item}, {0}, {0}, {0}, {0} },
|
2006-02-24 04:48:15 +00:00
|
|
|
{ redtext, " ", {NULL}, {0}, {0}, {0}, {0} },
|
|
|
|
{ colorpicker, "You (overlay)", {&am_ovyourcolor}, {0}, {0}, {0}, {0} },
|
|
|
|
{ colorpicker, "1-sided walls (overlay)", {&am_ovwallcolor}, {0}, {0}, {0}, {0} },
|
|
|
|
{ colorpicker, "2-sided walls (overlay)", {&am_ovotherwallscolor},{0}, {0}, {0}, {0} },
|
|
|
|
{ colorpicker, "Not-yet-seen walls (overlay)", {&am_ovunseencolor}, {0}, {0}, {0}, {0} },
|
|
|
|
{ colorpicker, "Teleporter (overlay)", {&am_ovtelecolor}, {0}, {0}, {0}, {0} },
|
|
|
|
{ colorpicker, "Actors (overlay) (for cheat)", {&am_ovthingcolor}, {0}, {0}, {0}, {0} },
|
2006-04-11 16:27:41 +00:00
|
|
|
{ colorpicker, "Monsters (overlay) (for cheat)", {&am_ovthingcolor_monster}, {0}, {0}, {0}, {0} },
|
|
|
|
{ colorpicker, "Friends (overlay) (for cheat)", {&am_ovthingcolor_friend}, {0}, {0}, {0}, {0} },
|
|
|
|
{ colorpicker, "Items (overlay) (for cheat)", {&am_ovthingcolor_item}, {0}, {0}, {0}, {0} },
|
2006-02-24 04:48:15 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
menu_t MapColorsMenu =
|
|
|
|
{
|
|
|
|
"CUSTOMIZE MAP COLORS",
|
|
|
|
0,
|
- Fixed compilation with mingw again.
- Added multiple-choice sound sequences. These overcome one of the major
deficiences of the Hexen-inherited SNDSEQ system while still being Hexen
compatible: Custom door sounds can now use different opening and closing
sequences, for both normal and blazing speeds.
- Added a serializer for TArray.
- Added a countof macro to doomtype.h. See the1's blog to find out why
it's implemented the way it is.
<http://blogs.msdn.com/the1/articles/210011.aspx>
- Added a new method to FRandom for getting random numbers larger than 255,
which lets me:
- Fixed: SNDSEQ delayrand commands could delay for no more than 255 tics.
- Fixed: If you're going to have sector_t.SoundTarget, then they need to
be included in the pointer cleanup scans.
- Ported back newer name code from 2.1.
- Fixed: Using -warp with only one parameter in Doom and Heretic to
select a map on episode 1 no longer worked.
- New: Loading a multiplayer save now restores the players based on
their names rather than on their connection order. Using connection
order was sensible when -net was the only way to start a network game,
but with -host/-join, it's not so nice. Also, if there aren't enough
players in the save, then the extra players will be spawned normally,
so you can continue a saved game with more players than you started it
with.
- Added some new SNDSEQ commands to make it possible to define Heretic's
ambient sounds in SNDSEQ: volumerel, volumerand, slot, randomsequence,
delayonce, and restart. With these, it is basically possible to obsolete
all of the $ambient SNDINFO commands.
- Fixed: Sound sequences would only execute one command each time they were
ticked.
- Fixed: No bounds checking was done on the volume sound sequences played at.
- Fixed: The tic parameter to playloop was useless and caused it to
act like a redundant playrepeat. I have removed all the logic that
caused playloop to play repeating sounds, and now it acts like an
infinite sequence of play/delay commands until the sequence is
stopped.
- Fixed: Sound sequences were ticked every frame, not every tic, so all
the delay commands were timed incorrectly and varied depending on your
framerate. Since this is useful for restarting looping sounds that got
cut off, I have not changed this. Instead, the delay commands now
record the tic when execution should resume, not the number of tics
left to delay.
SVN r57 (trunk)
2006-04-21 01:22:55 +00:00
|
|
|
countof(MapColorsItems),
|
2006-04-11 16:27:41 +00:00
|
|
|
48,
|
2006-02-24 04:48:15 +00:00
|
|
|
MapColorsItems,
|
|
|
|
};
|
|
|
|
|
|
|
|
/*=======================================
|
|
|
|
*
|
|
|
|
* Color Picker Sub-menu
|
|
|
|
*
|
|
|
|
*=======================================*/
|
2006-12-29 03:38:37 +00:00
|
|
|
static void StartColorPickerMenu (const char *colorname, FColorCVar *cvar);
|
2006-02-24 04:48:15 +00:00
|
|
|
static void ColorPickerReset ();
|
|
|
|
static int CurrColorIndex;
|
|
|
|
static int SelColorIndex;
|
|
|
|
static void UpdateSelColor (int index);
|
|
|
|
|
|
|
|
|
|
|
|
static menuitem_t ColorPickerItems[] = {
|
|
|
|
{ redtext, NULL, {NULL}, {0}, {0}, {0}, {0} },
|
|
|
|
{ redtext, " ", {NULL}, {0}, {0}, {0}, {0} },
|
|
|
|
{ intslider, "Red", {NULL}, {0}, {255}, {15}, {0} },
|
|
|
|
{ intslider, "Green", {NULL}, {0}, {255}, {15}, {0} },
|
|
|
|
{ intslider, "Blue", {NULL}, {0}, {255}, {15}, {0} },
|
|
|
|
{ redtext, " ", {NULL}, {0}, {0}, {0}, {0} },
|
|
|
|
{ more, "Undo changes", {NULL}, {0}, {0}, {0}, {(value_t*)ColorPickerReset} },
|
|
|
|
{ redtext, " ", {NULL}, {0}, {0}, {0}, {0} },
|
|
|
|
{ palettegrid, " ", {NULL}, {0}, {0}, {0}, {0} },
|
|
|
|
{ palettegrid, " ", {NULL}, {1}, {0}, {0}, {0} },
|
|
|
|
{ palettegrid, " ", {NULL}, {2}, {0}, {0}, {0} },
|
|
|
|
{ palettegrid, " ", {NULL}, {3}, {0}, {0}, {0} },
|
|
|
|
{ palettegrid, " ", {NULL}, {4}, {0}, {0}, {0} },
|
|
|
|
{ palettegrid, " ", {NULL}, {5}, {0}, {0}, {0} },
|
|
|
|
{ palettegrid, " ", {NULL}, {6}, {0}, {0}, {0} },
|
|
|
|
{ palettegrid, " ", {NULL}, {7}, {0}, {0}, {0} },
|
|
|
|
{ palettegrid, " ", {NULL}, {8}, {0}, {0}, {0} },
|
|
|
|
{ palettegrid, " ", {NULL}, {9}, {0}, {0}, {0} },
|
|
|
|
{ palettegrid, " ", {NULL}, {10}, {0}, {0}, {0} },
|
|
|
|
{ palettegrid, " ", {NULL}, {11}, {0}, {0}, {0} },
|
|
|
|
{ palettegrid, " ", {NULL}, {12}, {0}, {0}, {0} },
|
|
|
|
{ palettegrid, " ", {NULL}, {13}, {0}, {0}, {0} },
|
|
|
|
{ palettegrid, " ", {NULL}, {14}, {0}, {0}, {0} },
|
|
|
|
{ palettegrid, " ", {NULL}, {15}, {0}, {0}, {0} },
|
|
|
|
};
|
|
|
|
|
|
|
|
menu_t ColorPickerMenu =
|
|
|
|
{
|
|
|
|
"SELECT COLOR",
|
|
|
|
2,
|
- Fixed compilation with mingw again.
- Added multiple-choice sound sequences. These overcome one of the major
deficiences of the Hexen-inherited SNDSEQ system while still being Hexen
compatible: Custom door sounds can now use different opening and closing
sequences, for both normal and blazing speeds.
- Added a serializer for TArray.
- Added a countof macro to doomtype.h. See the1's blog to find out why
it's implemented the way it is.
<http://blogs.msdn.com/the1/articles/210011.aspx>
- Added a new method to FRandom for getting random numbers larger than 255,
which lets me:
- Fixed: SNDSEQ delayrand commands could delay for no more than 255 tics.
- Fixed: If you're going to have sector_t.SoundTarget, then they need to
be included in the pointer cleanup scans.
- Ported back newer name code from 2.1.
- Fixed: Using -warp with only one parameter in Doom and Heretic to
select a map on episode 1 no longer worked.
- New: Loading a multiplayer save now restores the players based on
their names rather than on their connection order. Using connection
order was sensible when -net was the only way to start a network game,
but with -host/-join, it's not so nice. Also, if there aren't enough
players in the save, then the extra players will be spawned normally,
so you can continue a saved game with more players than you started it
with.
- Added some new SNDSEQ commands to make it possible to define Heretic's
ambient sounds in SNDSEQ: volumerel, volumerand, slot, randomsequence,
delayonce, and restart. With these, it is basically possible to obsolete
all of the $ambient SNDINFO commands.
- Fixed: Sound sequences would only execute one command each time they were
ticked.
- Fixed: No bounds checking was done on the volume sound sequences played at.
- Fixed: The tic parameter to playloop was useless and caused it to
act like a redundant playrepeat. I have removed all the logic that
caused playloop to play repeating sounds, and now it acts like an
infinite sequence of play/delay commands until the sequence is
stopped.
- Fixed: Sound sequences were ticked every frame, not every tic, so all
the delay commands were timed incorrectly and varied depending on your
framerate. Since this is useful for restarting looping sounds that got
cut off, I have not changed this. Instead, the delay commands now
record the tic when execution should resume, not the number of tics
left to delay.
SVN r57 (trunk)
2006-04-21 01:22:55 +00:00
|
|
|
countof(ColorPickerItems),
|
2006-02-24 04:48:15 +00:00
|
|
|
0,
|
|
|
|
ColorPickerItems,
|
|
|
|
};
|
|
|
|
|
|
|
|
/*=======================================
|
|
|
|
*
|
|
|
|
* Messages Menu
|
|
|
|
*
|
|
|
|
*=======================================*/
|
|
|
|
EXTERN_CVAR (Int, con_scaletext)
|
|
|
|
EXTERN_CVAR (Bool, con_centernotify)
|
|
|
|
EXTERN_CVAR (Int, msg0color)
|
|
|
|
EXTERN_CVAR (Int, msg1color)
|
|
|
|
EXTERN_CVAR (Int, msg2color)
|
|
|
|
EXTERN_CVAR (Int, msg3color)
|
|
|
|
EXTERN_CVAR (Int, msg4color)
|
|
|
|
EXTERN_CVAR (Int, msgmidcolor)
|
|
|
|
EXTERN_CVAR (Int, msglevel)
|
|
|
|
|
|
|
|
static value_t ScaleValues[] =
|
|
|
|
{
|
|
|
|
{ 0.0, "Off" },
|
|
|
|
{ 1.0, "On" },
|
|
|
|
{ 2.0, "Double" }
|
|
|
|
};
|
|
|
|
|
|
|
|
static value_t TextColors[] =
|
|
|
|
{
|
|
|
|
{ 0.0, "brick" },
|
|
|
|
{ 1.0, "tan" },
|
|
|
|
{ 2.0, "gray" },
|
|
|
|
{ 3.0, "green" },
|
|
|
|
{ 4.0, "brown" },
|
|
|
|
{ 5.0, "gold" },
|
|
|
|
{ 6.0, "red" },
|
|
|
|
{ 7.0, "blue" },
|
|
|
|
{ 8.0, "orange" },
|
|
|
|
{ 9.0, "white" },
|
- Added some hackery at the start of MouseRead_Win32() that prevents it from
yanking the mouse around if they keys haven't been read yet to combat the
same situation that causes the keyboard to return DIERR_NOTACQUIRED in
KeyRead(): The window is sort of in focus and sort of not. User.dll
considers it to be focused and it's drawn as such, but another focused
window is on top of it, and DirectInput doesn't see it as focused.
- Fixed: KeyRead() should handle DIERR_NOTACQUIRED errors the same way it
handles DIERR_INPUTLOST errors. This can happen if our window had the
focus stolen away from it before we tried to acquire the keyboard in
DI_Init2(). Strangely, MouseRead_DI() already did this.
- When a stack overflow occurs, report.txt now only includes the first and
last 16KB of the stack to make it more manageable.
- Limited StreamEditBinary() to the first 64KB of the file to keep it from
taking too long on large dumps.
- And now I know why gathering crash information in the same process that
crashed can be bad: Stack overflows. You get one spare page to play with
when the stack overflows. MiniDumpWriteDump() needs more than that and
causes an access violation when it runs out of leftover stack, silently
terminating the application. Windows XP x64 offers SetThreadStackGuarantee()
to increase this, but that isn't available on anything older, including
32-bit XP. To get around this, a new thread is created to write the mini
dump when the stack overflows.
- Changed A_Burnination() to be closer to Strife's.
- Fixed: When playing back demos, DoAddBot() can be called without an
associated call to SpawnBot(). So if the bot can't spawn, botnum can
go negative, which will cause problems later in DCajunMaster::Main()
when it sees that wanted_botnum (0) is higher than botnum (-1).
- Fixed: Stopping demo recording in multiplayer games should not abruptly
drop the recorder out of the game without notifying the other players.
In fact, there's no reason why it should drop them out of multiplayer at
all.
- Fixed: Earthquakes were unreliable in multiplayer games because
P_PredictPlayer() did not preserve the player's xviewshift.
- Fixed: PlayerIsGone() needs to stop any scripts that belong to the player
who left, in addition to executing disconnect scripts.
- Fixed: APlayerPawn::AddInventory() should also check for a NULL player->mo
in case the player left but somebody still has a reference to their actor.
- Fixed: DDrawFB::PaintToWindow() should simulate proper unlocking behavior
and set Buffer to NULL.
- Improved feedback for network game initialization with the console ticker.
- Moved i_net.cpp and i_net.h out of sdl/ and win32/ and into the main source
directory. They are identical, so keeping two copies of them is bad.
- Fixed: (At least with Creative's driver's,) EAX settings are global and not
per-application. So if you play a multiplayer ZDoom game on one computer
(or even another EAX-using application), ZDoom needs to restore the
environment when it regains focus.
- Maybe fixed: (See http://forum.zdoom.org/potato.php?t=10689) Apparently,
PacketGet can receive ECONNRESET from nodes that aren't in the game. It
should be safe to just ignore these packets.
- Fixed: PlayerIsGone() should set the gone player's camera to NULL in case
the player who left was player 0. This is because if a remaining player
receives a "recoverable" error, they will become player 0. Once that happens,
they game will try to update sounds through their camera and crash in
FMODSoundRenderer::UpdateListener() because the zones array is now NULL.
G_NewInit() should also clear all the player structures.
SVN r233 (trunk)
2006-06-30 02:13:26 +00:00
|
|
|
{ 10.0, "yellow" },
|
- Added support for casting color names in ACS print-type statements. What that
means is that instead of writing this:
print (s:"\cDSome text");
You can write this:
print (r:CR_GREEN, s:"Some text");
- Added some new colors, based on the ones jimmy91 posted in the forum: cream,
light blue, black, olive, dark green, dark red, dark brown, purple, and dark
gray.
- Simplified FFont::BuildTranslations() and BuildTranslations2() to make adding
new colors easier.
SVN r306 (trunk)
2006-08-22 21:58:24 +00:00
|
|
|
{ 11.0, "default" },
|
|
|
|
{ 12.0, "black" },
|
|
|
|
{ 13.0, "light blue" },
|
|
|
|
{ 14.0, "cream" },
|
|
|
|
{ 15.0, "olive" },
|
|
|
|
{ 16.0, "dark green" },
|
|
|
|
{ 17.0, "dark red" },
|
|
|
|
{ 18.0, "dark brown" },
|
|
|
|
{ 19.0, "purple" },
|
|
|
|
{ 20.0, "dark gray" },
|
2006-02-24 04:48:15 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
static value_t MessageLevels[] = {
|
|
|
|
{ 0.0, "Item Pickup" },
|
|
|
|
{ 1.0, "Obituaries" },
|
|
|
|
{ 2.0, "Critical Messages" }
|
|
|
|
};
|
|
|
|
|
|
|
|
static menuitem_t MessagesItems[] = {
|
2006-05-15 15:28:46 +00:00
|
|
|
{ discrete, "Show messages", {&show_messages}, {2.0}, {0.0}, {0.0}, {OnOff} },
|
|
|
|
{ discrete, "Show obituaries", {&show_obituaries}, {2.0}, {0.0}, {0.0}, {OnOff} },
|
2006-02-24 04:48:15 +00:00
|
|
|
{ discrete, "Scale text in high res", {&con_scaletext}, {3.0}, {0.0}, {0.0}, {ScaleValues} },
|
|
|
|
{ discrete, "Minimum message level", {&msglevel}, {3.0}, {0.0}, {0.0}, {MessageLevels} },
|
|
|
|
{ discrete, "Center messages", {&con_centernotify}, {2.0}, {0.0}, {0.0}, {OnOff} },
|
|
|
|
{ redtext, " ", {NULL}, {0.0}, {0.0}, {0.0}, {NULL} },
|
|
|
|
{ whitetext, "Message Colors", {NULL}, {0.0}, {0.0}, {0.0}, {NULL} },
|
|
|
|
{ redtext, " ", {NULL}, {0.0}, {0.0}, {0.0}, {NULL} },
|
- Added support for casting color names in ACS print-type statements. What that
means is that instead of writing this:
print (s:"\cDSome text");
You can write this:
print (r:CR_GREEN, s:"Some text");
- Added some new colors, based on the ones jimmy91 posted in the forum: cream,
light blue, black, olive, dark green, dark red, dark brown, purple, and dark
gray.
- Simplified FFont::BuildTranslations() and BuildTranslations2() to make adding
new colors easier.
SVN r306 (trunk)
2006-08-22 21:58:24 +00:00
|
|
|
{ cdiscrete, "Item Pickup", {&msg0color}, {21.0}, {0.0}, {0.0}, {TextColors} },
|
|
|
|
{ cdiscrete, "Obituaries", {&msg1color}, {21.0}, {0.0}, {0.0}, {TextColors} },
|
|
|
|
{ cdiscrete, "Critical Messages", {&msg2color}, {21.0}, {0.0}, {0.0}, {TextColors} },
|
|
|
|
{ cdiscrete, "Chat Messages", {&msg3color}, {21.0}, {0.0}, {0.0}, {TextColors} },
|
|
|
|
{ cdiscrete, "Team Messages", {&msg4color}, {21.0}, {0.0}, {0.0}, {TextColors} },
|
2008-02-16 10:23:12 +00:00
|
|
|
{ cdiscrete, "Centered Messages", {&msgmidcolor}, {21.0}, {0.0}, {0.0}, {TextColors} },
|
|
|
|
{ redtext, " ", {NULL}, {0.0}, {0.0}, {0.0}, {NULL} },
|
|
|
|
{ discrete, "Screenshot messages", {&screenshot_quiet}, {2.0}, {0.0}, {0.0}, {OffOn} },
|
|
|
|
{ discrete, "Detailed save messages",{&longsavemessages}, {2.0}, {0.0}, {0.0}, {OnOff} },
|
2006-02-24 04:48:15 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
menu_t MessagesMenu =
|
|
|
|
{
|
|
|
|
"MESSAGES",
|
|
|
|
0,
|
2007-09-02 09:57:08 +00:00
|
|
|
countof(MessagesItems),
|
2006-02-24 04:48:15 +00:00
|
|
|
0,
|
|
|
|
MessagesItems,
|
|
|
|
};
|
|
|
|
|
|
|
|
|
2007-12-06 14:33:28 +00:00
|
|
|
/*=======================================
|
|
|
|
*
|
|
|
|
* Scoreboard Menu
|
|
|
|
*
|
|
|
|
*=======================================*/
|
|
|
|
|
|
|
|
EXTERN_CVAR (Bool, sb_cooperative_enable)
|
|
|
|
EXTERN_CVAR (Int, sb_cooperative_headingcolor)
|
|
|
|
EXTERN_CVAR (Int, sb_cooperative_yourplayercolor)
|
|
|
|
EXTERN_CVAR (Int, sb_cooperative_otherplayercolor)
|
|
|
|
|
|
|
|
EXTERN_CVAR (Bool, sb_deathmatch_enable)
|
|
|
|
EXTERN_CVAR (Int, sb_deathmatch_headingcolor)
|
|
|
|
EXTERN_CVAR (Int, sb_deathmatch_yourplayercolor)
|
|
|
|
EXTERN_CVAR (Int, sb_deathmatch_otherplayercolor)
|
|
|
|
|
|
|
|
EXTERN_CVAR (Bool, sb_teamdeathmatch_enable)
|
2007-12-20 20:22:31 +00:00
|
|
|
EXTERN_CVAR (Int, sb_teamdeathmatch_headingcolor)
|
2007-12-06 14:33:28 +00:00
|
|
|
|
|
|
|
static menuitem_t ScoreboardItems[] = {
|
|
|
|
{ whitetext, "Cooperative Options", {NULL}, {0.0}, {0.0}, {0.0}, {NULL} },
|
|
|
|
{ redtext, " ", {NULL}, {0.0}, {0.0}, {0.0}, {NULL} },
|
|
|
|
{ discrete, "Enable Scoreboard", {&sb_cooperative_enable}, {21.0}, {0.0}, {0.0}, {YesNo} },
|
|
|
|
{ cdiscrete, "Header Color", {&sb_cooperative_headingcolor}, {21.0}, {0.0}, {0.0}, {TextColors} },
|
|
|
|
{ cdiscrete, "Your Player Color", {&sb_cooperative_yourplayercolor}, {21.0}, {0.0}, {0.0}, {TextColors} },
|
|
|
|
{ cdiscrete, "Other Players' Color", {&sb_cooperative_otherplayercolor}, {21.0}, {0.0}, {0.0}, {TextColors} },
|
|
|
|
{ redtext, " ", {NULL}, {0.0}, {0.0}, {0.0}, {NULL} },
|
|
|
|
{ redtext, " ", {NULL}, {0.0}, {0.0}, {0.0}, {NULL} },
|
|
|
|
{ whitetext, "Deathmatch Options", {NULL}, {0.0}, {0.0}, {0.0}, {NULL} },
|
|
|
|
{ redtext, " ", {NULL}, {0.0}, {0.0}, {0.0}, {NULL} },
|
|
|
|
{ discrete, "Enable Scoreboard", {&sb_deathmatch_enable}, {21.0}, {0.0}, {0.0}, {YesNo} },
|
|
|
|
{ cdiscrete, "Header Color", {&sb_deathmatch_headingcolor}, {21.0}, {0.0}, {0.0}, {TextColors} },
|
|
|
|
{ cdiscrete, "Your Player Color", {&sb_deathmatch_yourplayercolor}, {21.0}, {0.0}, {0.0}, {TextColors} },
|
|
|
|
{ cdiscrete, "Other Players' Color", {&sb_deathmatch_otherplayercolor}, {21.0}, {0.0}, {0.0}, {TextColors} },
|
|
|
|
{ redtext, " ", {NULL}, {0.0}, {0.0}, {0.0}, {NULL} },
|
|
|
|
{ redtext, " ", {NULL}, {0.0}, {0.0}, {0.0}, {NULL} },
|
|
|
|
{ whitetext, "Team Deathmatch Options", {NULL}, {0.0}, {0.0}, {0.0}, {NULL} },
|
|
|
|
{ redtext, " ", {NULL}, {0.0}, {0.0}, {0.0}, {NULL} },
|
|
|
|
{ discrete, "Enable Scoreboard", {&sb_teamdeathmatch_enable}, {21.0}, {0.0}, {0.0}, {YesNo} },
|
2007-12-20 20:22:31 +00:00
|
|
|
{ cdiscrete, "Header Color", {&sb_teamdeathmatch_headingcolor}, {21.0}, {0.0}, {0.0}, {TextColors} }
|
2007-12-06 14:33:28 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
menu_t ScoreboardMenu =
|
|
|
|
{
|
|
|
|
"SCOREBOARD OPTIONS",
|
|
|
|
2,
|
|
|
|
countof(ScoreboardItems),
|
|
|
|
0,
|
|
|
|
ScoreboardItems,
|
|
|
|
};
|
|
|
|
|
|
|
|
|
2006-02-24 04:48:15 +00:00
|
|
|
/*=======================================
|
|
|
|
*
|
|
|
|
* Video Modes Menu
|
|
|
|
*
|
|
|
|
*=======================================*/
|
|
|
|
|
2006-09-14 00:02:31 +00:00
|
|
|
extern bool setmodeneeded;
|
2006-02-24 04:48:15 +00:00
|
|
|
extern int NewWidth, NewHeight, NewBits;
|
|
|
|
extern int DisplayBits;
|
|
|
|
|
|
|
|
int testingmode; // Holds time to revert to old mode
|
|
|
|
int OldWidth, OldHeight, OldBits;
|
|
|
|
|
2006-05-11 04:00:58 +00:00
|
|
|
void M_FreeModesList ();
|
2006-02-24 04:48:15 +00:00
|
|
|
static void BuildModesList (int hiwidth, int hiheight, int hi_id);
|
2006-09-14 00:02:31 +00:00
|
|
|
static bool GetSelectedSize (int line, int *width, int *height);
|
2006-02-24 04:48:15 +00:00
|
|
|
static void SetModesMenu (int w, int h, int bits);
|
|
|
|
|
|
|
|
EXTERN_CVAR (Int, vid_defwidth)
|
|
|
|
EXTERN_CVAR (Int, vid_defheight)
|
|
|
|
EXTERN_CVAR (Int, vid_defbits)
|
|
|
|
|
|
|
|
static FIntCVar DummyDepthCvar (NULL, 0, 0);
|
|
|
|
|
|
|
|
EXTERN_CVAR (Bool, fullscreen)
|
|
|
|
|
|
|
|
static value_t Depths[22];
|
|
|
|
|
|
|
|
EXTERN_CVAR (Bool, vid_tft) // Defined below
|
|
|
|
CUSTOM_CVAR (Int, menu_screenratios, 0, CVAR_ARCHIVE)
|
|
|
|
{
|
|
|
|
if (self < 0 || self > 4)
|
|
|
|
{
|
|
|
|
self = 3;
|
|
|
|
}
|
|
|
|
else if (self == 4 && !vid_tft)
|
|
|
|
{
|
|
|
|
self = 3;
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
BuildModesList (SCREENWIDTH, SCREENHEIGHT, DisplayBits);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2009-06-06 15:21:57 +00:00
|
|
|
static value_t ForceRatios[] =
|
|
|
|
{
|
|
|
|
{ 0.0, "Off" },
|
|
|
|
{ 3.0, "4:3" },
|
|
|
|
{ 1.0, "16:9" },
|
|
|
|
{ 2.0, "16:10" },
|
|
|
|
{ 4.0, "5:4" }
|
|
|
|
};
|
2006-02-24 04:48:15 +00:00
|
|
|
static value_t Ratios[] =
|
|
|
|
{
|
|
|
|
{ 0.0, "4:3" },
|
|
|
|
{ 1.0, "16:9" },
|
|
|
|
{ 2.0, "16:10" },
|
|
|
|
{ 3.0, "All" }
|
|
|
|
};
|
|
|
|
static value_t RatiosTFT[] =
|
|
|
|
{
|
|
|
|
{ 0.0, "4:3" },
|
|
|
|
{ 4.0, "5:4" },
|
|
|
|
{ 1.0, "16:9" },
|
|
|
|
{ 2.0, "16:10" },
|
|
|
|
{ 3.0, "All" }
|
|
|
|
};
|
|
|
|
|
|
|
|
static char VMEnterText[] = "Press ENTER to set mode";
|
|
|
|
static char VMTestText[] = "T to test mode for 5 seconds";
|
|
|
|
|
|
|
|
static menuitem_t ModesItems[] = {
|
|
|
|
// { discrete, "Screen mode", {&DummyDepthCvar}, {0.0}, {0.0}, {0.0}, {Depths} },
|
2009-06-06 15:21:57 +00:00
|
|
|
{ discrete, "Force aspect ratio", {&vid_aspect}, {5.0}, {0.0}, {0.0}, {ForceRatios} },
|
2006-02-24 04:48:15 +00:00
|
|
|
{ discrete, "Aspect ratio", {&menu_screenratios}, {4.0}, {0.0}, {0.0}, {Ratios} },
|
|
|
|
{ discrete, "Fullscreen", {&fullscreen}, {2.0}, {0.0}, {0.0}, {YesNo} },
|
|
|
|
{ discrete, "Enable 5:4 aspect ratio",{&vid_tft}, {2.0}, {0.0}, {0.0}, {YesNo} },
|
|
|
|
{ redtext, " ", {NULL}, {0.0}, {0.0}, {0.0}, {NULL} },
|
|
|
|
{ screenres,NULL, {NULL}, {0.0}, {0.0}, {0.0}, {NULL} },
|
|
|
|
{ screenres,NULL, {NULL}, {0.0}, {0.0}, {0.0}, {NULL} },
|
|
|
|
{ screenres,NULL, {NULL}, {0.0}, {0.0}, {0.0}, {NULL} },
|
|
|
|
{ screenres,NULL, {NULL}, {0.0}, {0.0}, {0.0}, {NULL} },
|
|
|
|
{ screenres,NULL, {NULL}, {0.0}, {0.0}, {0.0}, {NULL} },
|
|
|
|
{ screenres,NULL, {NULL}, {0.0}, {0.0}, {0.0}, {NULL} },
|
|
|
|
{ screenres,NULL, {NULL}, {0.0}, {0.0}, {0.0}, {NULL} },
|
|
|
|
{ screenres,NULL, {NULL}, {0.0}, {0.0}, {0.0}, {NULL} },
|
|
|
|
{ screenres,NULL, {NULL}, {0.0}, {0.0}, {0.0}, {NULL} },
|
|
|
|
{ screenres,NULL, {NULL}, {0.0}, {0.0}, {0.0}, {NULL} },
|
|
|
|
// { whitetext,"Note: Only 8 bpp modes are supported",{NULL}, {0.0}, {0.0}, {0.0}, {NULL} },
|
|
|
|
{ redtext, VMEnterText, {NULL}, {0.0}, {0.0}, {0.0}, {NULL} },
|
|
|
|
{ redtext, " ", {NULL}, {0.0}, {0.0}, {0.0}, {NULL} },
|
|
|
|
{ redtext, VMTestText, {NULL}, {0.0}, {0.0}, {0.0}, {NULL} },
|
|
|
|
};
|
|
|
|
|
2009-06-06 21:03:49 +00:00
|
|
|
#define VM_ASPECTITEM 1
|
2009-06-06 15:21:57 +00:00
|
|
|
#define VM_RESSTART 5
|
|
|
|
#define VM_ENTERLINE 15
|
|
|
|
#define VM_TESTLINE 17
|
2006-02-24 04:48:15 +00:00
|
|
|
|
|
|
|
menu_t ModesMenu =
|
|
|
|
{
|
|
|
|
"VIDEO MODE",
|
|
|
|
2,
|
2006-04-21 16:32:49 +00:00
|
|
|
countof(ModesItems),
|
2006-02-24 04:48:15 +00:00
|
|
|
0,
|
|
|
|
ModesItems,
|
|
|
|
};
|
|
|
|
|
- Added the ACS commands
ReplaceTextures (str old_texture, str new_texture, optional bool not_lower,
optional bool not_mid, optional bool not_upper, optional bool not_floor,
optional bool not_ceiling); and
SectorDamage (int tag, int amount, str type, bool players_only, bool in_air,
str protection_item, bool subclasses_okay);
- Added the vid_nowidescreen cvar to disable widescreen aspect ratio
correction. When this is enabled, the only display ratio available is 4:3
(and 5:4 if vid_tft is set).
- Added support for setting an actor's damage property to an expression
through decorate. Just enclose it within parentheses, and the expression
will be evaluated exactly as-is without the normal Doom damage calculation.
So if you want something that does exactly 6 damage, use a "Damage (6)"
property. To deal normal Doom missile damage, you can use
"Damage (random(1,8)*6)" instead of "Damage 6".
- Moved InvFirst and InvSel into APlayerPawn so that they can be consistantly
maintained by ObtainInventory.
SVN r288 (trunk)
2006-08-12 02:30:57 +00:00
|
|
|
CUSTOM_CVAR (Bool, vid_tft, false, CVAR_ARCHIVE|CVAR_GLOBALCONFIG)
|
2006-02-24 04:48:15 +00:00
|
|
|
{
|
|
|
|
if (self)
|
|
|
|
{
|
|
|
|
ModesItems[VM_ASPECTITEM].b.numvalues = 5.f;
|
|
|
|
ModesItems[VM_ASPECTITEM].e.values = RatiosTFT;
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
ModesItems[VM_ASPECTITEM].b.numvalues = 4.f;
|
|
|
|
ModesItems[VM_ASPECTITEM].e.values = Ratios;
|
|
|
|
if (menu_screenratios == 4)
|
|
|
|
{
|
|
|
|
menu_screenratios = 0;
|
|
|
|
}
|
|
|
|
}
|
2009-06-06 15:21:57 +00:00
|
|
|
setsizeneeded = true;
|
|
|
|
if (StatusBar != NULL)
|
|
|
|
{
|
|
|
|
StatusBar->ScreenSizeChanged();
|
|
|
|
}
|
2006-02-24 04:48:15 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
/*=======================================
|
|
|
|
*
|
|
|
|
* Gameplay Options (dmflags) Menu
|
|
|
|
*
|
|
|
|
*=======================================*/
|
2006-12-16 16:34:39 +00:00
|
|
|
value_t SmartAim[4] = {
|
2006-12-16 11:49:48 +00:00
|
|
|
{ 0.0, "Off" },
|
|
|
|
{ 1.0, "On" },
|
2006-12-16 16:34:39 +00:00
|
|
|
{ 2.0, "Never friends" },
|
|
|
|
{ 3.0, "Only monsters" }
|
2006-12-16 11:49:48 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
value_t FallingDM[4] = {
|
|
|
|
{ 0, "Off" },
|
|
|
|
{ DF_FORCE_FALLINGZD, "Old" },
|
|
|
|
{ DF_FORCE_FALLINGHX, "Hexen" },
|
|
|
|
{ DF_FORCE_FALLINGZD|DF_FORCE_FALLINGHX, "Strife" }
|
|
|
|
};
|
|
|
|
|
2008-03-18 18:18:18 +00:00
|
|
|
value_t DF_Jump[3] = {
|
|
|
|
{ 0, "Default" },
|
|
|
|
{ DF_NO_JUMP, "Off" },
|
|
|
|
{ DF_YES_JUMP, "On" }
|
|
|
|
};
|
|
|
|
|
|
|
|
value_t DF_Crouch[3] = {
|
|
|
|
{ 0, "Default" },
|
|
|
|
{ DF_NO_CROUCH, "Off" },
|
|
|
|
{ DF_YES_CROUCH, "On" }
|
|
|
|
};
|
|
|
|
|
2006-02-24 04:48:15 +00:00
|
|
|
|
|
|
|
static menuitem_t DMFlagsItems[] = {
|
|
|
|
{ discrete, "Teamplay", {&teamplay}, {2.0}, {0.0}, {0.0}, {OnOff} },
|
2009-05-15 10:39:40 +00:00
|
|
|
{ slider, "Team damage scalar", {&teamdamage}, {0.0}, {1.0}, {0.05f},{NULL} },
|
2006-02-24 04:48:15 +00:00
|
|
|
{ redtext, " ", {NULL}, {0.0}, {0.0}, {0.0}, {NULL} },
|
2007-12-12 21:50:56 +00:00
|
|
|
{ discrete, "Smart Autoaim", {&sv_smartaim}, {4.0}, {0.0}, {0.0}, {SmartAim} },
|
2006-12-16 11:49:48 +00:00
|
|
|
{ redtext, " ", {NULL}, {0.0}, {0.0}, {0.0}, {NULL} },
|
|
|
|
{ bitmask, "Falling damage", {&dmflags}, {4.0}, {DF_FORCE_FALLINGZD|DF_FORCE_FALLINGHX}, {0}, {FallingDM} },
|
2006-06-18 04:10:47 +00:00
|
|
|
{ bitflag, "Drop weapon", {&dmflags2}, {0}, {0}, {0}, {(value_t *)DF2_YES_WEAPONDROP} },
|
2007-12-23 14:57:12 +00:00
|
|
|
{ bitflag, "Double ammo", {&dmflags2}, {0}, {0}, {0}, {(value_t *)DF2_YES_DOUBLEAMMO} },
|
2006-02-24 04:48:15 +00:00
|
|
|
{ bitflag, "Infinite ammo", {&dmflags}, {0}, {0}, {0}, {(value_t *)DF_INFINITE_AMMO} },
|
2008-01-09 02:53:38 +00:00
|
|
|
{ bitflag, "Infinite inventory", {&dmflags2}, {0}, {0}, {0}, {(value_t *)DF2_INFINITE_INVENTORY} },
|
2006-02-24 04:48:15 +00:00
|
|
|
{ bitflag, "No monsters", {&dmflags}, {0}, {0}, {0}, {(value_t *)DF_NO_MONSTERS} },
|
2008-12-28 09:49:15 +00:00
|
|
|
{ bitflag, "No monsters to exit", {&dmflags2}, {0}, {0}, {0}, {(value_t *)DF2_KILL_MONSTERS} },
|
2006-02-24 04:48:15 +00:00
|
|
|
{ bitflag, "Monsters respawn", {&dmflags}, {0}, {0}, {0}, {(value_t *)DF_MONSTERS_RESPAWN} },
|
2007-12-24 14:24:24 +00:00
|
|
|
{ bitflag, "No respawn", {&dmflags2}, {0}, {0}, {0}, {(value_t *)DF2_NO_RESPAWN} },
|
2006-02-24 04:48:15 +00:00
|
|
|
{ bitflag, "Items respawn", {&dmflags}, {0}, {0}, {0}, {(value_t *)DF_ITEMS_RESPAWN} },
|
2006-12-16 11:49:48 +00:00
|
|
|
{ bitflag, "Big powerups respawn", {&dmflags}, {0}, {0}, {0}, {(value_t *)DF_RESPAWN_SUPER} },
|
2006-02-24 04:48:15 +00:00
|
|
|
{ bitflag, "Fast monsters", {&dmflags}, {0}, {0}, {0}, {(value_t *)DF_FAST_MONSTERS} },
|
2007-12-23 17:03:52 +00:00
|
|
|
{ bitflag, "Degeneration", {&dmflags2}, {0}, {0}, {0}, {(value_t *)DF2_YES_DEGENERATION} },
|
2008-12-28 09:49:15 +00:00
|
|
|
{ bitflag, "Allow Autoaim", {&dmflags2}, {1}, {0}, {0}, {(value_t *)DF2_NOAUTOAIM} },
|
|
|
|
{ bitflag, "Disallow Suicide", {&dmflags2}, {1}, {0}, {0}, {(value_t *)DF2_NOSUICIDE} },
|
2008-03-18 18:18:18 +00:00
|
|
|
{ bitmask, "Allow jump", {&dmflags}, {3.0}, {DF_NO_JUMP|DF_YES_JUMP}, {0}, {DF_Jump} },
|
|
|
|
{ bitmask, "Allow crouch", {&dmflags}, {3.0}, {DF_NO_CROUCH|DF_YES_CROUCH}, {0}, {DF_Crouch} },
|
2006-02-24 04:48:15 +00:00
|
|
|
{ bitflag, "Allow freelook", {&dmflags}, {1}, {0}, {0}, {(value_t *)DF_NO_FREELOOK} },
|
|
|
|
{ bitflag, "Allow FOV", {&dmflags}, {1}, {0}, {0}, {(value_t *)DF_NO_FOV} },
|
2006-04-11 16:27:41 +00:00
|
|
|
{ bitflag, "Allow BFG aiming", {&dmflags2}, {1}, {0}, {0}, {(value_t *)DF2_NO_FREEAIMBFG} },
|
2008-12-28 09:49:15 +00:00
|
|
|
{ bitflag, "Allow automap", {&dmflags2}, {1}, {0}, {0}, {(value_t *)DF2_NO_AUTOMAP} },
|
|
|
|
{ bitflag, "Automap allies", {&dmflags2}, {1}, {0}, {0}, {(value_t *)DF2_NO_AUTOMAP_ALLIES} },
|
|
|
|
{ bitflag, "Allow spying", {&dmflags2}, {1}, {0}, {0}, {(value_t *)DF2_DISALLOW_SPYING} },
|
|
|
|
{ bitflag, "Chasecam cheat", {&dmflags2}, {0}, {0}, {0}, {(value_t *)DF2_CHASECAM} },
|
|
|
|
|
2006-06-18 04:10:47 +00:00
|
|
|
{ redtext, " ", {NULL}, {0}, {0}, {0}, {NULL} },
|
2006-12-16 11:49:48 +00:00
|
|
|
{ whitetext,"Deathmatch Settings", {NULL}, {0}, {0}, {0}, {NULL} },
|
|
|
|
{ bitflag, "Weapons stay", {&dmflags}, {0}, {0}, {0}, {(value_t *)DF_WEAPONS_STAY} },
|
|
|
|
{ bitflag, "Allow powerups", {&dmflags}, {1}, {0}, {0}, {(value_t *)DF_NO_ITEMS} },
|
|
|
|
{ bitflag, "Allow health", {&dmflags}, {1}, {0}, {0}, {(value_t *)DF_NO_HEALTH} },
|
|
|
|
{ bitflag, "Allow armor", {&dmflags}, {1}, {0}, {0}, {(value_t *)DF_NO_ARMOR} },
|
|
|
|
{ bitflag, "Spawn farthest", {&dmflags}, {0}, {0}, {0}, {(value_t *)DF_SPAWN_FARTHEST} },
|
|
|
|
{ bitflag, "Same map", {&dmflags}, {0}, {0}, {0}, {(value_t *)DF_SAME_LEVEL} },
|
|
|
|
{ bitflag, "Force respawn", {&dmflags}, {0}, {0}, {0}, {(value_t *)DF_FORCE_RESPAWN} },
|
|
|
|
{ bitflag, "Allow exit", {&dmflags}, {1}, {0}, {0}, {(value_t *)DF_NO_EXIT} },
|
|
|
|
{ bitflag, "Barrels respawn", {&dmflags2}, {0}, {0}, {0}, {(value_t *)DF2_BARRELS_RESPAWN} },
|
2008-01-09 02:53:38 +00:00
|
|
|
{ bitflag, "Respawn protection", {&dmflags2}, {0}, {0}, {0}, {(value_t *)DF2_YES_RESPAWN_INVUL} },
|
2007-12-24 14:24:24 +00:00
|
|
|
{ bitflag, "Lose frag if fragged", {&dmflags2}, {0}, {0}, {0}, {(value_t *)DF2_YES_LOSEFRAG} },
|
|
|
|
{ bitflag, "Keep frags gained", {&dmflags2}, {0}, {0}, {0}, {(value_t *)DF2_YES_KEEPFRAGS} },
|
2008-01-09 02:53:38 +00:00
|
|
|
{ bitflag, "No team switching", {&dmflags2}, {0}, {0}, {0}, {(value_t *)DF2_NO_TEAM_SWITCH} },
|
|
|
|
|
2006-12-16 11:49:48 +00:00
|
|
|
{ redtext, " ", {NULL}, {0}, {0}, {0}, {NULL} },
|
2006-06-18 04:10:47 +00:00
|
|
|
{ whitetext,"Cooperative Settings", {NULL}, {0}, {0}, {0}, {NULL} },
|
2006-06-22 02:19:43 +00:00
|
|
|
{ bitflag, "Spawn multi. weapons", {&dmflags}, {1}, {0}, {0}, {(value_t *)DF_NO_COOP_WEAPON_SPAWN} },
|
2006-06-18 04:10:47 +00:00
|
|
|
{ bitflag, "Lose entire inventory",{&dmflags}, {0}, {0}, {0}, {(value_t *)DF_COOP_LOSE_INVENTORY} },
|
|
|
|
{ bitflag, "Keep keys", {&dmflags}, {1}, {0}, {0}, {(value_t *)DF_COOP_LOSE_KEYS} },
|
|
|
|
{ bitflag, "Keep weapons", {&dmflags}, {1}, {0}, {0}, {(value_t *)DF_COOP_LOSE_WEAPONS} },
|
|
|
|
{ bitflag, "Keep armor", {&dmflags}, {1}, {0}, {0}, {(value_t *)DF_COOP_LOSE_ARMOR} },
|
|
|
|
{ bitflag, "Keep powerups", {&dmflags}, {1}, {0}, {0}, {(value_t *)DF_COOP_LOSE_POWERUPS} },
|
|
|
|
{ bitflag, "Keep ammo", {&dmflags}, {1}, {0}, {0}, {(value_t *)DF_COOP_LOSE_AMMO} },
|
|
|
|
{ bitflag, "Lose half ammo", {&dmflags}, {0}, {0}, {0}, {(value_t *)DF_COOP_HALVE_AMMO} },
|
2008-01-09 02:53:38 +00:00
|
|
|
{ bitflag, "Spawn where died", {&dmflags2}, {0}, {0}, {0}, {(value_t *)DF2_SAME_SPAWN_SPOT} },
|
2006-02-24 04:48:15 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
static menu_t DMFlagsMenu =
|
|
|
|
{
|
|
|
|
"GAMEPLAY OPTIONS",
|
|
|
|
0,
|
- Fixed compilation with mingw again.
- Added multiple-choice sound sequences. These overcome one of the major
deficiences of the Hexen-inherited SNDSEQ system while still being Hexen
compatible: Custom door sounds can now use different opening and closing
sequences, for both normal and blazing speeds.
- Added a serializer for TArray.
- Added a countof macro to doomtype.h. See the1's blog to find out why
it's implemented the way it is.
<http://blogs.msdn.com/the1/articles/210011.aspx>
- Added a new method to FRandom for getting random numbers larger than 255,
which lets me:
- Fixed: SNDSEQ delayrand commands could delay for no more than 255 tics.
- Fixed: If you're going to have sector_t.SoundTarget, then they need to
be included in the pointer cleanup scans.
- Ported back newer name code from 2.1.
- Fixed: Using -warp with only one parameter in Doom and Heretic to
select a map on episode 1 no longer worked.
- New: Loading a multiplayer save now restores the players based on
their names rather than on their connection order. Using connection
order was sensible when -net was the only way to start a network game,
but with -host/-join, it's not so nice. Also, if there aren't enough
players in the save, then the extra players will be spawned normally,
so you can continue a saved game with more players than you started it
with.
- Added some new SNDSEQ commands to make it possible to define Heretic's
ambient sounds in SNDSEQ: volumerel, volumerand, slot, randomsequence,
delayonce, and restart. With these, it is basically possible to obsolete
all of the $ambient SNDINFO commands.
- Fixed: Sound sequences would only execute one command each time they were
ticked.
- Fixed: No bounds checking was done on the volume sound sequences played at.
- Fixed: The tic parameter to playloop was useless and caused it to
act like a redundant playrepeat. I have removed all the logic that
caused playloop to play repeating sounds, and now it acts like an
infinite sequence of play/delay commands until the sequence is
stopped.
- Fixed: Sound sequences were ticked every frame, not every tic, so all
the delay commands were timed incorrectly and varied depending on your
framerate. Since this is useful for restarting looping sounds that got
cut off, I have not changed this. Instead, the delay commands now
record the tic when execution should resume, not the number of tics
left to delay.
SVN r57 (trunk)
2006-04-21 01:22:55 +00:00
|
|
|
countof(DMFlagsItems),
|
2006-02-24 04:48:15 +00:00
|
|
|
0,
|
|
|
|
DMFlagsItems,
|
|
|
|
};
|
|
|
|
|
|
|
|
/*=======================================
|
|
|
|
*
|
|
|
|
* Compatibility Options Menu
|
|
|
|
*
|
|
|
|
*=======================================*/
|
|
|
|
|
|
|
|
static menuitem_t CompatibilityItems[] = {
|
2009-09-14 20:47:53 +00:00
|
|
|
{ discrete, "Compatibility mode", {&compatmode}, {6.0}, {1.0}, {0.0}, {CompatModes} },
|
2009-01-25 21:59:38 +00:00
|
|
|
{ redtext, " ", {NULL}, {0.0}, {0.0}, {0.0}, {NULL} },
|
2006-02-24 04:48:15 +00:00
|
|
|
{ bitflag, "Find shortest textures like Doom", {&compatflags}, {0}, {0}, {0}, {(value_t *)COMPATF_SHORTTEX} },
|
|
|
|
{ bitflag, "Use buggier stair building", {&compatflags}, {0}, {0}, {0}, {(value_t *)COMPATF_STAIRINDEX} },
|
|
|
|
{ bitflag, "Limit Pain Elementals' Lost Souls", {&compatflags}, {0}, {0}, {0}, {(value_t *)COMPATF_LIMITPAIN} },
|
|
|
|
{ bitflag, "Don't let others hear your pickups", {&compatflags}, {0}, {0}, {0}, {(value_t *)COMPATF_SILENTPICKUP} },
|
|
|
|
{ bitflag, "Actors are infinitely tall", {&compatflags}, {0}, {0}, {0}, {(value_t *)COMPATF_NO_PASSMOBJ} },
|
|
|
|
{ bitflag, "Cripple sound for silent BFG trick", {&compatflags}, {0}, {0}, {0}, {(value_t *)COMPATF_MAGICSILENCE} },
|
|
|
|
{ bitflag, "Enable wall running", {&compatflags}, {0}, {0}, {0}, {(value_t *)COMPATF_WALLRUN} },
|
|
|
|
{ bitflag, "Spawn item drops on the floor", {&compatflags}, {0}, {0}, {0}, {(value_t *)COMPATF_NOTOSSDROPS} },
|
|
|
|
{ bitflag, "All special lines can block <use>", {&compatflags}, {0}, {0}, {0}, {(value_t *)COMPATF_USEBLOCKING} },
|
|
|
|
{ bitflag, "Disable BOOM door light effect", {&compatflags}, {0}, {0}, {0}, {(value_t *)COMPATF_NODOORLIGHT} },
|
2006-04-11 16:27:41 +00:00
|
|
|
{ bitflag, "Raven scrollers use original speed", {&compatflags}, {0}, {0}, {0}, {(value_t *)COMPATF_RAVENSCROLL} },
|
2006-04-20 14:21:27 +00:00
|
|
|
{ bitflag, "Use original sound target handling", {&compatflags}, {0}, {0}, {0}, {(value_t *)COMPATF_SOUNDTARGET} },
|
|
|
|
{ bitflag, "DEH health settings like Doom2.exe", {&compatflags}, {0}, {0}, {0}, {(value_t *)COMPATF_DEHHEALTH} },
|
2006-04-24 14:26:06 +00:00
|
|
|
{ bitflag, "Self ref. sectors don't block shots", {&compatflags}, {0}, {0}, {0}, {(value_t *)COMPATF_TRACE} },
|
|
|
|
{ bitflag, "Monsters get stuck over dropoffs", {&compatflags}, {0}, {0}, {0}, {(value_t *)COMPATF_DROPOFF} },
|
2009-01-25 21:59:38 +00:00
|
|
|
{ bitflag, "Monsters cannot cross dropoffs", {&compatflags}, {0}, {0}, {0}, {(value_t *)COMPATF_CROSSDROPOFF} },
|
2007-05-12 11:14:09 +00:00
|
|
|
{ bitflag, "Monsters see invisible players", {&compatflags}, {0}, {0}, {0}, {(value_t *)COMPATF_INVISIBILITY} },
|
2006-07-11 08:27:05 +00:00
|
|
|
{ bitflag, "Boom scrollers are additive", {&compatflags}, {0}, {0}, {0}, {(value_t *)COMPATF_BOOMSCROLL} },
|
2008-05-12 17:14:38 +00:00
|
|
|
{ bitflag, "Inst. moving floors are not silent", {&compatflags}, {0}, {0}, {0}, {(value_t *)COMPATF_SILENT_INSTANT_FLOORS} },
|
2008-07-12 08:16:19 +00:00
|
|
|
{ bitflag, "Sector sounds use center as source", {&compatflags}, {0}, {0}, {0}, {(value_t *)COMPATF_SECTORSOUNDS} },
|
2008-10-05 11:23:41 +00:00
|
|
|
{ bitflag, "Use Doom heights for missile clipping", {&compatflags}, {0}, {0}, {0}, {(value_t *)COMPATF_MISSILECLIP} },
|
2009-06-14 13:47:38 +00:00
|
|
|
{ bitflag, "Allow any bossdeath for level special", {&compatflags}, {0}, {0}, {0}, {(value_t *)COMPATF_ANYBOSSDEATH} },
|
|
|
|
{ bitflag, "No Minotaur floor flames in water", {&compatflags}, {0}, {0}, {0}, {(value_t *)COMPATF_MINOTAUR} },
|
2009-08-02 15:54:34 +00:00
|
|
|
{ bitflag, "Original A_Mushroom speed in DEH mods", {&compatflags}, {0}, {0}, {0}, {(value_t *)COMPATF_MUSHROOM} },
|
2009-09-14 20:47:53 +00:00
|
|
|
{ bitflag, "Monster movement is affected by effects", {&compatflags}, {0}, {0}, {0}, {(value_t *)COMPATF_MBFMONSTERMOVE} },
|
|
|
|
{ bitflag, "Crushed monsters can be resurrected", {&compatflags}, {0}, {0}, {0}, {(value_t *)COMPATF_CORPSEGIBS} },
|
|
|
|
{ bitflag, "Friendly monsters aren't blocked", {&compatflags}, {0}, {0}, {0}, {(value_t *)COMPATF_NOBLOCKFRIENDS} },
|
2009-12-18 08:19:34 +00:00
|
|
|
{ bitflag, "Invert sprite sorting", {&compatflags}, {0}, {0}, {0}, {(value_t *)COMPATF_SPRITESORT} },
|
2006-04-24 14:26:06 +00:00
|
|
|
|
2006-04-11 16:27:41 +00:00
|
|
|
{ discrete, "Interpolate monster movement", {&nomonsterinterpolation}, {2.0}, {0.0}, {0.0}, {NoYes} },
|
2006-02-24 04:48:15 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
static menu_t CompatibilityMenu =
|
|
|
|
{
|
|
|
|
"COMPATIBILITY OPTIONS",
|
|
|
|
0,
|
- Fixed compilation with mingw again.
- Added multiple-choice sound sequences. These overcome one of the major
deficiences of the Hexen-inherited SNDSEQ system while still being Hexen
compatible: Custom door sounds can now use different opening and closing
sequences, for both normal and blazing speeds.
- Added a serializer for TArray.
- Added a countof macro to doomtype.h. See the1's blog to find out why
it's implemented the way it is.
<http://blogs.msdn.com/the1/articles/210011.aspx>
- Added a new method to FRandom for getting random numbers larger than 255,
which lets me:
- Fixed: SNDSEQ delayrand commands could delay for no more than 255 tics.
- Fixed: If you're going to have sector_t.SoundTarget, then they need to
be included in the pointer cleanup scans.
- Ported back newer name code from 2.1.
- Fixed: Using -warp with only one parameter in Doom and Heretic to
select a map on episode 1 no longer worked.
- New: Loading a multiplayer save now restores the players based on
their names rather than on their connection order. Using connection
order was sensible when -net was the only way to start a network game,
but with -host/-join, it's not so nice. Also, if there aren't enough
players in the save, then the extra players will be spawned normally,
so you can continue a saved game with more players than you started it
with.
- Added some new SNDSEQ commands to make it possible to define Heretic's
ambient sounds in SNDSEQ: volumerel, volumerand, slot, randomsequence,
delayonce, and restart. With these, it is basically possible to obsolete
all of the $ambient SNDINFO commands.
- Fixed: Sound sequences would only execute one command each time they were
ticked.
- Fixed: No bounds checking was done on the volume sound sequences played at.
- Fixed: The tic parameter to playloop was useless and caused it to
act like a redundant playrepeat. I have removed all the logic that
caused playloop to play repeating sounds, and now it acts like an
infinite sequence of play/delay commands until the sequence is
stopped.
- Fixed: Sound sequences were ticked every frame, not every tic, so all
the delay commands were timed incorrectly and varied depending on your
framerate. Since this is useful for restarting looping sounds that got
cut off, I have not changed this. Instead, the delay commands now
record the tic when execution should resume, not the number of tics
left to delay.
SVN r57 (trunk)
2006-04-21 01:22:55 +00:00
|
|
|
countof(CompatibilityItems),
|
2006-02-24 04:48:15 +00:00
|
|
|
0,
|
|
|
|
CompatibilityItems,
|
|
|
|
};
|
|
|
|
|
|
|
|
/*=======================================
|
|
|
|
*
|
|
|
|
* Sound Options Menu
|
|
|
|
*
|
|
|
|
*=======================================*/
|
|
|
|
|
|
|
|
#ifdef _WIN32
|
|
|
|
EXTERN_CVAR (Float, snd_movievolume)
|
|
|
|
#endif
|
|
|
|
EXTERN_CVAR (Bool, snd_flipstereo)
|
|
|
|
EXTERN_CVAR (Bool, snd_pitched)
|
- The garbage collector is now run one last time just before exiting the game.
- Removed movie volume from the sound menu and renamed some of the other
options to give the MIDI device name more room to display itself.
- Moved the midi device selection into the main sound menu.
- Added FMOD as MIDI device -1, to replace the MIDI mapper. This is still the
default device. By default, it uses exactly the same DLS instruments as the
Microsoft GS Wavetable Synth. If you have another set DLS level 1 patch set
you want to use, set the snd_midipatchfile cvar to specify where it should
load the instruments from.
- Changed the ProduceMIDI function to store its output into a TArray<BYTE>.
An overloaded version wraps around it to continue to supply file-writing
support for external Timidity++ usage.
- Added an FMOD credits banner to comply with their non-commercial license.
- Reimplemented the snd_buffersize cvar for the FMOD Ex sound system. Rather
than a time in ms, this is now the length in samples of the DSP buffer.
Also added the snd_buffercount cvar to offer complete control over the
call to FMOD::System::setDSPBufferSize(). Note that with any snd_samplerate
below about 44kHz, you will need to set snd_buffersize to avoid long
latencies.
- Reimplemented the snd_output cvar for the FMOD Ex sound system.
- Changed snd_samplerate default to 0. This now means to use the default
sample rate.
- Made snd_output, snd_output_format, snd_speakermode, snd_resampler, and
snd_hrtf available through the menu.
- Split the HRTF effect selection into its own cvar: snd_hrtf.
- Removed 96000 Hz option from the menu. It's still available through the
cvar, if desired.
- Fixed: If Windows sound init failed, retry with DirectSound. (Apparently,
WASAPI doesn't work with more than two speakers and PCM-Float output at the
same time.)
- Fixed: Area sounds only played from the front speakers once you got within
the 2D panning area.
SVN r854 (trunk)
2008-03-26 04:27:07 +00:00
|
|
|
EXTERN_CVAR (String, snd_output_format)
|
|
|
|
EXTERN_CVAR (String, snd_speakermode)
|
|
|
|
EXTERN_CVAR (String, snd_resampler)
|
|
|
|
EXTERN_CVAR (String, snd_output)
|
|
|
|
EXTERN_CVAR (Int, snd_buffersize)
|
|
|
|
EXTERN_CVAR (Int, snd_buffercount)
|
|
|
|
EXTERN_CVAR (Int, snd_samplerate)
|
|
|
|
EXTERN_CVAR (Bool, snd_hrtf)
|
|
|
|
EXTERN_CVAR (Bool, snd_waterreverb)
|
2008-05-15 04:51:57 +00:00
|
|
|
EXTERN_CVAR (Float, snd_waterlp)
|
- The garbage collector is now run one last time just before exiting the game.
- Removed movie volume from the sound menu and renamed some of the other
options to give the MIDI device name more room to display itself.
- Moved the midi device selection into the main sound menu.
- Added FMOD as MIDI device -1, to replace the MIDI mapper. This is still the
default device. By default, it uses exactly the same DLS instruments as the
Microsoft GS Wavetable Synth. If you have another set DLS level 1 patch set
you want to use, set the snd_midipatchfile cvar to specify where it should
load the instruments from.
- Changed the ProduceMIDI function to store its output into a TArray<BYTE>.
An overloaded version wraps around it to continue to supply file-writing
support for external Timidity++ usage.
- Added an FMOD credits banner to comply with their non-commercial license.
- Reimplemented the snd_buffersize cvar for the FMOD Ex sound system. Rather
than a time in ms, this is now the length in samples of the DSP buffer.
Also added the snd_buffercount cvar to offer complete control over the
call to FMOD::System::setDSPBufferSize(). Note that with any snd_samplerate
below about 44kHz, you will need to set snd_buffersize to avoid long
latencies.
- Reimplemented the snd_output cvar for the FMOD Ex sound system.
- Changed snd_samplerate default to 0. This now means to use the default
sample rate.
- Made snd_output, snd_output_format, snd_speakermode, snd_resampler, and
snd_hrtf available through the menu.
- Split the HRTF effect selection into its own cvar: snd_hrtf.
- Removed 96000 Hz option from the menu. It's still available through the
cvar, if desired.
- Fixed: If Windows sound init failed, retry with DirectSound. (Apparently,
WASAPI doesn't work with more than two speakers and PCM-Float output at the
same time.)
- Fixed: Area sounds only played from the front speakers once you got within
the 2D panning area.
SVN r854 (trunk)
2008-03-26 04:27:07 +00:00
|
|
|
EXTERN_CVAR (Int, snd_mididevice)
|
2006-02-24 04:48:15 +00:00
|
|
|
|
|
|
|
static void MakeSoundChanges ();
|
|
|
|
static void AdvSoundOptions ();
|
2008-05-29 23:33:07 +00:00
|
|
|
static void ModReplayerOptions ();
|
2006-02-24 04:48:15 +00:00
|
|
|
|
|
|
|
static value_t SampleRates[] =
|
|
|
|
{
|
- The garbage collector is now run one last time just before exiting the game.
- Removed movie volume from the sound menu and renamed some of the other
options to give the MIDI device name more room to display itself.
- Moved the midi device selection into the main sound menu.
- Added FMOD as MIDI device -1, to replace the MIDI mapper. This is still the
default device. By default, it uses exactly the same DLS instruments as the
Microsoft GS Wavetable Synth. If you have another set DLS level 1 patch set
you want to use, set the snd_midipatchfile cvar to specify where it should
load the instruments from.
- Changed the ProduceMIDI function to store its output into a TArray<BYTE>.
An overloaded version wraps around it to continue to supply file-writing
support for external Timidity++ usage.
- Added an FMOD credits banner to comply with their non-commercial license.
- Reimplemented the snd_buffersize cvar for the FMOD Ex sound system. Rather
than a time in ms, this is now the length in samples of the DSP buffer.
Also added the snd_buffercount cvar to offer complete control over the
call to FMOD::System::setDSPBufferSize(). Note that with any snd_samplerate
below about 44kHz, you will need to set snd_buffersize to avoid long
latencies.
- Reimplemented the snd_output cvar for the FMOD Ex sound system.
- Changed snd_samplerate default to 0. This now means to use the default
sample rate.
- Made snd_output, snd_output_format, snd_speakermode, snd_resampler, and
snd_hrtf available through the menu.
- Split the HRTF effect selection into its own cvar: snd_hrtf.
- Removed 96000 Hz option from the menu. It's still available through the
cvar, if desired.
- Fixed: If Windows sound init failed, retry with DirectSound. (Apparently,
WASAPI doesn't work with more than two speakers and PCM-Float output at the
same time.)
- Fixed: Area sounds only played from the front speakers once you got within
the 2D panning area.
SVN r854 (trunk)
2008-03-26 04:27:07 +00:00
|
|
|
{ 0.f, "Default" },
|
|
|
|
{ 4000.f, "4000 Hz" },
|
|
|
|
{ 8000.f, "8000 Hz" },
|
|
|
|
{ 11025.f, "11025 Hz" },
|
|
|
|
{ 22050.f, "22050 Hz" },
|
|
|
|
{ 32000.f, "32000 Hz" },
|
|
|
|
{ 44100.f, "44100 Hz" },
|
|
|
|
{ 48000.f, "48000 Hz" }
|
2006-02-24 04:48:15 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
static value_t BufferSizes[] =
|
|
|
|
{
|
- The garbage collector is now run one last time just before exiting the game.
- Removed movie volume from the sound menu and renamed some of the other
options to give the MIDI device name more room to display itself.
- Moved the midi device selection into the main sound menu.
- Added FMOD as MIDI device -1, to replace the MIDI mapper. This is still the
default device. By default, it uses exactly the same DLS instruments as the
Microsoft GS Wavetable Synth. If you have another set DLS level 1 patch set
you want to use, set the snd_midipatchfile cvar to specify where it should
load the instruments from.
- Changed the ProduceMIDI function to store its output into a TArray<BYTE>.
An overloaded version wraps around it to continue to supply file-writing
support for external Timidity++ usage.
- Added an FMOD credits banner to comply with their non-commercial license.
- Reimplemented the snd_buffersize cvar for the FMOD Ex sound system. Rather
than a time in ms, this is now the length in samples of the DSP buffer.
Also added the snd_buffercount cvar to offer complete control over the
call to FMOD::System::setDSPBufferSize(). Note that with any snd_samplerate
below about 44kHz, you will need to set snd_buffersize to avoid long
latencies.
- Reimplemented the snd_output cvar for the FMOD Ex sound system.
- Changed snd_samplerate default to 0. This now means to use the default
sample rate.
- Made snd_output, snd_output_format, snd_speakermode, snd_resampler, and
snd_hrtf available through the menu.
- Split the HRTF effect selection into its own cvar: snd_hrtf.
- Removed 96000 Hz option from the menu. It's still available through the
cvar, if desired.
- Fixed: If Windows sound init failed, retry with DirectSound. (Apparently,
WASAPI doesn't work with more than two speakers and PCM-Float output at the
same time.)
- Fixed: Area sounds only played from the front speakers once you got within
the 2D panning area.
SVN r854 (trunk)
2008-03-26 04:27:07 +00:00
|
|
|
{ 0.f, "Default" },
|
|
|
|
{ 64.f, "64 samples" },
|
|
|
|
{ 128.f, "128 samples" },
|
|
|
|
{ 256.f, "256 samples" },
|
|
|
|
{ 512.f, "512 samples" },
|
|
|
|
{ 1024.f, "1024 samples" },
|
|
|
|
{ 2048.f, "2048 samples" },
|
|
|
|
{ 4096.f, "4096 samples" }
|
|
|
|
};
|
|
|
|
|
|
|
|
static value_t BufferCounts[] =
|
|
|
|
{
|
|
|
|
{ 0.f, "Default" },
|
|
|
|
{ 2.f, "2" },
|
|
|
|
{ 3.f, "3" },
|
|
|
|
{ 4.f, "4" },
|
|
|
|
{ 5.f, "5" },
|
|
|
|
{ 6.f, "6" },
|
|
|
|
{ 7.f, "7" },
|
|
|
|
{ 8.f, "8" },
|
|
|
|
{ 9.f, "9" },
|
|
|
|
{ 10.f, "10" },
|
|
|
|
{ 11.f, "11" },
|
|
|
|
{ 12.f, "12" }
|
|
|
|
};
|
|
|
|
|
|
|
|
static valueenum_t Outputs[] =
|
|
|
|
{
|
|
|
|
{ "Default", "Default" },
|
|
|
|
#if defined(_WIN32)
|
|
|
|
{ "DirectSound", "DirectSound" },
|
|
|
|
{ "WASAPI", "Vista WASAPI" },
|
|
|
|
{ "ASIO", "ASIO" },
|
|
|
|
{ "WaveOut", "WaveOut" },
|
|
|
|
{ "OpenAL", "OpenAL (very beta)" },
|
|
|
|
#elif defined(unix)
|
|
|
|
{ "OSS", "OSS" },
|
|
|
|
{ "ALSA", "ALSA" },
|
2009-03-11 04:56:43 +00:00
|
|
|
{ "SDL", "SDL" },
|
- The garbage collector is now run one last time just before exiting the game.
- Removed movie volume from the sound menu and renamed some of the other
options to give the MIDI device name more room to display itself.
- Moved the midi device selection into the main sound menu.
- Added FMOD as MIDI device -1, to replace the MIDI mapper. This is still the
default device. By default, it uses exactly the same DLS instruments as the
Microsoft GS Wavetable Synth. If you have another set DLS level 1 patch set
you want to use, set the snd_midipatchfile cvar to specify where it should
load the instruments from.
- Changed the ProduceMIDI function to store its output into a TArray<BYTE>.
An overloaded version wraps around it to continue to supply file-writing
support for external Timidity++ usage.
- Added an FMOD credits banner to comply with their non-commercial license.
- Reimplemented the snd_buffersize cvar for the FMOD Ex sound system. Rather
than a time in ms, this is now the length in samples of the DSP buffer.
Also added the snd_buffercount cvar to offer complete control over the
call to FMOD::System::setDSPBufferSize(). Note that with any snd_samplerate
below about 44kHz, you will need to set snd_buffersize to avoid long
latencies.
- Reimplemented the snd_output cvar for the FMOD Ex sound system.
- Changed snd_samplerate default to 0. This now means to use the default
sample rate.
- Made snd_output, snd_output_format, snd_speakermode, snd_resampler, and
snd_hrtf available through the menu.
- Split the HRTF effect selection into its own cvar: snd_hrtf.
- Removed 96000 Hz option from the menu. It's still available through the
cvar, if desired.
- Fixed: If Windows sound init failed, retry with DirectSound. (Apparently,
WASAPI doesn't work with more than two speakers and PCM-Float output at the
same time.)
- Fixed: Area sounds only played from the front speakers once you got within
the 2D panning area.
SVN r854 (trunk)
2008-03-26 04:27:07 +00:00
|
|
|
{ "ESD", "ESD" },
|
|
|
|
#elif defined(__APPLE__)
|
|
|
|
{ "Sound Manager", "Sound Manager" },
|
|
|
|
{ "Core Audio", "Core Audio" },
|
|
|
|
#endif
|
|
|
|
{ "No sound", "No sound" }
|
|
|
|
};
|
|
|
|
|
|
|
|
static valueenum_t OutputFormats[] =
|
|
|
|
{
|
|
|
|
{ "PCM-8", "8-bit" },
|
|
|
|
{ "PCM-16", "16-bit" },
|
|
|
|
{ "PCM-24", "24-bit" },
|
|
|
|
{ "PCM-32", "32-bit" },
|
|
|
|
{ "PCM-Float", "32-bit float" }
|
|
|
|
};
|
|
|
|
|
|
|
|
static valueenum_t SpeakerModes[] =
|
|
|
|
{
|
|
|
|
{ "Auto", "Auto" },
|
|
|
|
{ "Mono", "Mono" },
|
|
|
|
{ "Stereo", "Stereo" },
|
|
|
|
{ "Prologic", "Dolby Prologic Decoder" },
|
|
|
|
{ "Quad", "Quad" },
|
|
|
|
{ "Surround", "5 speakers" },
|
|
|
|
{ "5.1", "5.1 speakers" },
|
|
|
|
{ "7.1", "7.1 speakers" }
|
|
|
|
};
|
|
|
|
|
|
|
|
static valueenum_t Resamplers[] =
|
|
|
|
{
|
|
|
|
{ "NoInterp", "No interpolation" },
|
|
|
|
{ "Linear", "Linear" },
|
|
|
|
{ "Cubic", "Cubic" },
|
|
|
|
{ "Spline", "Spline" }
|
2006-02-24 04:48:15 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
static menuitem_t SoundItems[] =
|
|
|
|
{
|
2009-05-15 10:39:40 +00:00
|
|
|
{ slider, "Sounds volume", {&snd_sfxvolume}, {0.0}, {1.0}, {0.05f}, {NULL} },
|
|
|
|
{ slider, "Music volume", {&snd_musicvolume}, {0.0}, {1.0}, {0.05f}, {NULL} },
|
- The garbage collector is now run one last time just before exiting the game.
- Removed movie volume from the sound menu and renamed some of the other
options to give the MIDI device name more room to display itself.
- Moved the midi device selection into the main sound menu.
- Added FMOD as MIDI device -1, to replace the MIDI mapper. This is still the
default device. By default, it uses exactly the same DLS instruments as the
Microsoft GS Wavetable Synth. If you have another set DLS level 1 patch set
you want to use, set the snd_midipatchfile cvar to specify where it should
load the instruments from.
- Changed the ProduceMIDI function to store its output into a TArray<BYTE>.
An overloaded version wraps around it to continue to supply file-writing
support for external Timidity++ usage.
- Added an FMOD credits banner to comply with their non-commercial license.
- Reimplemented the snd_buffersize cvar for the FMOD Ex sound system. Rather
than a time in ms, this is now the length in samples of the DSP buffer.
Also added the snd_buffercount cvar to offer complete control over the
call to FMOD::System::setDSPBufferSize(). Note that with any snd_samplerate
below about 44kHz, you will need to set snd_buffersize to avoid long
latencies.
- Reimplemented the snd_output cvar for the FMOD Ex sound system.
- Changed snd_samplerate default to 0. This now means to use the default
sample rate.
- Made snd_output, snd_output_format, snd_speakermode, snd_resampler, and
snd_hrtf available through the menu.
- Split the HRTF effect selection into its own cvar: snd_hrtf.
- Removed 96000 Hz option from the menu. It's still available through the
cvar, if desired.
- Fixed: If Windows sound init failed, retry with DirectSound. (Apparently,
WASAPI doesn't work with more than two speakers and PCM-Float output at the
same time.)
- Fixed: Area sounds only played from the front speakers once you got within
the 2D panning area.
SVN r854 (trunk)
2008-03-26 04:27:07 +00:00
|
|
|
{ discrete, "MIDI device", {&snd_mididevice}, {0.0}, {0.0}, {0.0}, {NULL} },
|
2006-02-24 04:48:15 +00:00
|
|
|
{ redtext, " ", {NULL}, {0.0}, {0.0}, {0.0}, {NULL} },
|
- The garbage collector is now run one last time just before exiting the game.
- Removed movie volume from the sound menu and renamed some of the other
options to give the MIDI device name more room to display itself.
- Moved the midi device selection into the main sound menu.
- Added FMOD as MIDI device -1, to replace the MIDI mapper. This is still the
default device. By default, it uses exactly the same DLS instruments as the
Microsoft GS Wavetable Synth. If you have another set DLS level 1 patch set
you want to use, set the snd_midipatchfile cvar to specify where it should
load the instruments from.
- Changed the ProduceMIDI function to store its output into a TArray<BYTE>.
An overloaded version wraps around it to continue to supply file-writing
support for external Timidity++ usage.
- Added an FMOD credits banner to comply with their non-commercial license.
- Reimplemented the snd_buffersize cvar for the FMOD Ex sound system. Rather
than a time in ms, this is now the length in samples of the DSP buffer.
Also added the snd_buffercount cvar to offer complete control over the
call to FMOD::System::setDSPBufferSize(). Note that with any snd_samplerate
below about 44kHz, you will need to set snd_buffersize to avoid long
latencies.
- Reimplemented the snd_output cvar for the FMOD Ex sound system.
- Changed snd_samplerate default to 0. This now means to use the default
sample rate.
- Made snd_output, snd_output_format, snd_speakermode, snd_resampler, and
snd_hrtf available through the menu.
- Split the HRTF effect selection into its own cvar: snd_hrtf.
- Removed 96000 Hz option from the menu. It's still available through the
cvar, if desired.
- Fixed: If Windows sound init failed, retry with DirectSound. (Apparently,
WASAPI doesn't work with more than two speakers and PCM-Float output at the
same time.)
- Fixed: Area sounds only played from the front speakers once you got within
the 2D panning area.
SVN r854 (trunk)
2008-03-26 04:27:07 +00:00
|
|
|
{ discrete, "Underwater reverb", {&snd_waterreverb}, {2.0}, {0.0}, {0.0}, {OnOff} },
|
2008-05-15 04:51:57 +00:00
|
|
|
{ slider, "Underwater cutoff", {&snd_waterlp}, {0.0}, {2000.0},{50.0}, {NULL} },
|
- The garbage collector is now run one last time just before exiting the game.
- Removed movie volume from the sound menu and renamed some of the other
options to give the MIDI device name more room to display itself.
- Moved the midi device selection into the main sound menu.
- Added FMOD as MIDI device -1, to replace the MIDI mapper. This is still the
default device. By default, it uses exactly the same DLS instruments as the
Microsoft GS Wavetable Synth. If you have another set DLS level 1 patch set
you want to use, set the snd_midipatchfile cvar to specify where it should
load the instruments from.
- Changed the ProduceMIDI function to store its output into a TArray<BYTE>.
An overloaded version wraps around it to continue to supply file-writing
support for external Timidity++ usage.
- Added an FMOD credits banner to comply with their non-commercial license.
- Reimplemented the snd_buffersize cvar for the FMOD Ex sound system. Rather
than a time in ms, this is now the length in samples of the DSP buffer.
Also added the snd_buffercount cvar to offer complete control over the
call to FMOD::System::setDSPBufferSize(). Note that with any snd_samplerate
below about 44kHz, you will need to set snd_buffersize to avoid long
latencies.
- Reimplemented the snd_output cvar for the FMOD Ex sound system.
- Changed snd_samplerate default to 0. This now means to use the default
sample rate.
- Made snd_output, snd_output_format, snd_speakermode, snd_resampler, and
snd_hrtf available through the menu.
- Split the HRTF effect selection into its own cvar: snd_hrtf.
- Removed 96000 Hz option from the menu. It's still available through the
cvar, if desired.
- Fixed: If Windows sound init failed, retry with DirectSound. (Apparently,
WASAPI doesn't work with more than two speakers and PCM-Float output at the
same time.)
- Fixed: Area sounds only played from the front speakers once you got within
the 2D panning area.
SVN r854 (trunk)
2008-03-26 04:27:07 +00:00
|
|
|
{ discrete, "Randomize pitches", {&snd_pitched}, {2.0}, {0.0}, {0.0}, {OnOff} },
|
2009-12-23 11:41:24 +00:00
|
|
|
{ slider, "Sound channels", {&snd_channels}, {8.0}, {256.0}, {8.0}, {NULL} },
|
2006-02-24 04:48:15 +00:00
|
|
|
{ redtext, " ", {NULL}, {0.0}, {0.0}, {0.0}, {NULL} },
|
- The garbage collector is now run one last time just before exiting the game.
- Removed movie volume from the sound menu and renamed some of the other
options to give the MIDI device name more room to display itself.
- Moved the midi device selection into the main sound menu.
- Added FMOD as MIDI device -1, to replace the MIDI mapper. This is still the
default device. By default, it uses exactly the same DLS instruments as the
Microsoft GS Wavetable Synth. If you have another set DLS level 1 patch set
you want to use, set the snd_midipatchfile cvar to specify where it should
load the instruments from.
- Changed the ProduceMIDI function to store its output into a TArray<BYTE>.
An overloaded version wraps around it to continue to supply file-writing
support for external Timidity++ usage.
- Added an FMOD credits banner to comply with their non-commercial license.
- Reimplemented the snd_buffersize cvar for the FMOD Ex sound system. Rather
than a time in ms, this is now the length in samples of the DSP buffer.
Also added the snd_buffercount cvar to offer complete control over the
call to FMOD::System::setDSPBufferSize(). Note that with any snd_samplerate
below about 44kHz, you will need to set snd_buffersize to avoid long
latencies.
- Reimplemented the snd_output cvar for the FMOD Ex sound system.
- Changed snd_samplerate default to 0. This now means to use the default
sample rate.
- Made snd_output, snd_output_format, snd_speakermode, snd_resampler, and
snd_hrtf available through the menu.
- Split the HRTF effect selection into its own cvar: snd_hrtf.
- Removed 96000 Hz option from the menu. It's still available through the
cvar, if desired.
- Fixed: If Windows sound init failed, retry with DirectSound. (Apparently,
WASAPI doesn't work with more than two speakers and PCM-Float output at the
same time.)
- Fixed: Area sounds only played from the front speakers once you got within
the 2D panning area.
SVN r854 (trunk)
2008-03-26 04:27:07 +00:00
|
|
|
{ more, "Restart sound", {NULL}, {0.0}, {0.0}, {0.0}, {(value_t *)MakeSoundChanges} },
|
2006-02-24 04:48:15 +00:00
|
|
|
{ redtext, " ", {NULL}, {0.0}, {0.0}, {0.0}, {NULL} },
|
- The garbage collector is now run one last time just before exiting the game.
- Removed movie volume from the sound menu and renamed some of the other
options to give the MIDI device name more room to display itself.
- Moved the midi device selection into the main sound menu.
- Added FMOD as MIDI device -1, to replace the MIDI mapper. This is still the
default device. By default, it uses exactly the same DLS instruments as the
Microsoft GS Wavetable Synth. If you have another set DLS level 1 patch set
you want to use, set the snd_midipatchfile cvar to specify where it should
load the instruments from.
- Changed the ProduceMIDI function to store its output into a TArray<BYTE>.
An overloaded version wraps around it to continue to supply file-writing
support for external Timidity++ usage.
- Added an FMOD credits banner to comply with their non-commercial license.
- Reimplemented the snd_buffersize cvar for the FMOD Ex sound system. Rather
than a time in ms, this is now the length in samples of the DSP buffer.
Also added the snd_buffercount cvar to offer complete control over the
call to FMOD::System::setDSPBufferSize(). Note that with any snd_samplerate
below about 44kHz, you will need to set snd_buffersize to avoid long
latencies.
- Reimplemented the snd_output cvar for the FMOD Ex sound system.
- Changed snd_samplerate default to 0. This now means to use the default
sample rate.
- Made snd_output, snd_output_format, snd_speakermode, snd_resampler, and
snd_hrtf available through the menu.
- Split the HRTF effect selection into its own cvar: snd_hrtf.
- Removed 96000 Hz option from the menu. It's still available through the
cvar, if desired.
- Fixed: If Windows sound init failed, retry with DirectSound. (Apparently,
WASAPI doesn't work with more than two speakers and PCM-Float output at the
same time.)
- Fixed: Area sounds only played from the front speakers once you got within
the 2D panning area.
SVN r854 (trunk)
2008-03-26 04:27:07 +00:00
|
|
|
{ ediscrete,"Output system", {&snd_output}, {countof(Outputs)}, {0.0}, {0.0}, {(value_t *)Outputs} },
|
|
|
|
{ ediscrete,"Output format", {&snd_output_format}, {5.0}, {0.0}, {0.0}, {(value_t *)OutputFormats} },
|
|
|
|
{ ediscrete,"Speaker mode", {&snd_speakermode}, {8.0}, {0.0}, {0.0}, {(value_t *)SpeakerModes} },
|
|
|
|
{ ediscrete,"Resampler", {&snd_resampler}, {4.0}, {0.0}, {0.0}, {(value_t *)Resamplers} },
|
|
|
|
{ discrete, "HRTF filter", {&snd_hrtf}, {2.0}, {0.0}, {0.0}, {(value_t *)OnOff} },
|
2006-02-24 04:48:15 +00:00
|
|
|
|
|
|
|
{ redtext, " ", {NULL}, {0.0}, {0.0}, {0.0}, {NULL} },
|
- The garbage collector is now run one last time just before exiting the game.
- Removed movie volume from the sound menu and renamed some of the other
options to give the MIDI device name more room to display itself.
- Moved the midi device selection into the main sound menu.
- Added FMOD as MIDI device -1, to replace the MIDI mapper. This is still the
default device. By default, it uses exactly the same DLS instruments as the
Microsoft GS Wavetable Synth. If you have another set DLS level 1 patch set
you want to use, set the snd_midipatchfile cvar to specify where it should
load the instruments from.
- Changed the ProduceMIDI function to store its output into a TArray<BYTE>.
An overloaded version wraps around it to continue to supply file-writing
support for external Timidity++ usage.
- Added an FMOD credits banner to comply with their non-commercial license.
- Reimplemented the snd_buffersize cvar for the FMOD Ex sound system. Rather
than a time in ms, this is now the length in samples of the DSP buffer.
Also added the snd_buffercount cvar to offer complete control over the
call to FMOD::System::setDSPBufferSize(). Note that with any snd_samplerate
below about 44kHz, you will need to set snd_buffersize to avoid long
latencies.
- Reimplemented the snd_output cvar for the FMOD Ex sound system.
- Changed snd_samplerate default to 0. This now means to use the default
sample rate.
- Made snd_output, snd_output_format, snd_speakermode, snd_resampler, and
snd_hrtf available through the menu.
- Split the HRTF effect selection into its own cvar: snd_hrtf.
- Removed 96000 Hz option from the menu. It's still available through the
cvar, if desired.
- Fixed: If Windows sound init failed, retry with DirectSound. (Apparently,
WASAPI doesn't work with more than two speakers and PCM-Float output at the
same time.)
- Fixed: Area sounds only played from the front speakers once you got within
the 2D panning area.
SVN r854 (trunk)
2008-03-26 04:27:07 +00:00
|
|
|
{ more, "Advanced options", {NULL}, {0.0}, {0.0}, {0.0}, {(value_t *)AdvSoundOptions} },
|
2008-05-29 23:33:07 +00:00
|
|
|
{ more, "Module replayer options", {NULL}, {0.0}, {0.0}, {0.0}, {(value_t *)ModReplayerOptions} },
|
2006-02-24 04:48:15 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
static menu_t SoundMenu =
|
|
|
|
{
|
|
|
|
"SOUND OPTIONS",
|
|
|
|
0,
|
- Fixed compilation with mingw again.
- Added multiple-choice sound sequences. These overcome one of the major
deficiences of the Hexen-inherited SNDSEQ system while still being Hexen
compatible: Custom door sounds can now use different opening and closing
sequences, for both normal and blazing speeds.
- Added a serializer for TArray.
- Added a countof macro to doomtype.h. See the1's blog to find out why
it's implemented the way it is.
<http://blogs.msdn.com/the1/articles/210011.aspx>
- Added a new method to FRandom for getting random numbers larger than 255,
which lets me:
- Fixed: SNDSEQ delayrand commands could delay for no more than 255 tics.
- Fixed: If you're going to have sector_t.SoundTarget, then they need to
be included in the pointer cleanup scans.
- Ported back newer name code from 2.1.
- Fixed: Using -warp with only one parameter in Doom and Heretic to
select a map on episode 1 no longer worked.
- New: Loading a multiplayer save now restores the players based on
their names rather than on their connection order. Using connection
order was sensible when -net was the only way to start a network game,
but with -host/-join, it's not so nice. Also, if there aren't enough
players in the save, then the extra players will be spawned normally,
so you can continue a saved game with more players than you started it
with.
- Added some new SNDSEQ commands to make it possible to define Heretic's
ambient sounds in SNDSEQ: volumerel, volumerand, slot, randomsequence,
delayonce, and restart. With these, it is basically possible to obsolete
all of the $ambient SNDINFO commands.
- Fixed: Sound sequences would only execute one command each time they were
ticked.
- Fixed: No bounds checking was done on the volume sound sequences played at.
- Fixed: The tic parameter to playloop was useless and caused it to
act like a redundant playrepeat. I have removed all the logic that
caused playloop to play repeating sounds, and now it acts like an
infinite sequence of play/delay commands until the sequence is
stopped.
- Fixed: Sound sequences were ticked every frame, not every tic, so all
the delay commands were timed incorrectly and varied depending on your
framerate. Since this is useful for restarting looping sounds that got
cut off, I have not changed this. Instead, the delay commands now
record the tic when execution should resume, not the number of tics
left to delay.
SVN r57 (trunk)
2006-04-21 01:22:55 +00:00
|
|
|
countof(SoundItems),
|
2006-02-24 04:48:15 +00:00
|
|
|
0,
|
|
|
|
SoundItems,
|
|
|
|
};
|
|
|
|
|
- The garbage collector is now run one last time just before exiting the game.
- Removed movie volume from the sound menu and renamed some of the other
options to give the MIDI device name more room to display itself.
- Moved the midi device selection into the main sound menu.
- Added FMOD as MIDI device -1, to replace the MIDI mapper. This is still the
default device. By default, it uses exactly the same DLS instruments as the
Microsoft GS Wavetable Synth. If you have another set DLS level 1 patch set
you want to use, set the snd_midipatchfile cvar to specify where it should
load the instruments from.
- Changed the ProduceMIDI function to store its output into a TArray<BYTE>.
An overloaded version wraps around it to continue to supply file-writing
support for external Timidity++ usage.
- Added an FMOD credits banner to comply with their non-commercial license.
- Reimplemented the snd_buffersize cvar for the FMOD Ex sound system. Rather
than a time in ms, this is now the length in samples of the DSP buffer.
Also added the snd_buffercount cvar to offer complete control over the
call to FMOD::System::setDSPBufferSize(). Note that with any snd_samplerate
below about 44kHz, you will need to set snd_buffersize to avoid long
latencies.
- Reimplemented the snd_output cvar for the FMOD Ex sound system.
- Changed snd_samplerate default to 0. This now means to use the default
sample rate.
- Made snd_output, snd_output_format, snd_speakermode, snd_resampler, and
snd_hrtf available through the menu.
- Split the HRTF effect selection into its own cvar: snd_hrtf.
- Removed 96000 Hz option from the menu. It's still available through the
cvar, if desired.
- Fixed: If Windows sound init failed, retry with DirectSound. (Apparently,
WASAPI doesn't work with more than two speakers and PCM-Float output at the
same time.)
- Fixed: Area sounds only played from the front speakers once you got within
the 2D panning area.
SVN r854 (trunk)
2008-03-26 04:27:07 +00:00
|
|
|
#define MIDI_DEVICE_ITEM 2
|
2006-02-24 04:48:15 +00:00
|
|
|
|
|
|
|
/*=======================================
|
|
|
|
*
|
|
|
|
* Advanced Sound Options Menu
|
|
|
|
*
|
|
|
|
*=======================================*/
|
|
|
|
|
|
|
|
EXTERN_CVAR (Bool, opl_onechip)
|
|
|
|
|
|
|
|
static menuitem_t AdvSoundItems[] =
|
|
|
|
{
|
2008-03-29 05:01:38 +00:00
|
|
|
{ discrete, "Sample rate", {&snd_samplerate}, {8.0}, {0.0}, {0.0}, {SampleRates} },
|
|
|
|
{ discrete, "Buffer size", {&snd_buffersize}, {8.0}, {0.0}, {0.0}, {BufferSizes} },
|
|
|
|
{ discrete, "Buffer count", {&snd_buffercount}, {12.0}, {0.0}, {0.0}, {BufferCounts} },
|
|
|
|
{ redtext, " ", {NULL}, {0.0}, {0.0}, {0.0}, {NULL} },
|
|
|
|
{ whitetext,"OPL Synthesis", {NULL}, {0.0}, {0.0}, {0.0}, {NULL} },
|
2006-02-24 04:48:15 +00:00
|
|
|
{ discrete, "Only emulate one OPL chip", {&opl_onechip}, {2.0}, {0.0}, {0.0}, {OnOff} },
|
|
|
|
};
|
|
|
|
|
|
|
|
static menu_t AdvSoundMenu =
|
|
|
|
{
|
|
|
|
"ADVANCED SOUND OPTIONS",
|
2008-03-29 05:01:38 +00:00
|
|
|
0,
|
- Fixed compilation with mingw again.
- Added multiple-choice sound sequences. These overcome one of the major
deficiences of the Hexen-inherited SNDSEQ system while still being Hexen
compatible: Custom door sounds can now use different opening and closing
sequences, for both normal and blazing speeds.
- Added a serializer for TArray.
- Added a countof macro to doomtype.h. See the1's blog to find out why
it's implemented the way it is.
<http://blogs.msdn.com/the1/articles/210011.aspx>
- Added a new method to FRandom for getting random numbers larger than 255,
which lets me:
- Fixed: SNDSEQ delayrand commands could delay for no more than 255 tics.
- Fixed: If you're going to have sector_t.SoundTarget, then they need to
be included in the pointer cleanup scans.
- Ported back newer name code from 2.1.
- Fixed: Using -warp with only one parameter in Doom and Heretic to
select a map on episode 1 no longer worked.
- New: Loading a multiplayer save now restores the players based on
their names rather than on their connection order. Using connection
order was sensible when -net was the only way to start a network game,
but with -host/-join, it's not so nice. Also, if there aren't enough
players in the save, then the extra players will be spawned normally,
so you can continue a saved game with more players than you started it
with.
- Added some new SNDSEQ commands to make it possible to define Heretic's
ambient sounds in SNDSEQ: volumerel, volumerand, slot, randomsequence,
delayonce, and restart. With these, it is basically possible to obsolete
all of the $ambient SNDINFO commands.
- Fixed: Sound sequences would only execute one command each time they were
ticked.
- Fixed: No bounds checking was done on the volume sound sequences played at.
- Fixed: The tic parameter to playloop was useless and caused it to
act like a redundant playrepeat. I have removed all the logic that
caused playloop to play repeating sounds, and now it acts like an
infinite sequence of play/delay commands until the sequence is
stopped.
- Fixed: Sound sequences were ticked every frame, not every tic, so all
the delay commands were timed incorrectly and varied depending on your
framerate. Since this is useful for restarting looping sounds that got
cut off, I have not changed this. Instead, the delay commands now
record the tic when execution should resume, not the number of tics
left to delay.
SVN r57 (trunk)
2006-04-21 01:22:55 +00:00
|
|
|
countof(AdvSoundItems),
|
2006-02-24 04:48:15 +00:00
|
|
|
0,
|
|
|
|
AdvSoundItems,
|
|
|
|
};
|
|
|
|
|
2008-05-29 23:33:07 +00:00
|
|
|
/*=======================================
|
|
|
|
*
|
|
|
|
* Module Replayer Options Menu
|
|
|
|
*
|
|
|
|
*=======================================*/
|
|
|
|
|
|
|
|
EXTERN_CVAR(Bool, mod_dumb)
|
|
|
|
EXTERN_CVAR(Int, mod_samplerate)
|
|
|
|
EXTERN_CVAR(Int, mod_volramp)
|
|
|
|
EXTERN_CVAR(Int, mod_interp)
|
|
|
|
EXTERN_CVAR(Bool, mod_autochip)
|
|
|
|
EXTERN_CVAR(Int, mod_autochip_size_force)
|
|
|
|
EXTERN_CVAR(Int, mod_autochip_size_scan)
|
|
|
|
EXTERN_CVAR(Int, mod_autochip_scan_threshold)
|
|
|
|
|
|
|
|
static value_t ModReplayers[] =
|
|
|
|
{
|
|
|
|
{ 0.0, "FMOD" },
|
|
|
|
{ 1.0, "foo_dumb" }
|
|
|
|
};
|
|
|
|
|
|
|
|
static value_t ModInterpolations[] =
|
|
|
|
{
|
|
|
|
{ 0.0, "None" },
|
|
|
|
{ 1.0, "Linear" },
|
|
|
|
{ 2.0, "Cubic" }
|
|
|
|
};
|
|
|
|
|
|
|
|
static value_t ModVolumeRamps[] =
|
|
|
|
{
|
|
|
|
{ 0.0, "None" },
|
|
|
|
{ 1.0, "Logarithmic" },
|
|
|
|
{ 2.0, "Linear" },
|
|
|
|
{ 3.0, "XM=lin, else none" },
|
|
|
|
{ 4.0, "XM=lin, else log" }
|
|
|
|
};
|
|
|
|
|
|
|
|
static menuitem_t ModReplayerItems[] =
|
|
|
|
{
|
|
|
|
{ discrete, "Replayer engine", {&mod_dumb}, {2.0}, {0.0}, {0.0}, {ModReplayers} },
|
|
|
|
{ redtext, " ", {NULL}, {0.0}, {0.0}, {0.0}, {NULL} },
|
|
|
|
{ discrete, "Sample rate", {&mod_samplerate}, {8.0}, {0.0}, {0.0}, {SampleRates} },
|
|
|
|
{ discrete, "Interpolation", {&mod_interp}, {3.0}, {0.0}, {0.0}, {ModInterpolations} },
|
|
|
|
{ discrete, "Volume ramping", {&mod_volramp}, {5.0}, {0.0}, {0.0}, {ModVolumeRamps} },
|
|
|
|
{ redtext, " ", {NULL}, {0.0}, {0.0}, {0.0}, {NULL} },
|
|
|
|
{ discrete, "Chip-o-matic", {&mod_autochip}, {2.0}, {0.0}, {0.0}, {OnOff} },
|
|
|
|
// TODO if the menu system is ever rewritten: Provide a decent
|
|
|
|
// mechanism to edit the chip-o-matic settings like you can with
|
|
|
|
// the foo_dumb preferences in foobar2000.
|
|
|
|
};
|
|
|
|
|
|
|
|
static menu_t ModReplayerMenu =
|
|
|
|
{
|
|
|
|
"MODULE REPLAYER OPTIONS",
|
|
|
|
0,
|
|
|
|
countof(ModReplayerItems),
|
|
|
|
0,
|
|
|
|
ModReplayerItems,
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
//===========================================================================
|
2006-12-29 03:38:37 +00:00
|
|
|
static void ActivateConfirm (const char *text, void (*func)())
|
2006-02-24 04:48:15 +00:00
|
|
|
{
|
|
|
|
ConfirmItems[0].label = text;
|
|
|
|
ConfirmItems[0].e.mfunc = func;
|
|
|
|
ConfirmMenu.lastOn = 3;
|
|
|
|
M_SwitchMenu (&ConfirmMenu);
|
|
|
|
}
|
|
|
|
|
|
|
|
static void ConfirmIsAGo ()
|
|
|
|
{
|
|
|
|
M_PopMenuStack ();
|
|
|
|
ConfirmItems[0].e.mfunc ();
|
|
|
|
}
|
|
|
|
|
|
|
|
//
|
|
|
|
// Set some stuff up for the video modes menu
|
|
|
|
//
|
2007-12-23 16:53:39 +00:00
|
|
|
static BYTE BitTranslate[32];
|
2006-02-24 04:48:15 +00:00
|
|
|
|
|
|
|
void M_OptInit (void)
|
Note: I have not tried compiling these recent changes under Linux. I wouldn't
be surprised if it doesn't work.
- Reorganized the network startup loops so now they are event driven. There is
a single function that gets called to drive it, and it uses callbacks to
perform the different stages of the synchronization. This lets me have a nice,
responsive abort button instead of the previous unannounced hit-escape-to-
abort behavior, and I think the rearranged code is slightly easier to
understand too.
- Increased the number of bytes for version info during D_ArbitrateNetStart(),
in preparation for the day when NETGAMEVERSION requires more than one byte.
- I noticed an issue with Vista RC1 and the new fatal error setup. Even after
releasing a DirectDraw or Direct3D interface, the DWM can still use the
last image drawn using them when it composites the window. It doesn't always
do it but it does often enough that it is a real problem. At this point, I
don't know if it's a problem with the release version of Vista or not.
After messing around, I discovered the problem was caused by ~Win32Video()
hiding the window and then having it immediately shown soon after. The DWM
kept an image of the window to do the transition effect with, and then when
it didn't get a chance to do the transition, it didn't properly forget about
its saved image and kept plastering it on top of everything else
underneath.
- Added a network synchronization panel to the window during netgame startup.
- Fixed: PClass::CreateDerivedClass() must initialize StateList to NULL.
Otherwise, classic DECORATE definitions generate a big, fat crash.
- Resurrected the R_Init progress bar, now as a standard Windows control.
- Removed the sound failure dialog. The FMOD setup already defaulted to no
sound if initialization failed, so this only applies when snd_output is set
to "alternate" which now also falls back to no sound. In addition, it wasn't
working right, and I didn't feel like fixing it for the probably 0% of users
it affected.
- Fixed: The edit control used for logging output added text in reverse order
on Win9x.
- Went back to the roots and made graphics initialization one of the last
things to happen during setup. Now the startup text is visible again. More
importantly, the main window is no longer created invisible, which seems
to cause trouble with it not always appearing in the taskbar. The fatal
error dialog is now also embedded in the main window instead of being a
separate modal dialog, so you can play with the log window to see any
problems that might be reported there.
Rather than completely restoring the original startup order, I tried to
keep things as close to the way they were with early graphics startup. In
particular, V_Init() now creates a dummy screen so that things that need
screen dimensions can get them. It gets replaced by the real screen later
in I_InitGraphics(). Will need to check this under Linux to make sure it
didn't cause any problems there.
- Removed the following stubs that just called functions in Video:
- I_StartModeIterator()
- I_NextMode()
- I_DisplayType()
I_FullscreenChanged() was also removed, and a new fullscreen parameter
was added to IVideo::StartModeIterator(), since that's all it controlled.
- Renamed I_InitHardware() back to I_InitGraphics(), since that's all it's
initialized post-1.22.
SVN r416 (trunk)
2006-12-19 04:09:10 +00:00
|
|
|
{
|
2008-08-30 19:44:19 +00:00
|
|
|
if (gameinfo.gametype & GAME_DoomChex)
|
Note: I have not tried compiling these recent changes under Linux. I wouldn't
be surprised if it doesn't work.
- Reorganized the network startup loops so now they are event driven. There is
a single function that gets called to drive it, and it uses callbacks to
perform the different stages of the synchronization. This lets me have a nice,
responsive abort button instead of the previous unannounced hit-escape-to-
abort behavior, and I think the rearranged code is slightly easier to
understand too.
- Increased the number of bytes for version info during D_ArbitrateNetStart(),
in preparation for the day when NETGAMEVERSION requires more than one byte.
- I noticed an issue with Vista RC1 and the new fatal error setup. Even after
releasing a DirectDraw or Direct3D interface, the DWM can still use the
last image drawn using them when it composites the window. It doesn't always
do it but it does often enough that it is a real problem. At this point, I
don't know if it's a problem with the release version of Vista or not.
After messing around, I discovered the problem was caused by ~Win32Video()
hiding the window and then having it immediately shown soon after. The DWM
kept an image of the window to do the transition effect with, and then when
it didn't get a chance to do the transition, it didn't properly forget about
its saved image and kept plastering it on top of everything else
underneath.
- Added a network synchronization panel to the window during netgame startup.
- Fixed: PClass::CreateDerivedClass() must initialize StateList to NULL.
Otherwise, classic DECORATE definitions generate a big, fat crash.
- Resurrected the R_Init progress bar, now as a standard Windows control.
- Removed the sound failure dialog. The FMOD setup already defaulted to no
sound if initialization failed, so this only applies when snd_output is set
to "alternate" which now also falls back to no sound. In addition, it wasn't
working right, and I didn't feel like fixing it for the probably 0% of users
it affected.
- Fixed: The edit control used for logging output added text in reverse order
on Win9x.
- Went back to the roots and made graphics initialization one of the last
things to happen during setup. Now the startup text is visible again. More
importantly, the main window is no longer created invisible, which seems
to cause trouble with it not always appearing in the taskbar. The fatal
error dialog is now also embedded in the main window instead of being a
separate modal dialog, so you can play with the log window to see any
problems that might be reported there.
Rather than completely restoring the original startup order, I tried to
keep things as close to the way they were with early graphics startup. In
particular, V_Init() now creates a dummy screen so that things that need
screen dimensions can get them. It gets replaced by the real screen later
in I_InitGraphics(). Will need to check this under Linux to make sure it
didn't cause any problems there.
- Removed the following stubs that just called functions in Video:
- I_StartModeIterator()
- I_NextMode()
- I_DisplayType()
I_FullscreenChanged() was also removed, and a new fullscreen parameter
was added to IVideo::StartModeIterator(), since that's all it controlled.
- Renamed I_InitHardware() back to I_InitGraphics(), since that's all it's
initialized post-1.22.
SVN r416 (trunk)
2006-12-19 04:09:10 +00:00
|
|
|
{
|
|
|
|
LabelColor = CR_UNTRANSLATED;
|
|
|
|
ValueColor = CR_GRAY;
|
|
|
|
MoreColor = CR_GRAY;
|
|
|
|
}
|
|
|
|
else if (gameinfo.gametype == GAME_Heretic)
|
|
|
|
{
|
|
|
|
LabelColor = CR_GREEN;
|
|
|
|
ValueColor = CR_UNTRANSLATED;
|
|
|
|
MoreColor = CR_UNTRANSLATED;
|
|
|
|
}
|
|
|
|
else // Hexen
|
|
|
|
{
|
|
|
|
LabelColor = CR_RED;
|
|
|
|
ValueColor = CR_UNTRANSLATED;
|
|
|
|
MoreColor = CR_UNTRANSLATED;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
void M_InitVideoModesMenu ()
|
2006-02-24 04:48:15 +00:00
|
|
|
{
|
2007-05-21 17:02:43 +00:00
|
|
|
int dummy1, dummy2;
|
|
|
|
size_t currval = 0;
|
2006-02-24 04:48:15 +00:00
|
|
|
|
Note: I have not tried compiling these recent changes under Linux. I wouldn't
be surprised if it doesn't work.
- Reorganized the network startup loops so now they are event driven. There is
a single function that gets called to drive it, and it uses callbacks to
perform the different stages of the synchronization. This lets me have a nice,
responsive abort button instead of the previous unannounced hit-escape-to-
abort behavior, and I think the rearranged code is slightly easier to
understand too.
- Increased the number of bytes for version info during D_ArbitrateNetStart(),
in preparation for the day when NETGAMEVERSION requires more than one byte.
- I noticed an issue with Vista RC1 and the new fatal error setup. Even after
releasing a DirectDraw or Direct3D interface, the DWM can still use the
last image drawn using them when it composites the window. It doesn't always
do it but it does often enough that it is a real problem. At this point, I
don't know if it's a problem with the release version of Vista or not.
After messing around, I discovered the problem was caused by ~Win32Video()
hiding the window and then having it immediately shown soon after. The DWM
kept an image of the window to do the transition effect with, and then when
it didn't get a chance to do the transition, it didn't properly forget about
its saved image and kept plastering it on top of everything else
underneath.
- Added a network synchronization panel to the window during netgame startup.
- Fixed: PClass::CreateDerivedClass() must initialize StateList to NULL.
Otherwise, classic DECORATE definitions generate a big, fat crash.
- Resurrected the R_Init progress bar, now as a standard Windows control.
- Removed the sound failure dialog. The FMOD setup already defaulted to no
sound if initialization failed, so this only applies when snd_output is set
to "alternate" which now also falls back to no sound. In addition, it wasn't
working right, and I didn't feel like fixing it for the probably 0% of users
it affected.
- Fixed: The edit control used for logging output added text in reverse order
on Win9x.
- Went back to the roots and made graphics initialization one of the last
things to happen during setup. Now the startup text is visible again. More
importantly, the main window is no longer created invisible, which seems
to cause trouble with it not always appearing in the taskbar. The fatal
error dialog is now also embedded in the main window instead of being a
separate modal dialog, so you can play with the log window to see any
problems that might be reported there.
Rather than completely restoring the original startup order, I tried to
keep things as close to the way they were with early graphics startup. In
particular, V_Init() now creates a dummy screen so that things that need
screen dimensions can get them. It gets replaced by the real screen later
in I_InitGraphics(). Will need to check this under Linux to make sure it
didn't cause any problems there.
- Removed the following stubs that just called functions in Video:
- I_StartModeIterator()
- I_NextMode()
- I_DisplayType()
I_FullscreenChanged() was also removed, and a new fullscreen parameter
was added to IVideo::StartModeIterator(), since that's all it controlled.
- Renamed I_InitHardware() back to I_InitGraphics(), since that's all it's
initialized post-1.22.
SVN r416 (trunk)
2006-12-19 04:09:10 +00:00
|
|
|
M_RefreshModesList();
|
|
|
|
|
2007-05-21 17:02:43 +00:00
|
|
|
for (unsigned int i = 1; i <= 32 && currval < countof(Depths); i++)
|
2006-02-24 04:48:15 +00:00
|
|
|
{
|
Note: I have not tried compiling these recent changes under Linux. I wouldn't
be surprised if it doesn't work.
- Reorganized the network startup loops so now they are event driven. There is
a single function that gets called to drive it, and it uses callbacks to
perform the different stages of the synchronization. This lets me have a nice,
responsive abort button instead of the previous unannounced hit-escape-to-
abort behavior, and I think the rearranged code is slightly easier to
understand too.
- Increased the number of bytes for version info during D_ArbitrateNetStart(),
in preparation for the day when NETGAMEVERSION requires more than one byte.
- I noticed an issue with Vista RC1 and the new fatal error setup. Even after
releasing a DirectDraw or Direct3D interface, the DWM can still use the
last image drawn using them when it composites the window. It doesn't always
do it but it does often enough that it is a real problem. At this point, I
don't know if it's a problem with the release version of Vista or not.
After messing around, I discovered the problem was caused by ~Win32Video()
hiding the window and then having it immediately shown soon after. The DWM
kept an image of the window to do the transition effect with, and then when
it didn't get a chance to do the transition, it didn't properly forget about
its saved image and kept plastering it on top of everything else
underneath.
- Added a network synchronization panel to the window during netgame startup.
- Fixed: PClass::CreateDerivedClass() must initialize StateList to NULL.
Otherwise, classic DECORATE definitions generate a big, fat crash.
- Resurrected the R_Init progress bar, now as a standard Windows control.
- Removed the sound failure dialog. The FMOD setup already defaulted to no
sound if initialization failed, so this only applies when snd_output is set
to "alternate" which now also falls back to no sound. In addition, it wasn't
working right, and I didn't feel like fixing it for the probably 0% of users
it affected.
- Fixed: The edit control used for logging output added text in reverse order
on Win9x.
- Went back to the roots and made graphics initialization one of the last
things to happen during setup. Now the startup text is visible again. More
importantly, the main window is no longer created invisible, which seems
to cause trouble with it not always appearing in the taskbar. The fatal
error dialog is now also embedded in the main window instead of being a
separate modal dialog, so you can play with the log window to see any
problems that might be reported there.
Rather than completely restoring the original startup order, I tried to
keep things as close to the way they were with early graphics startup. In
particular, V_Init() now creates a dummy screen so that things that need
screen dimensions can get them. It gets replaced by the real screen later
in I_InitGraphics(). Will need to check this under Linux to make sure it
didn't cause any problems there.
- Removed the following stubs that just called functions in Video:
- I_StartModeIterator()
- I_NextMode()
- I_DisplayType()
I_FullscreenChanged() was also removed, and a new fullscreen parameter
was added to IVideo::StartModeIterator(), since that's all it controlled.
- Renamed I_InitHardware() back to I_InitGraphics(), since that's all it's
initialized post-1.22.
SVN r416 (trunk)
2006-12-19 04:09:10 +00:00
|
|
|
Video->StartModeIterator (i, screen->IsFullscreen());
|
|
|
|
if (Video->NextMode (&dummy1, &dummy2, NULL))
|
2006-02-24 04:48:15 +00:00
|
|
|
{
|
2007-05-21 17:02:43 +00:00
|
|
|
/*
|
2006-02-24 04:48:15 +00:00
|
|
|
Depths[currval].value = currval;
|
About a week's worth of changes here. As a heads-up, I wouldn't be
surprised if this doesn't build in Linux right now. The CMakeLists.txt
were checked with MinGW and NMake, but how they fair under Linux is an
unknown to me at this time.
- Converted most sprintf (and all wsprintf) calls to either mysnprintf or
FStrings, depending on the situation.
- Changed the strings in the wbstartstruct to be FStrings.
- Changed myvsnprintf() to output nothing if count is greater than INT_MAX.
This is so that I can use a series of mysnprintf() calls and advance the
pointer for each one. Once the pointer goes beyond the end of the buffer,
the count will go negative, but since it's an unsigned type it will be
seen as excessively huge instead. This should not be a problem, as there's
no reason for ZDoom to be using text buffers larger than 2 GB anywhere.
- Ripped out the disabled bit from FGameConfigFile::MigrateOldConfig().
- Changed CalcMapName() to return an FString instead of a pointer to a static
buffer.
- Changed startmap in d_main.cpp into an FString.
- Changed CheckWarpTransMap() to take an FString& as the first argument.
- Changed d_mapname in g_level.cpp into an FString.
- Changed DoSubstitution() in ct_chat.cpp to place the substitutions in an
FString.
- Fixed: The MAPINFO parser wrote into the string buffer to construct a map
name when given a Hexen map number. This was fine with the old scanner
code, but only a happy coincidence prevents it from crashing with the new
code
- Added the 'B' conversion specifier to StringFormat::VWorker() for printing
binary numbers.
- Added CMake support for building with MinGW, MSYS, and NMake. Linux support
is probably broken until I get around to booting into Linux again. Niceties
provided over the existing Makefiles they're replacing:
* All command-line builds can use the same build system, rather than having
a separate one for MinGW and another for Linux.
* Microsoft's NMake tool is supported as a target.
* Progress meters.
* Parallel makes work from a fresh checkout without needing to be primed
first with a single-threaded make.
* Porting to other architectures should be simplified, whenever that day
comes.
- Replaced the makewad tool with zipdir. This handles the dependency tracking
itself instead of generating an external makefile to do it, since I couldn't
figure out how to generate a makefile with an external tool and include it
with a CMake-generated makefile. Where makewad used a master list of files
to generate the package file, zipdir just zips the entire contents of one or
more directories.
- Added the gdtoa package from netlib's fp library so that ZDoom's printf-style
formatting can be entirely independant of the CRT.
SVN r1082 (trunk)
2008-07-23 04:57:26 +00:00
|
|
|
mysnprintf (name, countof(name), "%d bit", i);
|
2006-02-24 04:48:15 +00:00
|
|
|
Depths[currval].name = copystring (name);
|
2007-05-21 17:02:43 +00:00
|
|
|
*/
|
|
|
|
BitTranslate[currval++] = i;
|
2006-02-24 04:48:15 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
//ModesItems[VM_DEPTHITEM].b.min = (float)currval;
|
|
|
|
|
Note: I have not tried compiling these recent changes under Linux. I wouldn't
be surprised if it doesn't work.
- Reorganized the network startup loops so now they are event driven. There is
a single function that gets called to drive it, and it uses callbacks to
perform the different stages of the synchronization. This lets me have a nice,
responsive abort button instead of the previous unannounced hit-escape-to-
abort behavior, and I think the rearranged code is slightly easier to
understand too.
- Increased the number of bytes for version info during D_ArbitrateNetStart(),
in preparation for the day when NETGAMEVERSION requires more than one byte.
- I noticed an issue with Vista RC1 and the new fatal error setup. Even after
releasing a DirectDraw or Direct3D interface, the DWM can still use the
last image drawn using them when it composites the window. It doesn't always
do it but it does often enough that it is a real problem. At this point, I
don't know if it's a problem with the release version of Vista or not.
After messing around, I discovered the problem was caused by ~Win32Video()
hiding the window and then having it immediately shown soon after. The DWM
kept an image of the window to do the transition effect with, and then when
it didn't get a chance to do the transition, it didn't properly forget about
its saved image and kept plastering it on top of everything else
underneath.
- Added a network synchronization panel to the window during netgame startup.
- Fixed: PClass::CreateDerivedClass() must initialize StateList to NULL.
Otherwise, classic DECORATE definitions generate a big, fat crash.
- Resurrected the R_Init progress bar, now as a standard Windows control.
- Removed the sound failure dialog. The FMOD setup already defaulted to no
sound if initialization failed, so this only applies when snd_output is set
to "alternate" which now also falls back to no sound. In addition, it wasn't
working right, and I didn't feel like fixing it for the probably 0% of users
it affected.
- Fixed: The edit control used for logging output added text in reverse order
on Win9x.
- Went back to the roots and made graphics initialization one of the last
things to happen during setup. Now the startup text is visible again. More
importantly, the main window is no longer created invisible, which seems
to cause trouble with it not always appearing in the taskbar. The fatal
error dialog is now also embedded in the main window instead of being a
separate modal dialog, so you can play with the log window to see any
problems that might be reported there.
Rather than completely restoring the original startup order, I tried to
keep things as close to the way they were with early graphics startup. In
particular, V_Init() now creates a dummy screen so that things that need
screen dimensions can get them. It gets replaced by the real screen later
in I_InitGraphics(). Will need to check this under Linux to make sure it
didn't cause any problems there.
- Removed the following stubs that just called functions in Video:
- I_StartModeIterator()
- I_NextMode()
- I_DisplayType()
I_FullscreenChanged() was also removed, and a new fullscreen parameter
was added to IVideo::StartModeIterator(), since that's all it controlled.
- Renamed I_InitHardware() back to I_InitGraphics(), since that's all it's
initialized post-1.22.
SVN r416 (trunk)
2006-12-19 04:09:10 +00:00
|
|
|
switch (Video->GetDisplayType ())
|
2006-02-24 04:48:15 +00:00
|
|
|
{
|
|
|
|
case DISPLAY_FullscreenOnly:
|
|
|
|
ModesItems[2].type = nochoice;
|
|
|
|
ModesItems[2].b.min = 1.f;
|
|
|
|
break;
|
|
|
|
case DISPLAY_WindowOnly:
|
|
|
|
ModesItems[2].type = nochoice;
|
|
|
|
ModesItems[2].b.min = 0.f;
|
|
|
|
break;
|
|
|
|
default:
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
//
|
|
|
|
// Toggle messages on/off
|
|
|
|
//
|
|
|
|
void M_ChangeMessages ()
|
|
|
|
{
|
|
|
|
if (show_messages)
|
|
|
|
{
|
|
|
|
Printf (128, "%s\n", GStrings("MSGOFF"));
|
|
|
|
show_messages = false;
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
Printf (128, "%s\n", GStrings("MSGON"));
|
|
|
|
show_messages = true;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
CCMD (togglemessages)
|
|
|
|
{
|
|
|
|
M_ChangeMessages ();
|
|
|
|
}
|
|
|
|
|
|
|
|
void M_SizeDisplay (int diff)
|
|
|
|
{
|
|
|
|
// changing screenblocks automatically resizes the display
|
|
|
|
screenblocks = screenblocks + diff;
|
|
|
|
}
|
|
|
|
|
|
|
|
CCMD (sizedown)
|
|
|
|
{
|
|
|
|
M_SizeDisplay (-1);
|
2008-07-05 03:32:44 +00:00
|
|
|
S_Sound (CHAN_VOICE | CHAN_UI, "menu/change", 1, ATTN_NONE);
|
2006-02-24 04:48:15 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
CCMD (sizeup)
|
|
|
|
{
|
|
|
|
M_SizeDisplay (1);
|
2008-07-05 03:32:44 +00:00
|
|
|
S_Sound (CHAN_VOICE | CHAN_UI, "menu/change", 1, ATTN_NONE);
|
2006-02-24 04:48:15 +00:00
|
|
|
}
|
|
|
|
|
2007-12-09 03:40:02 +00:00
|
|
|
// Draws a string in the console font, scaled to the 8x8 cells
|
|
|
|
// used by the default console font.
|
2009-08-07 03:30:51 +00:00
|
|
|
void M_DrawConText (int color, int x, int y, const char *str)
|
2007-12-09 03:40:02 +00:00
|
|
|
{
|
|
|
|
int len = (int)strlen(str);
|
|
|
|
|
2008-11-27 17:43:36 +00:00
|
|
|
screen->DrawText (ConFont, color, x, y, str,
|
2009-12-25 05:55:51 +00:00
|
|
|
DTA_CellX, 8 * CleanXfac_1,
|
|
|
|
DTA_CellY, 8 * CleanYfac_1,
|
2007-12-09 03:40:02 +00:00
|
|
|
TAG_DONE);
|
|
|
|
}
|
|
|
|
|
2006-02-24 04:48:15 +00:00
|
|
|
void M_BuildKeyList (menuitem_t *item, int numitems)
|
|
|
|
{
|
|
|
|
int i;
|
|
|
|
|
|
|
|
for (i = 0; i < numitems; i++, item++)
|
|
|
|
{
|
|
|
|
if (item->type == control)
|
|
|
|
C_GetKeysForCommand (item->e.command, &item->b.key1, &item->c.key2);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
static void CalcIndent (menu_t *menu)
|
|
|
|
{
|
|
|
|
int i, widest = 0, thiswidth;
|
|
|
|
menuitem_t *item;
|
|
|
|
|
|
|
|
for (i = 0; i < menu->numitems; i++)
|
|
|
|
{
|
|
|
|
item = menu->items + i;
|
2009-01-31 02:47:45 +00:00
|
|
|
if (item->type != whitetext && item->type != redtext && item->type != screenres &&
|
2009-07-26 03:25:18 +00:00
|
|
|
item->type != joymore && (item->type != discrete || item->c.discretecenter != 1))
|
2006-02-24 04:48:15 +00:00
|
|
|
{
|
|
|
|
thiswidth = SmallFont->StringWidth (item->label);
|
|
|
|
if (thiswidth > widest)
|
|
|
|
widest = thiswidth;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
menu->indent = widest + 4;
|
|
|
|
}
|
|
|
|
|
|
|
|
void M_SwitchMenu (menu_t *menu)
|
|
|
|
{
|
|
|
|
MenuStack[MenuStackDepth].menu.newmenu = menu;
|
|
|
|
MenuStack[MenuStackDepth].isNewStyle = true;
|
|
|
|
MenuStack[MenuStackDepth].drawSkull = false;
|
|
|
|
MenuStackDepth++;
|
|
|
|
|
|
|
|
CanScrollUp = false;
|
|
|
|
CanScrollDown = false;
|
|
|
|
CurrentMenu = menu;
|
|
|
|
CurrentItem = menu->lastOn;
|
|
|
|
|
|
|
|
if (!menu->indent)
|
|
|
|
{
|
|
|
|
CalcIndent (menu);
|
|
|
|
}
|
|
|
|
|
|
|
|
flagsvar = 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
bool M_StartOptionsMenu (void)
|
|
|
|
{
|
|
|
|
M_SwitchMenu (&OptionMenu);
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
|
2009-12-25 05:55:51 +00:00
|
|
|
// Draw a slider. Set fracdigits negative to not display the current value numerically.
|
|
|
|
static void M_DrawSlider (int x, int y, double min, double max, double cur,int fracdigits)
|
2006-02-24 04:48:15 +00:00
|
|
|
{
|
2009-07-23 03:03:15 +00:00
|
|
|
double range;
|
2006-02-24 04:48:15 +00:00
|
|
|
|
|
|
|
range = max - min;
|
2009-07-23 03:03:15 +00:00
|
|
|
cur = clamp(cur, min, max) - min;
|
2006-02-24 04:48:15 +00:00
|
|
|
|
2007-12-09 03:40:02 +00:00
|
|
|
M_DrawConText(CR_WHITE, x, y, "\x10\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x12");
|
2010-01-02 11:38:27 +00:00
|
|
|
M_DrawConText(CR_ORANGE, x + int((5 + ((cur * 78) / range)) * CleanXfac_1), y, "\x13");
|
2009-07-23 03:03:15 +00:00
|
|
|
|
|
|
|
if (fracdigits >= 0)
|
|
|
|
{
|
|
|
|
char textbuf[16];
|
|
|
|
mysnprintf(textbuf, countof(textbuf), "%.*f", fracdigits, cur);
|
2009-12-25 05:55:51 +00:00
|
|
|
screen->DrawText(SmallFont, CR_DARKGRAY, x + (12*8 + 4) * CleanXfac_1, y, textbuf, DTA_CleanNoMove_1, true, TAG_DONE);
|
2009-07-23 03:03:15 +00:00
|
|
|
}
|
2006-02-24 04:48:15 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
int M_FindCurVal (float cur, value_t *values, int numvals)
|
|
|
|
{
|
|
|
|
int v;
|
|
|
|
|
|
|
|
for (v = 0; v < numvals; v++)
|
|
|
|
if (values[v].value == cur)
|
|
|
|
break;
|
|
|
|
|
|
|
|
return v;
|
|
|
|
}
|
|
|
|
|
2008-01-08 04:00:43 +00:00
|
|
|
int M_FindCurVal (float cur, valuestring_t *values, int numvals)
|
|
|
|
{
|
|
|
|
int v;
|
|
|
|
|
|
|
|
for (v = 0; v < numvals; v++)
|
|
|
|
if (values[v].value == cur)
|
|
|
|
break;
|
|
|
|
|
|
|
|
return v;
|
|
|
|
}
|
|
|
|
|
- The garbage collector is now run one last time just before exiting the game.
- Removed movie volume from the sound menu and renamed some of the other
options to give the MIDI device name more room to display itself.
- Moved the midi device selection into the main sound menu.
- Added FMOD as MIDI device -1, to replace the MIDI mapper. This is still the
default device. By default, it uses exactly the same DLS instruments as the
Microsoft GS Wavetable Synth. If you have another set DLS level 1 patch set
you want to use, set the snd_midipatchfile cvar to specify where it should
load the instruments from.
- Changed the ProduceMIDI function to store its output into a TArray<BYTE>.
An overloaded version wraps around it to continue to supply file-writing
support for external Timidity++ usage.
- Added an FMOD credits banner to comply with their non-commercial license.
- Reimplemented the snd_buffersize cvar for the FMOD Ex sound system. Rather
than a time in ms, this is now the length in samples of the DSP buffer.
Also added the snd_buffercount cvar to offer complete control over the
call to FMOD::System::setDSPBufferSize(). Note that with any snd_samplerate
below about 44kHz, you will need to set snd_buffersize to avoid long
latencies.
- Reimplemented the snd_output cvar for the FMOD Ex sound system.
- Changed snd_samplerate default to 0. This now means to use the default
sample rate.
- Made snd_output, snd_output_format, snd_speakermode, snd_resampler, and
snd_hrtf available through the menu.
- Split the HRTF effect selection into its own cvar: snd_hrtf.
- Removed 96000 Hz option from the menu. It's still available through the
cvar, if desired.
- Fixed: If Windows sound init failed, retry with DirectSound. (Apparently,
WASAPI doesn't work with more than two speakers and PCM-Float output at the
same time.)
- Fixed: Area sounds only played from the front speakers once you got within
the 2D panning area.
SVN r854 (trunk)
2008-03-26 04:27:07 +00:00
|
|
|
const char *M_FindCurVal(const char *cur, valueenum_t *values, int numvals)
|
|
|
|
{
|
|
|
|
for (int v = 0; v < numvals; ++v)
|
|
|
|
{
|
|
|
|
if (stricmp(values[v].value, cur) == 0)
|
|
|
|
{
|
|
|
|
return values[v].name;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return cur;
|
|
|
|
}
|
|
|
|
|
|
|
|
const char *M_FindPrevVal(const char *cur, valueenum_t *values, int numvals)
|
|
|
|
{
|
|
|
|
for (int v = 0; v < numvals; ++v)
|
|
|
|
{
|
|
|
|
if (stricmp(values[v].value, cur) == 0)
|
|
|
|
{
|
|
|
|
return values[v == 0 ? numvals - 1 : v - 1].value;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return values[0].value;
|
|
|
|
}
|
|
|
|
|
|
|
|
const char *M_FindNextVal(const char *cur, valueenum_t *values, int numvals)
|
|
|
|
{
|
|
|
|
for (int v = 0; v < numvals; ++v)
|
|
|
|
{
|
|
|
|
if (stricmp(values[v].value, cur) == 0)
|
|
|
|
{
|
|
|
|
return values[v == numvals - 1 ? 0 : v + 1].value;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return values[0].value;
|
|
|
|
}
|
|
|
|
|
2006-02-24 04:48:15 +00:00
|
|
|
void M_OptDrawer ()
|
|
|
|
{
|
|
|
|
EColorRange color;
|
|
|
|
int y, width, i, x, ytop, fontheight;
|
|
|
|
menuitem_t *item;
|
|
|
|
UCVarValue value;
|
2008-05-29 23:33:07 +00:00
|
|
|
DWORD overlay;
|
2006-02-24 04:48:15 +00:00
|
|
|
int labelofs;
|
2009-01-31 02:47:45 +00:00
|
|
|
int indent;
|
2009-12-25 05:55:51 +00:00
|
|
|
int cursorspace;
|
2006-02-24 04:48:15 +00:00
|
|
|
|
|
|
|
if (!CurrentMenu->DontDim)
|
|
|
|
{
|
|
|
|
screen->Dim ();
|
|
|
|
}
|
|
|
|
|
|
|
|
if (CurrentMenu->PreDraw != NULL)
|
|
|
|
{
|
2010-01-03 10:04:56 +00:00
|
|
|
if (CurrentMenu->PreDraw ()) return;
|
2006-02-24 04:48:15 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
if (CurrentMenu->y != 0)
|
|
|
|
{
|
|
|
|
y = CurrentMenu->y;
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
if (BigFont && CurrentMenu->texttitle)
|
|
|
|
{
|
2008-11-27 17:43:36 +00:00
|
|
|
screen->DrawText (BigFont, gameinfo.gametype & GAME_DoomChex ? CR_RED : CR_UNTRANSLATED,
|
2009-12-25 05:55:51 +00:00
|
|
|
(screen->GetWidth() - BigFont->StringWidth(CurrentMenu->texttitle) * CleanXfac_1) / 2, 10*CleanYfac_1,
|
|
|
|
CurrentMenu->texttitle, DTA_CleanNoMove_1, true, TAG_DONE);
|
|
|
|
y = 15 + BigFont->GetHeight();
|
2006-02-24 04:48:15 +00:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
y = 15;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if (gameinfo.gametype & GAME_Raven)
|
|
|
|
{
|
2009-12-25 05:55:51 +00:00
|
|
|
labelofs = 2 * CleanXfac_1;
|
2006-02-24 04:48:15 +00:00
|
|
|
y -= 2;
|
|
|
|
fontheight = 9;
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
labelofs = 0;
|
|
|
|
fontheight = 8;
|
|
|
|
}
|
2009-12-25 05:55:51 +00:00
|
|
|
cursorspace = 14 * CleanXfac_1;
|
|
|
|
y *= CleanYfac_1;
|
|
|
|
fontheight *= CleanYfac_1;
|
|
|
|
ytop = y + CurrentMenu->scrolltop * 8 * CleanYfac_1;
|
|
|
|
int lastrow = screen->GetHeight() - SmallFont->GetHeight() * CleanYfac_1;
|
2006-02-24 04:48:15 +00:00
|
|
|
|
2009-12-25 05:55:51 +00:00
|
|
|
for (i = 0; i < CurrentMenu->numitems && y <= lastrow; i++, y += fontheight)
|
2006-02-24 04:48:15 +00:00
|
|
|
{
|
|
|
|
if (i == CurrentMenu->scrolltop)
|
|
|
|
{
|
|
|
|
i += CurrentMenu->scrollpos;
|
|
|
|
}
|
|
|
|
|
|
|
|
item = CurrentMenu->items + i;
|
2008-05-29 23:33:07 +00:00
|
|
|
overlay = 0;
|
2009-07-26 03:25:18 +00:00
|
|
|
if (item->type == discrete && item->c.discretecenter == 1)
|
2009-01-31 02:47:45 +00:00
|
|
|
{
|
2009-12-25 05:55:51 +00:00
|
|
|
indent = screen->GetWidth() / 2;
|
2009-01-31 02:47:45 +00:00
|
|
|
}
|
2009-07-15 05:53:06 +00:00
|
|
|
else if (item->type == joymore)
|
|
|
|
{
|
2009-12-25 05:55:51 +00:00
|
|
|
indent = 4 * CleanXfac_1;
|
2009-07-15 05:53:06 +00:00
|
|
|
}
|
2009-01-31 02:47:45 +00:00
|
|
|
else
|
|
|
|
{
|
|
|
|
indent = CurrentMenu->indent;
|
2009-12-25 05:55:51 +00:00
|
|
|
if (indent > 280)
|
|
|
|
{ // kludge for the compatibility options with their extremely long labels
|
|
|
|
if (indent + 40 <= CleanWidth_1)
|
|
|
|
{
|
|
|
|
indent = (screen->GetWidth() - ((indent + 40) * CleanXfac_1)) / 2 + indent * CleanXfac_1;
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
indent = screen->GetWidth() - 40 * CleanXfac_1;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
indent = (indent - 160) * CleanXfac_1 + screen->GetWidth() / 2;
|
|
|
|
}
|
2009-01-31 02:47:45 +00:00
|
|
|
}
|
2006-02-24 04:48:15 +00:00
|
|
|
|
|
|
|
if (item->type != screenres)
|
|
|
|
{
|
2009-06-28 03:09:17 +00:00
|
|
|
FString somestring;
|
2009-06-26 02:45:05 +00:00
|
|
|
const char *label;
|
2009-07-15 05:53:06 +00:00
|
|
|
if (item->type != joymore)
|
2009-06-26 02:45:05 +00:00
|
|
|
{
|
|
|
|
label = item->label;
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2009-07-15 05:53:06 +00:00
|
|
|
if (Joysticks.Size() == 0)
|
2009-06-26 02:45:05 +00:00
|
|
|
{
|
|
|
|
label = "No devices connected";
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2009-07-15 05:53:06 +00:00
|
|
|
somestring = Joysticks[item->a.joyselection]->GetName();
|
2009-06-28 03:09:17 +00:00
|
|
|
label = somestring;
|
2009-06-26 02:45:05 +00:00
|
|
|
}
|
|
|
|
}
|
2009-12-25 05:55:51 +00:00
|
|
|
width = SmallFont->StringWidth(label) * CleanXfac_1;
|
2006-02-24 04:48:15 +00:00
|
|
|
switch (item->type)
|
|
|
|
{
|
|
|
|
case more:
|
|
|
|
case safemore:
|
2009-01-31 02:47:45 +00:00
|
|
|
x = indent - width;
|
2006-02-24 04:48:15 +00:00
|
|
|
color = MoreColor;
|
|
|
|
break;
|
|
|
|
|
2009-07-15 05:53:06 +00:00
|
|
|
case joymore:
|
2009-12-25 05:55:51 +00:00
|
|
|
x = 20 * CleanXfac_1;
|
2009-07-15 05:53:06 +00:00
|
|
|
color = MoreColor;
|
|
|
|
break;
|
|
|
|
|
2006-02-24 04:48:15 +00:00
|
|
|
case numberedmore:
|
|
|
|
case rsafemore:
|
|
|
|
case rightmore:
|
2009-12-25 05:55:51 +00:00
|
|
|
x = indent + cursorspace;
|
2006-02-24 04:48:15 +00:00
|
|
|
color = item->type != rightmore ? CR_GREEN : MoreColor;
|
|
|
|
break;
|
|
|
|
|
|
|
|
case redtext:
|
2009-12-25 05:55:51 +00:00
|
|
|
x = screen->GetWidth() / 2 - width / 2;
|
2006-02-24 04:48:15 +00:00
|
|
|
color = LabelColor;
|
|
|
|
break;
|
|
|
|
|
|
|
|
case whitetext:
|
2009-12-25 05:55:51 +00:00
|
|
|
x = screen->GetWidth() / 2 - width / 2;
|
2006-02-24 04:48:15 +00:00
|
|
|
color = CR_GOLD;//ValueColor;
|
|
|
|
break;
|
|
|
|
|
|
|
|
case listelement:
|
2009-12-25 05:55:51 +00:00
|
|
|
x = indent + cursorspace;
|
2006-02-24 04:48:15 +00:00
|
|
|
color = LabelColor;
|
|
|
|
break;
|
|
|
|
|
|
|
|
case colorpicker:
|
2009-12-25 05:55:51 +00:00
|
|
|
x = indent + cursorspace;
|
2006-02-24 04:48:15 +00:00
|
|
|
color = MoreColor;
|
|
|
|
break;
|
|
|
|
|
2008-05-29 23:33:07 +00:00
|
|
|
case discrete:
|
|
|
|
if (item->d.graycheck != NULL && !(**item->d.graycheck))
|
|
|
|
{
|
|
|
|
overlay = MAKEARGB(128,0,0,0);
|
|
|
|
}
|
|
|
|
// Intentional fall-through
|
|
|
|
|
2006-02-24 04:48:15 +00:00
|
|
|
default:
|
2009-01-31 02:47:45 +00:00
|
|
|
x = indent - width;
|
2006-02-24 04:48:15 +00:00
|
|
|
color = (item->type == control && menuactive == MENU_WaitKey && i == CurrentItem)
|
|
|
|
? CR_YELLOW : LabelColor;
|
|
|
|
break;
|
|
|
|
}
|
2009-12-25 05:55:51 +00:00
|
|
|
screen->DrawText (SmallFont, color, x, y, label, DTA_CleanNoMove_1, true, DTA_ColorOverlay, overlay, TAG_DONE);
|
2006-02-24 04:48:15 +00:00
|
|
|
|
|
|
|
switch (item->type)
|
|
|
|
{
|
|
|
|
case numberedmore:
|
|
|
|
if (item->b.position != 0)
|
|
|
|
{
|
|
|
|
char tbuf[16];
|
|
|
|
|
About a week's worth of changes here. As a heads-up, I wouldn't be
surprised if this doesn't build in Linux right now. The CMakeLists.txt
were checked with MinGW and NMake, but how they fair under Linux is an
unknown to me at this time.
- Converted most sprintf (and all wsprintf) calls to either mysnprintf or
FStrings, depending on the situation.
- Changed the strings in the wbstartstruct to be FStrings.
- Changed myvsnprintf() to output nothing if count is greater than INT_MAX.
This is so that I can use a series of mysnprintf() calls and advance the
pointer for each one. Once the pointer goes beyond the end of the buffer,
the count will go negative, but since it's an unsigned type it will be
seen as excessively huge instead. This should not be a problem, as there's
no reason for ZDoom to be using text buffers larger than 2 GB anywhere.
- Ripped out the disabled bit from FGameConfigFile::MigrateOldConfig().
- Changed CalcMapName() to return an FString instead of a pointer to a static
buffer.
- Changed startmap in d_main.cpp into an FString.
- Changed CheckWarpTransMap() to take an FString& as the first argument.
- Changed d_mapname in g_level.cpp into an FString.
- Changed DoSubstitution() in ct_chat.cpp to place the substitutions in an
FString.
- Fixed: The MAPINFO parser wrote into the string buffer to construct a map
name when given a Hexen map number. This was fine with the old scanner
code, but only a happy coincidence prevents it from crashing with the new
code
- Added the 'B' conversion specifier to StringFormat::VWorker() for printing
binary numbers.
- Added CMake support for building with MinGW, MSYS, and NMake. Linux support
is probably broken until I get around to booting into Linux again. Niceties
provided over the existing Makefiles they're replacing:
* All command-line builds can use the same build system, rather than having
a separate one for MinGW and another for Linux.
* Microsoft's NMake tool is supported as a target.
* Progress meters.
* Parallel makes work from a fresh checkout without needing to be primed
first with a single-threaded make.
* Porting to other architectures should be simplified, whenever that day
comes.
- Replaced the makewad tool with zipdir. This handles the dependency tracking
itself instead of generating an external makefile to do it, since I couldn't
figure out how to generate a makefile with an external tool and include it
with a CMake-generated makefile. Where makewad used a master list of files
to generate the package file, zipdir just zips the entire contents of one or
more directories.
- Added the gdtoa package from netlib's fp library so that ZDoom's printf-style
formatting can be entirely independant of the CRT.
SVN r1082 (trunk)
2008-07-23 04:57:26 +00:00
|
|
|
mysnprintf (tbuf, countof(tbuf), "%d.", item->b.position);
|
2009-12-25 05:55:51 +00:00
|
|
|
x = indent - SmallFont->StringWidth (tbuf) * CleanXfac_1;
|
|
|
|
screen->DrawText (SmallFont, CR_GREY, x, y, tbuf, DTA_CleanNoMove_1, true, TAG_DONE);
|
2006-02-24 04:48:15 +00:00
|
|
|
}
|
|
|
|
break;
|
|
|
|
|
2006-12-16 11:49:48 +00:00
|
|
|
case bitmask:
|
|
|
|
{
|
|
|
|
int v, vals;
|
|
|
|
|
|
|
|
value = item->a.cvar->GetGenericRep (CVAR_Int);
|
2009-05-15 10:39:40 +00:00
|
|
|
value.Float = float(value.Int & int(item->c.max));
|
2006-12-16 11:49:48 +00:00
|
|
|
vals = (int)item->b.numvalues;
|
|
|
|
|
|
|
|
v = M_FindCurVal (value.Float, item->e.values, vals);
|
|
|
|
|
|
|
|
if (v == vals)
|
|
|
|
{
|
2009-12-25 05:55:51 +00:00
|
|
|
screen->DrawText (SmallFont, ValueColor, indent + cursorspace, y, "Unknown",
|
|
|
|
DTA_CleanNoMove_1, true, TAG_DONE);
|
2006-12-16 11:49:48 +00:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2008-11-27 17:43:36 +00:00
|
|
|
screen->DrawText (SmallFont, item->type == cdiscrete ? v : ValueColor,
|
2009-12-25 05:55:51 +00:00
|
|
|
indent + cursorspace, y, item->e.values[v].name,
|
|
|
|
DTA_CleanNoMove_1, true, TAG_DONE);
|
2006-12-16 11:49:48 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
break;
|
2008-01-08 04:00:43 +00:00
|
|
|
|
|
|
|
case discretes:
|
2006-02-24 04:48:15 +00:00
|
|
|
case discrete:
|
|
|
|
case cdiscrete:
|
|
|
|
case inverter:
|
2009-06-26 02:45:05 +00:00
|
|
|
case joy_map:
|
2006-02-24 04:48:15 +00:00
|
|
|
{
|
|
|
|
int v, vals;
|
|
|
|
|
2008-05-29 23:33:07 +00:00
|
|
|
overlay = 0;
|
2009-06-26 02:45:05 +00:00
|
|
|
if (item->type == joy_map)
|
|
|
|
{
|
|
|
|
value.Float = (float)SELECTED_JOYSTICK->GetAxisMap(item->a.joyselection);
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
value = item->a.cvar->GetGenericRep (CVAR_Float);
|
|
|
|
}
|
2006-02-24 04:48:15 +00:00
|
|
|
if (item->type == inverter)
|
|
|
|
{
|
|
|
|
value.Float = (value.Float < 0.f);
|
|
|
|
vals = 2;
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
vals = (int)item->b.numvalues;
|
|
|
|
}
|
2008-01-08 04:00:43 +00:00
|
|
|
if (item->type != discretes)
|
|
|
|
{
|
|
|
|
v = M_FindCurVal (value.Float, item->e.values, vals);
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
v = M_FindCurVal (value.Float, item->e.valuestrings, vals);
|
|
|
|
}
|
2008-05-29 23:33:07 +00:00
|
|
|
if (item->type == discrete)
|
|
|
|
{
|
|
|
|
if (item->d.graycheck != NULL && !(**item->d.graycheck))
|
|
|
|
{
|
|
|
|
overlay = MAKEARGB(96,48,0,0);
|
|
|
|
}
|
|
|
|
}
|
2006-02-24 04:48:15 +00:00
|
|
|
|
|
|
|
if (v == vals)
|
|
|
|
{
|
2009-12-25 05:55:51 +00:00
|
|
|
screen->DrawText (SmallFont, ValueColor, indent + cursorspace, y, "Unknown",
|
|
|
|
DTA_CleanNoMove_1, true, DTA_ColorOverlay, overlay, TAG_DONE);
|
2006-02-24 04:48:15 +00:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2008-11-27 17:43:36 +00:00
|
|
|
screen->DrawText (SmallFont, item->type == cdiscrete ? v : ValueColor,
|
2009-12-25 05:55:51 +00:00
|
|
|
indent + cursorspace, y,
|
2008-01-08 16:23:02 +00:00
|
|
|
item->type != discretes ? item->e.values[v].name : item->e.valuestrings[v].name.GetChars(),
|
2009-12-25 05:55:51 +00:00
|
|
|
DTA_CleanNoMove_1, true, DTA_ColorOverlay, overlay, TAG_DONE);
|
2006-02-24 04:48:15 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
|
- The garbage collector is now run one last time just before exiting the game.
- Removed movie volume from the sound menu and renamed some of the other
options to give the MIDI device name more room to display itself.
- Moved the midi device selection into the main sound menu.
- Added FMOD as MIDI device -1, to replace the MIDI mapper. This is still the
default device. By default, it uses exactly the same DLS instruments as the
Microsoft GS Wavetable Synth. If you have another set DLS level 1 patch set
you want to use, set the snd_midipatchfile cvar to specify where it should
load the instruments from.
- Changed the ProduceMIDI function to store its output into a TArray<BYTE>.
An overloaded version wraps around it to continue to supply file-writing
support for external Timidity++ usage.
- Added an FMOD credits banner to comply with their non-commercial license.
- Reimplemented the snd_buffersize cvar for the FMOD Ex sound system. Rather
than a time in ms, this is now the length in samples of the DSP buffer.
Also added the snd_buffercount cvar to offer complete control over the
call to FMOD::System::setDSPBufferSize(). Note that with any snd_samplerate
below about 44kHz, you will need to set snd_buffersize to avoid long
latencies.
- Reimplemented the snd_output cvar for the FMOD Ex sound system.
- Changed snd_samplerate default to 0. This now means to use the default
sample rate.
- Made snd_output, snd_output_format, snd_speakermode, snd_resampler, and
snd_hrtf available through the menu.
- Split the HRTF effect selection into its own cvar: snd_hrtf.
- Removed 96000 Hz option from the menu. It's still available through the
cvar, if desired.
- Fixed: If Windows sound init failed, retry with DirectSound. (Apparently,
WASAPI doesn't work with more than two speakers and PCM-Float output at the
same time.)
- Fixed: Area sounds only played from the front speakers once you got within
the 2D panning area.
SVN r854 (trunk)
2008-03-26 04:27:07 +00:00
|
|
|
case ediscrete:
|
|
|
|
{
|
|
|
|
const char *v;
|
|
|
|
|
|
|
|
value = item->a.cvar->GetGenericRep (CVAR_String);
|
|
|
|
v = M_FindCurVal(value.String, item->e.enumvalues, (int)item->b.numvalues);
|
2009-12-25 05:55:51 +00:00
|
|
|
screen->DrawText(SmallFont, ValueColor, indent + cursorspace, y, v, DTA_CleanNoMove_1, true, TAG_DONE);
|
- The garbage collector is now run one last time just before exiting the game.
- Removed movie volume from the sound menu and renamed some of the other
options to give the MIDI device name more room to display itself.
- Moved the midi device selection into the main sound menu.
- Added FMOD as MIDI device -1, to replace the MIDI mapper. This is still the
default device. By default, it uses exactly the same DLS instruments as the
Microsoft GS Wavetable Synth. If you have another set DLS level 1 patch set
you want to use, set the snd_midipatchfile cvar to specify where it should
load the instruments from.
- Changed the ProduceMIDI function to store its output into a TArray<BYTE>.
An overloaded version wraps around it to continue to supply file-writing
support for external Timidity++ usage.
- Added an FMOD credits banner to comply with their non-commercial license.
- Reimplemented the snd_buffersize cvar for the FMOD Ex sound system. Rather
than a time in ms, this is now the length in samples of the DSP buffer.
Also added the snd_buffercount cvar to offer complete control over the
call to FMOD::System::setDSPBufferSize(). Note that with any snd_samplerate
below about 44kHz, you will need to set snd_buffersize to avoid long
latencies.
- Reimplemented the snd_output cvar for the FMOD Ex sound system.
- Changed snd_samplerate default to 0. This now means to use the default
sample rate.
- Made snd_output, snd_output_format, snd_speakermode, snd_resampler, and
snd_hrtf available through the menu.
- Split the HRTF effect selection into its own cvar: snd_hrtf.
- Removed 96000 Hz option from the menu. It's still available through the
cvar, if desired.
- Fixed: If Windows sound init failed, retry with DirectSound. (Apparently,
WASAPI doesn't work with more than two speakers and PCM-Float output at the
same time.)
- Fixed: Area sounds only played from the front speakers once you got within
the 2D panning area.
SVN r854 (trunk)
2008-03-26 04:27:07 +00:00
|
|
|
}
|
|
|
|
break;
|
|
|
|
|
2009-06-26 02:45:05 +00:00
|
|
|
case nochoice:
|
2009-12-25 05:55:51 +00:00
|
|
|
screen->DrawText (SmallFont, CR_GOLD, indent + cursorspace, y,
|
|
|
|
(item->e.values[(int)item->b.min]).name, DTA_CleanNoMove_1, true, TAG_DONE);
|
2009-06-26 02:45:05 +00:00
|
|
|
break;
|
2006-02-24 04:48:15 +00:00
|
|
|
|
2009-06-26 02:45:05 +00:00
|
|
|
case joy_sens:
|
|
|
|
value.Float = SELECTED_JOYSTICK->GetSensitivity();
|
2009-12-25 05:55:51 +00:00
|
|
|
M_DrawSlider (indent + cursorspace, y + labelofs, item->b.min, item->c.max, value.Float, 1);
|
2009-06-26 02:45:05 +00:00
|
|
|
break;
|
2006-02-24 04:48:15 +00:00
|
|
|
|
2009-06-26 02:45:05 +00:00
|
|
|
case joy_slider:
|
|
|
|
if (item->e.joyslidernum == 0)
|
2006-02-24 04:48:15 +00:00
|
|
|
{
|
2009-06-26 02:45:05 +00:00
|
|
|
value.Float = SELECTED_JOYSTICK->GetAxisScale(item->a.joyselection);
|
2006-02-24 04:48:15 +00:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2009-06-26 02:45:05 +00:00
|
|
|
assert(item->e.joyslidernum == 1);
|
|
|
|
value.Float = SELECTED_JOYSTICK->GetAxisDeadZone(item->a.joyselection);
|
2006-02-24 04:48:15 +00:00
|
|
|
}
|
2009-12-25 05:55:51 +00:00
|
|
|
M_DrawSlider (indent + cursorspace, y + labelofs, item->b.min, item->c.max, fabs(value.Float), 3);
|
2009-06-26 02:45:05 +00:00
|
|
|
break;
|
2006-02-24 04:48:15 +00:00
|
|
|
|
2009-06-26 02:45:05 +00:00
|
|
|
case joy_inverter:
|
|
|
|
assert(item->e.joyslidernum == 0);
|
|
|
|
value.Float = SELECTED_JOYSTICK->GetAxisScale(item->a.joyselection);
|
2009-12-25 05:55:51 +00:00
|
|
|
screen->DrawText(SmallFont, ValueColor, indent + cursorspace, y,
|
2009-06-26 02:45:05 +00:00
|
|
|
(value.Float < 0) ? "Yes" : "No",
|
2009-12-25 05:55:51 +00:00
|
|
|
DTA_CleanNoMove_1, true, TAG_DONE);
|
2006-02-24 04:48:15 +00:00
|
|
|
break;
|
|
|
|
|
|
|
|
case slider:
|
|
|
|
value = item->a.cvar->GetGenericRep (CVAR_Float);
|
2009-12-25 05:55:51 +00:00
|
|
|
M_DrawSlider (indent + cursorspace, y + labelofs, item->b.min, item->c.max, value.Float, 1);
|
2006-02-24 04:48:15 +00:00
|
|
|
break;
|
|
|
|
|
|
|
|
case absslider:
|
|
|
|
value = item->a.cvar->GetGenericRep (CVAR_Float);
|
2009-12-25 05:55:51 +00:00
|
|
|
M_DrawSlider (indent + cursorspace, y + labelofs, item->b.min, item->c.max, fabs(value.Float), 1);
|
2006-02-24 04:48:15 +00:00
|
|
|
break;
|
|
|
|
|
|
|
|
case intslider:
|
2009-12-25 05:55:51 +00:00
|
|
|
M_DrawSlider (indent + cursorspace, y + labelofs, item->b.min, item->c.max, item->a.fval, 0);
|
2006-02-24 04:48:15 +00:00
|
|
|
break;
|
|
|
|
|
|
|
|
case control:
|
|
|
|
{
|
|
|
|
char description[64];
|
|
|
|
|
|
|
|
C_NameKeys (description, item->b.key1, item->c.key2);
|
2008-06-26 17:55:48 +00:00
|
|
|
if (description[0])
|
|
|
|
{
|
2009-12-25 05:55:51 +00:00
|
|
|
M_DrawConText(CR_WHITE, indent + cursorspace, y-1+labelofs, description);
|
2008-06-26 17:55:48 +00:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2009-12-25 05:55:51 +00:00
|
|
|
screen->DrawText(SmallFont, CR_BLACK, indent + cursorspace, y + labelofs, "---",
|
|
|
|
DTA_CleanNoMove_1, true, TAG_DONE);
|
2008-06-26 17:55:48 +00:00
|
|
|
}
|
2006-02-24 04:48:15 +00:00
|
|
|
}
|
|
|
|
break;
|
|
|
|
|
|
|
|
case colorpicker:
|
|
|
|
{
|
|
|
|
int box_x, box_y;
|
2009-12-25 05:55:51 +00:00
|
|
|
box_x = indent - 35 * CleanXfac_1;
|
|
|
|
box_y = (gameinfo.gametype & GAME_Raven) ? y - CleanYfac_1 : y;
|
|
|
|
screen->Clear (box_x, box_y, box_x + 32*CleanXfac_1, box_y + fontheight-CleanYfac_1,
|
2007-12-22 04:52:51 +00:00
|
|
|
item->a.colorcvar->GetIndex(), 0);
|
2006-02-24 04:48:15 +00:00
|
|
|
}
|
|
|
|
break;
|
|
|
|
|
|
|
|
case palettegrid:
|
|
|
|
{
|
|
|
|
int box_x, box_y;
|
|
|
|
int x1, p;
|
2009-12-25 05:55:51 +00:00
|
|
|
const int w = fontheight;
|
|
|
|
const int h = fontheight;
|
2006-02-24 04:48:15 +00:00
|
|
|
|
2009-12-25 05:55:51 +00:00
|
|
|
box_y = y - 2 * CleanYfac_1;
|
2006-02-24 04:48:15 +00:00
|
|
|
p = 0;
|
2009-12-25 05:55:51 +00:00
|
|
|
box_x = indent - 32 * CleanXfac_1;
|
2006-02-24 04:48:15 +00:00
|
|
|
for (x1 = 0, p = int(item->b.min * 16); x1 < 16; ++p, ++x1)
|
|
|
|
{
|
2007-12-22 04:52:51 +00:00
|
|
|
screen->Clear (box_x, box_y, box_x + w, box_y + h, p, 0);
|
2006-02-24 04:48:15 +00:00
|
|
|
if (p == CurrColorIndex || (i == CurrentItem && x1 == SelColorIndex))
|
|
|
|
{
|
2007-12-22 04:52:51 +00:00
|
|
|
int r, g, b;
|
|
|
|
DWORD col;
|
2006-02-24 04:48:15 +00:00
|
|
|
double blinky;
|
|
|
|
if (i == CurrentItem && x1 == SelColorIndex)
|
|
|
|
{
|
|
|
|
r = 255, g = 128, b = 0;
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
r = 200, g = 200, b = 255;
|
|
|
|
}
|
|
|
|
// Make sure the cursors stand out against similar colors
|
|
|
|
// by pulsing them.
|
|
|
|
blinky = fabs(sin(I_MSTime()/1000.0)) * 0.5 + 0.5;
|
2007-12-22 04:52:51 +00:00
|
|
|
col = MAKEARGB(255,int(r*blinky),int(g*blinky),int(b*blinky));
|
2006-02-24 04:48:15 +00:00
|
|
|
|
2007-12-22 04:52:51 +00:00
|
|
|
screen->Clear (box_x, box_y, box_x + w, box_y + 1, -1, col);
|
|
|
|
screen->Clear (box_x, box_y + h-1, box_x + w, box_y + h, -1, col);
|
|
|
|
screen->Clear (box_x, box_y, box_x + 1, box_y + h, -1, col);
|
|
|
|
screen->Clear (box_x + w - 1, box_y, box_x + w, box_y + h, -1, col);
|
2006-02-24 04:48:15 +00:00
|
|
|
}
|
|
|
|
box_x += w;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
|
|
|
|
case bitflag:
|
|
|
|
{
|
|
|
|
value_t *value;
|
2006-12-29 03:38:37 +00:00
|
|
|
const char *str;
|
2006-02-24 04:48:15 +00:00
|
|
|
|
|
|
|
if (item->b.min)
|
|
|
|
value = NoYes;
|
|
|
|
else
|
|
|
|
value = YesNo;
|
|
|
|
|
|
|
|
if (item->a.cvar)
|
|
|
|
{
|
|
|
|
if ((*(item->a.intcvar)) & item->e.flagmask)
|
|
|
|
str = value[1].name;
|
|
|
|
else
|
|
|
|
str = value[0].name;
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
str = "???";
|
|
|
|
}
|
|
|
|
|
2008-11-27 17:43:36 +00:00
|
|
|
screen->DrawText (SmallFont, ValueColor,
|
2009-12-25 05:55:51 +00:00
|
|
|
indent + cursorspace, y, str, DTA_CleanNoMove_1, true, TAG_DONE);
|
2006-02-24 04:48:15 +00:00
|
|
|
}
|
|
|
|
break;
|
|
|
|
|
|
|
|
default:
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
|
|
|
|
if (item->type != palettegrid && // Palette grids draw their own cursor
|
|
|
|
i == CurrentItem &&
|
|
|
|
(skullAnimCounter < 6 || menuactive == MENU_WaitKey))
|
|
|
|
{
|
2009-12-25 05:55:51 +00:00
|
|
|
M_DrawConText(CR_RED, indent + 3 * CleanXfac_1, y-CleanYfac_1+labelofs, "\xd");
|
2006-02-24 04:48:15 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
char *str = NULL;
|
2009-12-25 05:55:51 +00:00
|
|
|
int colwidth = screen->GetWidth() / 3;
|
2006-02-24 04:48:15 +00:00
|
|
|
|
|
|
|
for (x = 0; x < 3; x++)
|
|
|
|
{
|
|
|
|
switch (x)
|
|
|
|
{
|
|
|
|
case 0: str = item->b.res1; break;
|
|
|
|
case 1: str = item->c.res2; break;
|
|
|
|
case 2: str = item->d.res3; break;
|
|
|
|
}
|
|
|
|
if (str)
|
|
|
|
{
|
|
|
|
if (x == item->e.highlight)
|
|
|
|
color = CR_GOLD; //ValueColor;
|
|
|
|
else
|
|
|
|
color = CR_BRICK; //LabelColor;
|
|
|
|
|
2009-12-25 05:55:51 +00:00
|
|
|
screen->DrawText (SmallFont, color, colwidth * x + 20 * CleanXfac_1, y, str, DTA_CleanNoMove_1, true, TAG_DONE);
|
2006-02-24 04:48:15 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
if (i == CurrentItem && ((item->a.selmode != -1 && (skullAnimCounter < 6 || menuactive == MENU_WaitKey)) || testingmode))
|
|
|
|
{
|
2009-12-25 05:55:51 +00:00
|
|
|
M_DrawConText(CR_RED, item->a.selmode * colwidth + 8 * CleanXfac_1, y - CleanYfac_1 + labelofs, "\xd");
|
2006-02-24 04:48:15 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
CanScrollUp = (CurrentMenu->scrollpos > 0);
|
|
|
|
CanScrollDown = (i < CurrentMenu->numitems);
|
|
|
|
VisBottom = i - 1;
|
|
|
|
|
|
|
|
if (CanScrollUp)
|
|
|
|
{
|
2009-12-25 05:55:51 +00:00
|
|
|
M_DrawConText(CR_ORANGE, 3 * CleanXfac_1, ytop + labelofs, "\x1a");
|
2006-02-24 04:48:15 +00:00
|
|
|
}
|
|
|
|
if (CanScrollDown)
|
|
|
|
{
|
2009-12-25 05:55:51 +00:00
|
|
|
M_DrawConText(CR_ORANGE, 3 * CleanXfac_1, y - 8*CleanYfac_1 + labelofs, "\x1b");
|
2006-02-24 04:48:15 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
if (flagsvar)
|
|
|
|
{
|
|
|
|
static const FIntCVar *const vars[3] = { &dmflags, &dmflags2, &compatflags };
|
|
|
|
char flagsblah[256];
|
|
|
|
char *fillptr = flagsblah;
|
|
|
|
bool printed = false;
|
|
|
|
|
|
|
|
for (int i = 0; i < 3; ++i)
|
|
|
|
{
|
|
|
|
if (flagsvar & (1 << i))
|
|
|
|
{
|
|
|
|
if (printed)
|
|
|
|
{
|
About a week's worth of changes here. As a heads-up, I wouldn't be
surprised if this doesn't build in Linux right now. The CMakeLists.txt
were checked with MinGW and NMake, but how they fair under Linux is an
unknown to me at this time.
- Converted most sprintf (and all wsprintf) calls to either mysnprintf or
FStrings, depending on the situation.
- Changed the strings in the wbstartstruct to be FStrings.
- Changed myvsnprintf() to output nothing if count is greater than INT_MAX.
This is so that I can use a series of mysnprintf() calls and advance the
pointer for each one. Once the pointer goes beyond the end of the buffer,
the count will go negative, but since it's an unsigned type it will be
seen as excessively huge instead. This should not be a problem, as there's
no reason for ZDoom to be using text buffers larger than 2 GB anywhere.
- Ripped out the disabled bit from FGameConfigFile::MigrateOldConfig().
- Changed CalcMapName() to return an FString instead of a pointer to a static
buffer.
- Changed startmap in d_main.cpp into an FString.
- Changed CheckWarpTransMap() to take an FString& as the first argument.
- Changed d_mapname in g_level.cpp into an FString.
- Changed DoSubstitution() in ct_chat.cpp to place the substitutions in an
FString.
- Fixed: The MAPINFO parser wrote into the string buffer to construct a map
name when given a Hexen map number. This was fine with the old scanner
code, but only a happy coincidence prevents it from crashing with the new
code
- Added the 'B' conversion specifier to StringFormat::VWorker() for printing
binary numbers.
- Added CMake support for building with MinGW, MSYS, and NMake. Linux support
is probably broken until I get around to booting into Linux again. Niceties
provided over the existing Makefiles they're replacing:
* All command-line builds can use the same build system, rather than having
a separate one for MinGW and another for Linux.
* Microsoft's NMake tool is supported as a target.
* Progress meters.
* Parallel makes work from a fresh checkout without needing to be primed
first with a single-threaded make.
* Porting to other architectures should be simplified, whenever that day
comes.
- Replaced the makewad tool with zipdir. This handles the dependency tracking
itself instead of generating an external makefile to do it, since I couldn't
figure out how to generate a makefile with an external tool and include it
with a CMake-generated makefile. Where makewad used a master list of files
to generate the package file, zipdir just zips the entire contents of one or
more directories.
- Added the gdtoa package from netlib's fp library so that ZDoom's printf-style
formatting can be entirely independant of the CRT.
SVN r1082 (trunk)
2008-07-23 04:57:26 +00:00
|
|
|
fillptr += mysnprintf (fillptr, countof(flagsblah) - (fillptr - flagsblah), " ");
|
2006-02-24 04:48:15 +00:00
|
|
|
}
|
|
|
|
printed = true;
|
About a week's worth of changes here. As a heads-up, I wouldn't be
surprised if this doesn't build in Linux right now. The CMakeLists.txt
were checked with MinGW and NMake, but how they fair under Linux is an
unknown to me at this time.
- Converted most sprintf (and all wsprintf) calls to either mysnprintf or
FStrings, depending on the situation.
- Changed the strings in the wbstartstruct to be FStrings.
- Changed myvsnprintf() to output nothing if count is greater than INT_MAX.
This is so that I can use a series of mysnprintf() calls and advance the
pointer for each one. Once the pointer goes beyond the end of the buffer,
the count will go negative, but since it's an unsigned type it will be
seen as excessively huge instead. This should not be a problem, as there's
no reason for ZDoom to be using text buffers larger than 2 GB anywhere.
- Ripped out the disabled bit from FGameConfigFile::MigrateOldConfig().
- Changed CalcMapName() to return an FString instead of a pointer to a static
buffer.
- Changed startmap in d_main.cpp into an FString.
- Changed CheckWarpTransMap() to take an FString& as the first argument.
- Changed d_mapname in g_level.cpp into an FString.
- Changed DoSubstitution() in ct_chat.cpp to place the substitutions in an
FString.
- Fixed: The MAPINFO parser wrote into the string buffer to construct a map
name when given a Hexen map number. This was fine with the old scanner
code, but only a happy coincidence prevents it from crashing with the new
code
- Added the 'B' conversion specifier to StringFormat::VWorker() for printing
binary numbers.
- Added CMake support for building with MinGW, MSYS, and NMake. Linux support
is probably broken until I get around to booting into Linux again. Niceties
provided over the existing Makefiles they're replacing:
* All command-line builds can use the same build system, rather than having
a separate one for MinGW and another for Linux.
* Microsoft's NMake tool is supported as a target.
* Progress meters.
* Parallel makes work from a fresh checkout without needing to be primed
first with a single-threaded make.
* Porting to other architectures should be simplified, whenever that day
comes.
- Replaced the makewad tool with zipdir. This handles the dependency tracking
itself instead of generating an external makefile to do it, since I couldn't
figure out how to generate a makefile with an external tool and include it
with a CMake-generated makefile. Where makewad used a master list of files
to generate the package file, zipdir just zips the entire contents of one or
more directories.
- Added the gdtoa package from netlib's fp library so that ZDoom's printf-style
formatting can be entirely independant of the CRT.
SVN r1082 (trunk)
2008-07-23 04:57:26 +00:00
|
|
|
fillptr += mysnprintf (fillptr, countof(flagsblah) - (fillptr - flagsblah), "%s = %d", vars[i]->GetName (), **vars[i]);
|
2006-02-24 04:48:15 +00:00
|
|
|
}
|
|
|
|
}
|
2008-11-27 17:43:36 +00:00
|
|
|
screen->DrawText (SmallFont, ValueColor,
|
2009-12-25 05:55:51 +00:00
|
|
|
(screen->GetWidth() - SmallFont->StringWidth (flagsblah) * CleanXfac_1) / 2, 0, flagsblah,
|
|
|
|
DTA_CleanNoMove_1, true, TAG_DONE);
|
2006-02-24 04:48:15 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2009-07-26 03:25:18 +00:00
|
|
|
void M_OptResponder(event_t *ev)
|
2006-02-24 04:48:15 +00:00
|
|
|
{
|
2009-07-26 03:25:18 +00:00
|
|
|
menuitem_t *item = CurrentMenu->items + CurrentItem;
|
2006-02-24 04:48:15 +00:00
|
|
|
|
|
|
|
if (menuactive == MENU_WaitKey && ev->type == EV_KeyDown)
|
|
|
|
{
|
|
|
|
if (ev->data1 != KEY_ESCAPE)
|
|
|
|
{
|
2009-07-26 03:25:18 +00:00
|
|
|
C_ChangeBinding(item->e.command, ev->data1);
|
|
|
|
M_BuildKeyList(CurrentMenu->items, CurrentMenu->numitems);
|
2006-02-24 04:48:15 +00:00
|
|
|
}
|
|
|
|
menuactive = MENU_On;
|
|
|
|
CurrentMenu->items[0].label = OldMessage;
|
|
|
|
CurrentMenu->items[0].type = OldType;
|
|
|
|
}
|
2009-07-26 03:25:18 +00:00
|
|
|
else if (ev->type == EV_GUI_Event && ev->subtype == EV_GUI_KeyDown && tolower(ev->data1) == 't')
|
2006-02-24 04:48:15 +00:00
|
|
|
{
|
2009-07-26 03:25:18 +00:00
|
|
|
// Test selected resolution
|
|
|
|
if (CurrentMenu == &ModesMenu)
|
2006-02-24 04:48:15 +00:00
|
|
|
{
|
2009-07-26 03:25:18 +00:00
|
|
|
if (!(item->type == screenres &&
|
|
|
|
GetSelectedSize (CurrentItem, &NewWidth, &NewHeight)))
|
|
|
|
{
|
|
|
|
NewWidth = SCREENWIDTH;
|
|
|
|
NewHeight = SCREENHEIGHT;
|
|
|
|
}
|
|
|
|
OldWidth = SCREENWIDTH;
|
|
|
|
OldHeight = SCREENHEIGHT;
|
|
|
|
OldBits = DisplayBits;
|
|
|
|
NewBits = BitTranslate[DummyDepthCvar];
|
|
|
|
setmodeneeded = true;
|
|
|
|
testingmode = I_GetTime(false) + 5 * TICRATE;
|
|
|
|
S_Sound (CHAN_VOICE | CHAN_UI, "menu/choose", 1, ATTN_NONE);
|
|
|
|
SetModesMenu (NewWidth, NewHeight, NewBits);
|
2006-02-24 04:48:15 +00:00
|
|
|
}
|
|
|
|
}
|
2009-07-26 03:25:18 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
void M_OptButtonHandler(EMenuKey key, bool repeat)
|
|
|
|
{
|
|
|
|
menuitem_t *item;
|
|
|
|
UCVarValue value;
|
|
|
|
|
|
|
|
item = CurrentMenu->items + CurrentItem;
|
|
|
|
|
2006-02-24 04:48:15 +00:00
|
|
|
if (item->type == bitflag &&
|
2009-07-26 03:25:18 +00:00
|
|
|
(key == MKEY_Left || key == MKEY_Right || key == MKEY_Enter)
|
2006-02-24 04:48:15 +00:00
|
|
|
&& !demoplayback)
|
|
|
|
{
|
|
|
|
*(item->a.intcvar) = (*(item->a.intcvar)) ^ item->e.flagmask;
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
2009-07-26 03:25:18 +00:00
|
|
|
// The controls that manipulate joystick interfaces can only be changed from the
|
|
|
|
// keyboard, because I can't think of a good way to avoid problems otherwise.
|
|
|
|
if (item->type == discrete && item->c.discretecenter == 2 && (key == MKEY_Left || key == MKEY_Right))
|
2006-02-24 04:48:15 +00:00
|
|
|
{
|
2009-07-26 03:25:18 +00:00
|
|
|
if (repeat)
|
|
|
|
{
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
for (int i = 0; i < FButtonStatus::MAX_KEYS; ++i)
|
|
|
|
{
|
|
|
|
if (MenuButtons[key].Keys[i] >= KEY_FIRSTJOYBUTTON)
|
|
|
|
{
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
switch (key)
|
|
|
|
{
|
2009-08-02 03:38:57 +00:00
|
|
|
default:
|
|
|
|
break; // Keep GCC quiet
|
|
|
|
|
2009-07-26 03:25:18 +00:00
|
|
|
case MKEY_Down:
|
2006-02-24 04:48:15 +00:00
|
|
|
if (CurrentMenu->numitems > 1)
|
|
|
|
{
|
|
|
|
int modecol;
|
|
|
|
|
|
|
|
if (item->type == screenres)
|
|
|
|
{
|
|
|
|
modecol = item->a.selmode;
|
|
|
|
item->a.selmode = -1;
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
modecol = 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
do
|
|
|
|
{
|
|
|
|
CurrentItem++;
|
|
|
|
if (CanScrollDown && CurrentItem == VisBottom)
|
|
|
|
{
|
|
|
|
CurrentMenu->scrollpos++;
|
|
|
|
VisBottom++;
|
|
|
|
}
|
|
|
|
if (CurrentItem == CurrentMenu->numitems)
|
|
|
|
{
|
|
|
|
CurrentMenu->scrollpos = 0;
|
|
|
|
CurrentItem = 0;
|
|
|
|
}
|
|
|
|
} while (CurrentMenu->items[CurrentItem].type == redtext ||
|
|
|
|
CurrentMenu->items[CurrentItem].type == whitetext ||
|
|
|
|
(CurrentMenu->items[CurrentItem].type == screenres &&
|
|
|
|
!CurrentMenu->items[CurrentItem].b.res1) ||
|
|
|
|
(CurrentMenu->items[CurrentItem].type == numberedmore &&
|
|
|
|
!CurrentMenu->items[CurrentItem].b.position));
|
|
|
|
|
|
|
|
if (CurrentMenu->items[CurrentItem].type == screenres)
|
|
|
|
{
|
|
|
|
item = &CurrentMenu->items[CurrentItem];
|
|
|
|
while ((modecol == 2 && !item->d.res3) || (modecol == 1 && !item->c.res2))
|
|
|
|
{
|
|
|
|
modecol--;
|
|
|
|
}
|
|
|
|
CurrentMenu->items[CurrentItem].a.selmode = modecol;
|
|
|
|
}
|
|
|
|
|
2008-07-05 03:32:44 +00:00
|
|
|
S_Sound (CHAN_VOICE | CHAN_UI, "menu/cursor", 1, ATTN_NONE);
|
2006-02-24 04:48:15 +00:00
|
|
|
}
|
|
|
|
break;
|
|
|
|
|
2009-07-26 03:25:18 +00:00
|
|
|
case MKEY_Up:
|
2006-02-24 04:48:15 +00:00
|
|
|
if (CurrentMenu->numitems > 1)
|
|
|
|
{
|
|
|
|
int modecol;
|
|
|
|
|
|
|
|
if (item->type == screenres)
|
|
|
|
{
|
|
|
|
modecol = item->a.selmode;
|
|
|
|
item->a.selmode = -1;
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
modecol = 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
do
|
|
|
|
{
|
|
|
|
CurrentItem--;
|
|
|
|
if (CurrentMenu->scrollpos > 0 &&
|
|
|
|
CurrentItem == CurrentMenu->scrolltop + CurrentMenu->scrollpos)
|
|
|
|
{
|
|
|
|
CurrentMenu->scrollpos--;
|
|
|
|
}
|
|
|
|
if (CurrentItem < 0)
|
|
|
|
{
|
2009-12-25 05:55:51 +00:00
|
|
|
int ytop, maxitems, rowheight;
|
2006-02-24 04:48:15 +00:00
|
|
|
|
|
|
|
// Figure out how many lines of text fit on the menu
|
2009-07-15 05:53:06 +00:00
|
|
|
if (CurrentMenu->y != 0)
|
|
|
|
{
|
2009-12-25 05:55:51 +00:00
|
|
|
ytop = CurrentMenu->y;
|
2009-07-15 05:53:06 +00:00
|
|
|
}
|
|
|
|
else if (BigFont && CurrentMenu->texttitle)
|
2006-02-24 04:48:15 +00:00
|
|
|
{
|
2009-12-25 05:55:51 +00:00
|
|
|
ytop = 15 + BigFont->GetHeight ();
|
2006-02-24 04:48:15 +00:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2009-12-25 05:55:51 +00:00
|
|
|
ytop = 15;
|
2006-02-24 04:48:15 +00:00
|
|
|
}
|
2008-08-30 19:44:19 +00:00
|
|
|
if (!(gameinfo.gametype & GAME_DoomChex))
|
2006-02-24 04:48:15 +00:00
|
|
|
{
|
2009-12-25 05:55:51 +00:00
|
|
|
ytop -= 2;
|
2006-02-24 04:48:15 +00:00
|
|
|
rowheight = 9;
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
rowheight = 8;
|
|
|
|
}
|
2009-12-25 05:55:51 +00:00
|
|
|
ytop *= CleanYfac_1;
|
|
|
|
rowheight *= CleanYfac_1;
|
|
|
|
maxitems = (screen->GetHeight() - SmallFont->GetHeight() - ytop) / rowheight + 1;
|
2006-02-24 04:48:15 +00:00
|
|
|
|
|
|
|
CurrentMenu->scrollpos = MAX (0,CurrentMenu->numitems - maxitems + CurrentMenu->scrolltop);
|
|
|
|
CurrentItem = CurrentMenu->numitems - 1;
|
|
|
|
}
|
|
|
|
} while (CurrentMenu->items[CurrentItem].type == redtext ||
|
|
|
|
CurrentMenu->items[CurrentItem].type == whitetext ||
|
|
|
|
(CurrentMenu->items[CurrentItem].type == screenres &&
|
|
|
|
!CurrentMenu->items[CurrentItem].b.res1) ||
|
|
|
|
(CurrentMenu->items[CurrentItem].type == numberedmore &&
|
|
|
|
!CurrentMenu->items[CurrentItem].b.position));
|
|
|
|
|
|
|
|
if (CurrentMenu->items[CurrentItem].type == screenres)
|
|
|
|
CurrentMenu->items[CurrentItem].a.selmode = modecol;
|
|
|
|
|
2008-07-05 03:32:44 +00:00
|
|
|
S_Sound (CHAN_VOICE | CHAN_UI, "menu/cursor", 1, ATTN_NONE);
|
2006-02-24 04:48:15 +00:00
|
|
|
}
|
|
|
|
break;
|
|
|
|
|
2009-07-26 03:25:18 +00:00
|
|
|
case MKEY_PageUp:
|
2006-02-24 04:48:15 +00:00
|
|
|
if (CurrentMenu->scrollpos > 0)
|
|
|
|
{
|
|
|
|
CurrentMenu->scrollpos -= VisBottom - CurrentMenu->scrollpos - CurrentMenu->scrolltop;
|
|
|
|
if (CurrentMenu->scrollpos < 0)
|
|
|
|
{
|
|
|
|
CurrentMenu->scrollpos = 0;
|
|
|
|
}
|
|
|
|
CurrentItem = CurrentMenu->scrolltop + CurrentMenu->scrollpos + 1;
|
|
|
|
while (CurrentMenu->items[CurrentItem].type == redtext ||
|
|
|
|
CurrentMenu->items[CurrentItem].type == whitetext ||
|
|
|
|
(CurrentMenu->items[CurrentItem].type == screenres &&
|
|
|
|
!CurrentMenu->items[CurrentItem].b.res1) ||
|
|
|
|
(CurrentMenu->items[CurrentItem].type == numberedmore &&
|
|
|
|
!CurrentMenu->items[CurrentItem].b.position))
|
|
|
|
{
|
|
|
|
++CurrentItem;
|
|
|
|
}
|
2008-07-05 03:32:44 +00:00
|
|
|
S_Sound (CHAN_VOICE | CHAN_UI, "menu/cursor", 1, ATTN_NONE);
|
2006-02-24 04:48:15 +00:00
|
|
|
}
|
|
|
|
break;
|
|
|
|
|
2009-07-26 03:25:18 +00:00
|
|
|
case MKEY_PageDown:
|
2006-02-24 04:48:15 +00:00
|
|
|
if (CanScrollDown)
|
|
|
|
{
|
|
|
|
int pagesize = VisBottom - CurrentMenu->scrollpos - CurrentMenu->scrolltop;
|
|
|
|
CurrentMenu->scrollpos += pagesize;
|
|
|
|
if (CurrentMenu->scrollpos + CurrentMenu->scrolltop + pagesize > CurrentMenu->numitems)
|
|
|
|
{
|
|
|
|
CurrentMenu->scrollpos = CurrentMenu->numitems - CurrentMenu->scrolltop - pagesize;
|
|
|
|
}
|
|
|
|
CurrentItem = CurrentMenu->scrolltop + CurrentMenu->scrollpos + 1;
|
|
|
|
while (CurrentMenu->items[CurrentItem].type == redtext ||
|
|
|
|
CurrentMenu->items[CurrentItem].type == whitetext ||
|
|
|
|
(CurrentMenu->items[CurrentItem].type == screenres &&
|
|
|
|
!CurrentMenu->items[CurrentItem].b.res1) ||
|
|
|
|
(CurrentMenu->items[CurrentItem].type == numberedmore &&
|
|
|
|
!CurrentMenu->items[CurrentItem].b.position))
|
|
|
|
{
|
|
|
|
++CurrentItem;
|
|
|
|
}
|
2008-07-05 03:32:44 +00:00
|
|
|
S_Sound (CHAN_VOICE | CHAN_UI, "menu/cursor", 1, ATTN_NONE);
|
2006-02-24 04:48:15 +00:00
|
|
|
}
|
|
|
|
break;
|
|
|
|
|
2009-07-26 03:25:18 +00:00
|
|
|
case MKEY_Left:
|
2006-02-24 04:48:15 +00:00
|
|
|
switch (item->type)
|
|
|
|
{
|
|
|
|
case slider:
|
|
|
|
case absslider:
|
|
|
|
case intslider:
|
|
|
|
{
|
|
|
|
UCVarValue newval;
|
|
|
|
bool reversed;
|
|
|
|
|
|
|
|
if (item->type == intslider)
|
|
|
|
value.Float = item->a.fval;
|
|
|
|
else
|
|
|
|
value = item->a.cvar->GetGenericRep (CVAR_Float);
|
|
|
|
reversed = item->type == absslider && value.Float < 0.f;
|
|
|
|
newval.Float = (reversed ? -value.Float : value.Float) - item->d.step;
|
|
|
|
|
|
|
|
if (newval.Float < item->b.min)
|
|
|
|
newval.Float = item->b.min;
|
|
|
|
else if (newval.Float > item->c.max)
|
|
|
|
newval.Float = item->c.max;
|
|
|
|
|
|
|
|
if (reversed)
|
|
|
|
{
|
|
|
|
newval.Float = -newval.Float;
|
|
|
|
}
|
|
|
|
|
|
|
|
if (item->type == intslider)
|
|
|
|
item->a.fval = newval.Float;
|
|
|
|
else if (item->e.cfunc)
|
|
|
|
item->e.cfunc (item->a.cvar, newval.Float);
|
|
|
|
else
|
|
|
|
item->a.cvar->SetGenericRep (newval, CVAR_Float);
|
|
|
|
}
|
2008-07-05 03:32:44 +00:00
|
|
|
S_Sound (CHAN_VOICE | CHAN_UI, "menu/change", 1, ATTN_NONE);
|
2006-02-24 04:48:15 +00:00
|
|
|
break;
|
|
|
|
|
2009-06-26 02:45:05 +00:00
|
|
|
case joy_sens:
|
|
|
|
value.Float = SELECTED_JOYSTICK->GetSensitivity() - item->d.step;
|
|
|
|
if (value.Float < item->b.min)
|
|
|
|
value.Float = item->b.min;
|
|
|
|
SELECTED_JOYSTICK->SetSensitivity(value.Float);
|
|
|
|
S_Sound (CHAN_VOICE | CHAN_UI, "menu/change", 1, ATTN_NONE);
|
|
|
|
break;
|
|
|
|
|
|
|
|
case joy_slider:
|
|
|
|
if (item->e.joyslidernum == 0)
|
|
|
|
{
|
|
|
|
value.Float = SELECTED_JOYSTICK->GetAxisScale(item->a.joyselection);
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
assert(item->e.joyslidernum == 1);
|
|
|
|
value.Float = SELECTED_JOYSTICK->GetAxisDeadZone(item->a.joyselection);
|
|
|
|
}
|
|
|
|
if (value.Float >= 0)
|
|
|
|
{
|
|
|
|
value.Float -= item->d.step;
|
|
|
|
if (value.Float < item->b.min)
|
|
|
|
value.Float = item->b.min;
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
value.Float += item->d.step;
|
|
|
|
if (value.Float < -item->c.max)
|
|
|
|
value.Float = -item->c.max;
|
|
|
|
}
|
|
|
|
if (item->e.joyslidernum == 0)
|
|
|
|
{
|
|
|
|
SELECTED_JOYSTICK->SetAxisScale(item->a.joyselection, value.Float);
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
SELECTED_JOYSTICK->SetAxisDeadZone(item->a.joyselection, value.Float);
|
|
|
|
}
|
|
|
|
S_Sound (CHAN_VOICE | CHAN_UI, "menu/change", 1, ATTN_NONE);
|
|
|
|
break;
|
|
|
|
|
2006-02-24 04:48:15 +00:00
|
|
|
case palettegrid:
|
|
|
|
SelColorIndex = (SelColorIndex - 1) & 15;
|
2008-07-05 03:32:44 +00:00
|
|
|
S_Sound (CHAN_VOICE | CHAN_UI, "menu/cursor", 1, ATTN_NONE);
|
2006-02-24 04:48:15 +00:00
|
|
|
break;
|
|
|
|
|
2008-01-08 04:00:43 +00:00
|
|
|
case discretes:
|
2006-02-24 04:48:15 +00:00
|
|
|
case discrete:
|
|
|
|
case cdiscrete:
|
2009-06-26 02:45:05 +00:00
|
|
|
case joy_map:
|
2006-02-24 04:48:15 +00:00
|
|
|
{
|
|
|
|
int cur;
|
|
|
|
int numvals;
|
|
|
|
|
|
|
|
numvals = (int)item->b.min;
|
2009-06-26 02:45:05 +00:00
|
|
|
if (item->type == joy_map)
|
|
|
|
{
|
|
|
|
value.Float = (float)SELECTED_JOYSTICK->GetAxisMap(item->a.joyselection);
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
value = item->a.cvar->GetGenericRep (CVAR_Float);
|
|
|
|
}
|
2008-01-08 04:00:43 +00:00
|
|
|
if (item->type != discretes)
|
|
|
|
{
|
|
|
|
cur = M_FindCurVal (value.Float, item->e.values, numvals);
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
cur = M_FindCurVal (value.Float, item->e.valuestrings, numvals);
|
|
|
|
}
|
2006-02-24 04:48:15 +00:00
|
|
|
if (--cur < 0)
|
|
|
|
cur = numvals - 1;
|
|
|
|
|
2008-01-08 04:00:43 +00:00
|
|
|
value.Float = item->type != discretes ? item->e.values[cur].value : item->e.valuestrings[cur].value;
|
2009-06-26 02:45:05 +00:00
|
|
|
if (item->type == joy_map)
|
|
|
|
{
|
|
|
|
SELECTED_JOYSTICK->SetAxisMap(item->a.joyselection, (EJoyAxis)(int)value.Float);
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
item->a.cvar->SetGenericRep (value, CVAR_Float);
|
|
|
|
}
|
2006-02-24 04:48:15 +00:00
|
|
|
|
|
|
|
// Hack hack. Rebuild list of resolutions
|
|
|
|
if (item->e.values == Depths)
|
|
|
|
BuildModesList (SCREENWIDTH, SCREENHEIGHT, DisplayBits);
|
|
|
|
}
|
2008-07-05 03:32:44 +00:00
|
|
|
S_Sound (CHAN_VOICE | CHAN_UI, "menu/change", 1, ATTN_NONE);
|
2006-02-24 04:48:15 +00:00
|
|
|
break;
|
|
|
|
|
- The garbage collector is now run one last time just before exiting the game.
- Removed movie volume from the sound menu and renamed some of the other
options to give the MIDI device name more room to display itself.
- Moved the midi device selection into the main sound menu.
- Added FMOD as MIDI device -1, to replace the MIDI mapper. This is still the
default device. By default, it uses exactly the same DLS instruments as the
Microsoft GS Wavetable Synth. If you have another set DLS level 1 patch set
you want to use, set the snd_midipatchfile cvar to specify where it should
load the instruments from.
- Changed the ProduceMIDI function to store its output into a TArray<BYTE>.
An overloaded version wraps around it to continue to supply file-writing
support for external Timidity++ usage.
- Added an FMOD credits banner to comply with their non-commercial license.
- Reimplemented the snd_buffersize cvar for the FMOD Ex sound system. Rather
than a time in ms, this is now the length in samples of the DSP buffer.
Also added the snd_buffercount cvar to offer complete control over the
call to FMOD::System::setDSPBufferSize(). Note that with any snd_samplerate
below about 44kHz, you will need to set snd_buffersize to avoid long
latencies.
- Reimplemented the snd_output cvar for the FMOD Ex sound system.
- Changed snd_samplerate default to 0. This now means to use the default
sample rate.
- Made snd_output, snd_output_format, snd_speakermode, snd_resampler, and
snd_hrtf available through the menu.
- Split the HRTF effect selection into its own cvar: snd_hrtf.
- Removed 96000 Hz option from the menu. It's still available through the
cvar, if desired.
- Fixed: If Windows sound init failed, retry with DirectSound. (Apparently,
WASAPI doesn't work with more than two speakers and PCM-Float output at the
same time.)
- Fixed: Area sounds only played from the front speakers once you got within
the 2D panning area.
SVN r854 (trunk)
2008-03-26 04:27:07 +00:00
|
|
|
case ediscrete:
|
|
|
|
value = item->a.cvar->GetGenericRep(CVAR_String);
|
|
|
|
value.String = const_cast<char *>(M_FindPrevVal(value.String, item->e.enumvalues, (int)item->b.numvalues));
|
|
|
|
item->a.cvar->SetGenericRep(value, CVAR_String);
|
2008-07-05 03:32:44 +00:00
|
|
|
S_Sound (CHAN_VOICE | CHAN_UI, "menu/change", 1, ATTN_NONE);
|
- The garbage collector is now run one last time just before exiting the game.
- Removed movie volume from the sound menu and renamed some of the other
options to give the MIDI device name more room to display itself.
- Moved the midi device selection into the main sound menu.
- Added FMOD as MIDI device -1, to replace the MIDI mapper. This is still the
default device. By default, it uses exactly the same DLS instruments as the
Microsoft GS Wavetable Synth. If you have another set DLS level 1 patch set
you want to use, set the snd_midipatchfile cvar to specify where it should
load the instruments from.
- Changed the ProduceMIDI function to store its output into a TArray<BYTE>.
An overloaded version wraps around it to continue to supply file-writing
support for external Timidity++ usage.
- Added an FMOD credits banner to comply with their non-commercial license.
- Reimplemented the snd_buffersize cvar for the FMOD Ex sound system. Rather
than a time in ms, this is now the length in samples of the DSP buffer.
Also added the snd_buffercount cvar to offer complete control over the
call to FMOD::System::setDSPBufferSize(). Note that with any snd_samplerate
below about 44kHz, you will need to set snd_buffersize to avoid long
latencies.
- Reimplemented the snd_output cvar for the FMOD Ex sound system.
- Changed snd_samplerate default to 0. This now means to use the default
sample rate.
- Made snd_output, snd_output_format, snd_speakermode, snd_resampler, and
snd_hrtf available through the menu.
- Split the HRTF effect selection into its own cvar: snd_hrtf.
- Removed 96000 Hz option from the menu. It's still available through the
cvar, if desired.
- Fixed: If Windows sound init failed, retry with DirectSound. (Apparently,
WASAPI doesn't work with more than two speakers and PCM-Float output at the
same time.)
- Fixed: Area sounds only played from the front speakers once you got within
the 2D panning area.
SVN r854 (trunk)
2008-03-26 04:27:07 +00:00
|
|
|
break;
|
|
|
|
|
2006-12-16 11:49:48 +00:00
|
|
|
case bitmask:
|
|
|
|
{
|
|
|
|
int cur;
|
|
|
|
int numvals;
|
|
|
|
int bmask = int(item->c.max);
|
|
|
|
|
|
|
|
numvals = (int)item->b.min;
|
|
|
|
value = item->a.cvar->GetGenericRep (CVAR_Int);
|
|
|
|
|
2009-05-15 10:39:40 +00:00
|
|
|
cur = M_FindCurVal (float(value.Int & bmask), item->e.values, numvals);
|
2006-12-16 11:49:48 +00:00
|
|
|
if (--cur < 0)
|
|
|
|
cur = numvals - 1;
|
|
|
|
|
|
|
|
value.Int = (value.Int & ~bmask) | int(item->e.values[cur].value);
|
|
|
|
item->a.cvar->SetGenericRep (value, CVAR_Int);
|
|
|
|
}
|
2008-07-05 03:32:44 +00:00
|
|
|
S_Sound (CHAN_VOICE | CHAN_UI, "menu/change", 1, ATTN_NONE);
|
2006-12-16 11:49:48 +00:00
|
|
|
break;
|
|
|
|
|
2006-02-24 04:48:15 +00:00
|
|
|
case inverter:
|
|
|
|
value = item->a.cvar->GetGenericRep (CVAR_Float);
|
|
|
|
value.Float = -value.Float;
|
|
|
|
item->a.cvar->SetGenericRep (value, CVAR_Float);
|
2008-07-05 03:32:44 +00:00
|
|
|
S_Sound (CHAN_VOICE | CHAN_UI, "menu/change", 1, ATTN_NONE);
|
2006-02-24 04:48:15 +00:00
|
|
|
break;
|
|
|
|
|
2009-06-26 02:45:05 +00:00
|
|
|
case joy_inverter:
|
|
|
|
assert(item->e.joyslidernum == 0);
|
|
|
|
value.Float = SELECTED_JOYSTICK->GetAxisScale(item->a.joyselection);
|
|
|
|
SELECTED_JOYSTICK->SetAxisScale(item->a.joyselection, -value.Float);
|
|
|
|
S_Sound (CHAN_VOICE | CHAN_UI, "menu/change", 1, ATTN_NONE);
|
|
|
|
break;
|
|
|
|
|
2006-02-24 04:48:15 +00:00
|
|
|
case screenres:
|
|
|
|
{
|
|
|
|
int col;
|
|
|
|
|
|
|
|
col = item->a.selmode - 1;
|
|
|
|
if (col < 0)
|
|
|
|
{
|
|
|
|
if (CurrentItem > 0)
|
|
|
|
{
|
|
|
|
if (CurrentMenu->items[CurrentItem - 1].type == screenres)
|
|
|
|
{
|
|
|
|
item->a.selmode = -1;
|
|
|
|
CurrentMenu->items[--CurrentItem].a.selmode = 2;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
item->a.selmode = col;
|
|
|
|
}
|
|
|
|
}
|
2008-07-05 03:32:44 +00:00
|
|
|
S_Sound (CHAN_VOICE | CHAN_UI, "menu/cursor", 1, ATTN_NONE);
|
2006-02-24 04:48:15 +00:00
|
|
|
break;
|
|
|
|
|
|
|
|
default:
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
|
2009-07-26 03:25:18 +00:00
|
|
|
case MKEY_Right:
|
2006-02-24 04:48:15 +00:00
|
|
|
switch (item->type)
|
|
|
|
{
|
|
|
|
case slider:
|
|
|
|
case absslider:
|
|
|
|
case intslider:
|
|
|
|
{
|
|
|
|
UCVarValue newval;
|
|
|
|
bool reversed;
|
|
|
|
|
|
|
|
if (item->type == intslider)
|
|
|
|
value.Float = item->a.fval;
|
|
|
|
else
|
|
|
|
value = item->a.cvar->GetGenericRep (CVAR_Float);
|
|
|
|
reversed = item->type == absslider && value.Float < 0.f;
|
|
|
|
newval.Float = (reversed ? -value.Float : value.Float) + item->d.step;
|
|
|
|
|
|
|
|
if (newval.Float > item->c.max)
|
|
|
|
newval.Float = item->c.max;
|
|
|
|
else if (newval.Float < item->b.min)
|
|
|
|
newval.Float = item->b.min;
|
|
|
|
|
|
|
|
if (reversed)
|
|
|
|
{
|
|
|
|
newval.Float = -newval.Float;
|
|
|
|
}
|
|
|
|
|
|
|
|
if (item->type == intslider)
|
|
|
|
item->a.fval = newval.Float;
|
|
|
|
else if (item->e.cfunc)
|
|
|
|
item->e.cfunc (item->a.cvar, newval.Float);
|
|
|
|
else
|
|
|
|
item->a.cvar->SetGenericRep (newval, CVAR_Float);
|
|
|
|
}
|
2008-07-05 03:32:44 +00:00
|
|
|
S_Sound (CHAN_VOICE | CHAN_UI, "menu/change", 1, ATTN_NONE);
|
2006-02-24 04:48:15 +00:00
|
|
|
break;
|
|
|
|
|
2009-06-26 02:45:05 +00:00
|
|
|
case joy_sens:
|
|
|
|
value.Float = SELECTED_JOYSTICK->GetSensitivity() + item->d.step;
|
|
|
|
if (value.Float > item->c.max)
|
|
|
|
value.Float = item->c.max;
|
|
|
|
SELECTED_JOYSTICK->SetSensitivity(value.Float);
|
|
|
|
S_Sound (CHAN_VOICE | CHAN_UI, "menu/change", 1, ATTN_NONE);
|
|
|
|
break;
|
|
|
|
|
|
|
|
case joy_slider:
|
|
|
|
if (item->e.joyslidernum == 0)
|
|
|
|
{
|
|
|
|
value.Float = SELECTED_JOYSTICK->GetAxisScale(item->a.joyselection);
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
assert(item->e.joyslidernum == 1);
|
|
|
|
value.Float = SELECTED_JOYSTICK->GetAxisDeadZone(item->a.joyselection);
|
|
|
|
}
|
|
|
|
if (value.Float >= 0)
|
|
|
|
{
|
|
|
|
value.Float += item->d.step;
|
|
|
|
if (value.Float > item->c.max)
|
|
|
|
value.Float = item->c.max;
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
value.Float -= item->d.step;
|
|
|
|
if (value.Float > item->b.min)
|
|
|
|
value.Float = -item->b.min;
|
|
|
|
}
|
|
|
|
if (item->e.joyslidernum == 0)
|
|
|
|
{
|
|
|
|
SELECTED_JOYSTICK->SetAxisScale(item->a.joyselection, value.Float);
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
SELECTED_JOYSTICK->SetAxisDeadZone(item->a.joyselection, value.Float);
|
|
|
|
}
|
|
|
|
S_Sound (CHAN_VOICE | CHAN_UI, "menu/change", 1, ATTN_NONE);
|
|
|
|
break;
|
|
|
|
|
2006-02-24 04:48:15 +00:00
|
|
|
case palettegrid:
|
|
|
|
SelColorIndex = (SelColorIndex + 1) & 15;
|
2008-07-05 03:32:44 +00:00
|
|
|
S_Sound (CHAN_VOICE | CHAN_UI, "menu/cursor", 1, ATTN_NONE);
|
2006-02-24 04:48:15 +00:00
|
|
|
break;
|
|
|
|
|
2008-01-08 04:00:43 +00:00
|
|
|
case discretes:
|
2006-02-24 04:48:15 +00:00
|
|
|
case discrete:
|
|
|
|
case cdiscrete:
|
2009-06-26 02:45:05 +00:00
|
|
|
case joy_map:
|
2006-02-24 04:48:15 +00:00
|
|
|
{
|
|
|
|
int cur;
|
|
|
|
int numvals;
|
|
|
|
|
|
|
|
numvals = (int)item->b.min;
|
2009-06-26 02:45:05 +00:00
|
|
|
if (item->type == joy_map)
|
|
|
|
{
|
|
|
|
value.Float = (float)SELECTED_JOYSTICK->GetAxisMap(item->a.joyselection);
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
value = item->a.cvar->GetGenericRep (CVAR_Float);
|
|
|
|
}
|
2008-01-08 04:00:43 +00:00
|
|
|
if (item->type != discretes)
|
|
|
|
{
|
|
|
|
cur = M_FindCurVal (value.Float, item->e.values, numvals);
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
cur = M_FindCurVal (value.Float, item->e.valuestrings, numvals);
|
|
|
|
}
|
2006-02-24 04:48:15 +00:00
|
|
|
if (++cur >= numvals)
|
|
|
|
cur = 0;
|
|
|
|
|
2008-01-08 04:00:43 +00:00
|
|
|
value.Float = item->type != discretes ? item->e.values[cur].value : item->e.valuestrings[cur].value;
|
2009-06-26 02:45:05 +00:00
|
|
|
if (item->type == joy_map)
|
|
|
|
{
|
|
|
|
SELECTED_JOYSTICK->SetAxisMap(item->a.joyselection, (EJoyAxis)(int)value.Float);
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
item->a.cvar->SetGenericRep (value, CVAR_Float);
|
|
|
|
}
|
2006-02-24 04:48:15 +00:00
|
|
|
|
|
|
|
// Hack hack. Rebuild list of resolutions
|
|
|
|
if (item->e.values == Depths)
|
|
|
|
BuildModesList (SCREENWIDTH, SCREENHEIGHT, DisplayBits);
|
|
|
|
}
|
2008-07-05 03:32:44 +00:00
|
|
|
S_Sound (CHAN_VOICE | CHAN_UI, "menu/change", 1, ATTN_NONE);
|
2006-02-24 04:48:15 +00:00
|
|
|
break;
|
|
|
|
|
- The garbage collector is now run one last time just before exiting the game.
- Removed movie volume from the sound menu and renamed some of the other
options to give the MIDI device name more room to display itself.
- Moved the midi device selection into the main sound menu.
- Added FMOD as MIDI device -1, to replace the MIDI mapper. This is still the
default device. By default, it uses exactly the same DLS instruments as the
Microsoft GS Wavetable Synth. If you have another set DLS level 1 patch set
you want to use, set the snd_midipatchfile cvar to specify where it should
load the instruments from.
- Changed the ProduceMIDI function to store its output into a TArray<BYTE>.
An overloaded version wraps around it to continue to supply file-writing
support for external Timidity++ usage.
- Added an FMOD credits banner to comply with their non-commercial license.
- Reimplemented the snd_buffersize cvar for the FMOD Ex sound system. Rather
than a time in ms, this is now the length in samples of the DSP buffer.
Also added the snd_buffercount cvar to offer complete control over the
call to FMOD::System::setDSPBufferSize(). Note that with any snd_samplerate
below about 44kHz, you will need to set snd_buffersize to avoid long
latencies.
- Reimplemented the snd_output cvar for the FMOD Ex sound system.
- Changed snd_samplerate default to 0. This now means to use the default
sample rate.
- Made snd_output, snd_output_format, snd_speakermode, snd_resampler, and
snd_hrtf available through the menu.
- Split the HRTF effect selection into its own cvar: snd_hrtf.
- Removed 96000 Hz option from the menu. It's still available through the
cvar, if desired.
- Fixed: If Windows sound init failed, retry with DirectSound. (Apparently,
WASAPI doesn't work with more than two speakers and PCM-Float output at the
same time.)
- Fixed: Area sounds only played from the front speakers once you got within
the 2D panning area.
SVN r854 (trunk)
2008-03-26 04:27:07 +00:00
|
|
|
case ediscrete:
|
|
|
|
value = item->a.cvar->GetGenericRep(CVAR_String);
|
|
|
|
value.String = const_cast<char *>(M_FindNextVal(value.String, item->e.enumvalues, (int)item->b.numvalues));
|
|
|
|
item->a.cvar->SetGenericRep(value, CVAR_String);
|
2008-07-05 03:32:44 +00:00
|
|
|
S_Sound (CHAN_VOICE | CHAN_UI, "menu/change", 1, ATTN_NONE);
|
- The garbage collector is now run one last time just before exiting the game.
- Removed movie volume from the sound menu and renamed some of the other
options to give the MIDI device name more room to display itself.
- Moved the midi device selection into the main sound menu.
- Added FMOD as MIDI device -1, to replace the MIDI mapper. This is still the
default device. By default, it uses exactly the same DLS instruments as the
Microsoft GS Wavetable Synth. If you have another set DLS level 1 patch set
you want to use, set the snd_midipatchfile cvar to specify where it should
load the instruments from.
- Changed the ProduceMIDI function to store its output into a TArray<BYTE>.
An overloaded version wraps around it to continue to supply file-writing
support for external Timidity++ usage.
- Added an FMOD credits banner to comply with their non-commercial license.
- Reimplemented the snd_buffersize cvar for the FMOD Ex sound system. Rather
than a time in ms, this is now the length in samples of the DSP buffer.
Also added the snd_buffercount cvar to offer complete control over the
call to FMOD::System::setDSPBufferSize(). Note that with any snd_samplerate
below about 44kHz, you will need to set snd_buffersize to avoid long
latencies.
- Reimplemented the snd_output cvar for the FMOD Ex sound system.
- Changed snd_samplerate default to 0. This now means to use the default
sample rate.
- Made snd_output, snd_output_format, snd_speakermode, snd_resampler, and
snd_hrtf available through the menu.
- Split the HRTF effect selection into its own cvar: snd_hrtf.
- Removed 96000 Hz option from the menu. It's still available through the
cvar, if desired.
- Fixed: If Windows sound init failed, retry with DirectSound. (Apparently,
WASAPI doesn't work with more than two speakers and PCM-Float output at the
same time.)
- Fixed: Area sounds only played from the front speakers once you got within
the 2D panning area.
SVN r854 (trunk)
2008-03-26 04:27:07 +00:00
|
|
|
break;
|
|
|
|
|
2006-12-16 11:49:48 +00:00
|
|
|
case bitmask:
|
|
|
|
{
|
|
|
|
int cur;
|
|
|
|
int numvals;
|
|
|
|
int bmask = int(item->c.max);
|
|
|
|
|
|
|
|
numvals = (int)item->b.min;
|
|
|
|
value = item->a.cvar->GetGenericRep (CVAR_Int);
|
|
|
|
|
2009-05-15 10:39:40 +00:00
|
|
|
cur = M_FindCurVal (float(value.Int & bmask), item->e.values, numvals);
|
2006-12-16 11:49:48 +00:00
|
|
|
if (++cur >= numvals)
|
|
|
|
cur = 0;
|
|
|
|
|
|
|
|
value.Int = (value.Int & ~bmask) | int(item->e.values[cur].value);
|
|
|
|
item->a.cvar->SetGenericRep (value, CVAR_Int);
|
|
|
|
}
|
2008-07-05 03:32:44 +00:00
|
|
|
S_Sound (CHAN_VOICE | CHAN_UI, "menu/change", 1, ATTN_NONE);
|
2006-12-16 11:49:48 +00:00
|
|
|
break;
|
|
|
|
|
2006-02-24 04:48:15 +00:00
|
|
|
case inverter:
|
|
|
|
value = item->a.cvar->GetGenericRep (CVAR_Float);
|
|
|
|
value.Float = -value.Float;
|
|
|
|
item->a.cvar->SetGenericRep (value, CVAR_Float);
|
2008-07-05 03:32:44 +00:00
|
|
|
S_Sound (CHAN_VOICE | CHAN_UI, "menu/change", 1, ATTN_NONE);
|
2006-02-24 04:48:15 +00:00
|
|
|
break;
|
|
|
|
|
2009-06-26 02:45:05 +00:00
|
|
|
case joy_inverter:
|
|
|
|
assert(item->e.joyslidernum == 0);
|
|
|
|
value.Float = SELECTED_JOYSTICK->GetAxisScale(item->a.joyselection);
|
|
|
|
SELECTED_JOYSTICK->SetAxisScale(item->a.joyselection, -value.Float);
|
|
|
|
S_Sound (CHAN_VOICE | CHAN_UI, "menu/change", 1, ATTN_NONE);
|
|
|
|
break;
|
|
|
|
|
2006-02-24 04:48:15 +00:00
|
|
|
case screenres:
|
|
|
|
{
|
|
|
|
int col;
|
|
|
|
|
|
|
|
col = item->a.selmode + 1;
|
|
|
|
if ((col > 2) || (col == 2 && !item->d.res3) || (col == 1 && !item->c.res2))
|
|
|
|
{
|
|
|
|
if (CurrentMenu->numitems - 1 > CurrentItem)
|
|
|
|
{
|
|
|
|
if (CurrentMenu->items[CurrentItem + 1].type == screenres)
|
|
|
|
{
|
|
|
|
if (CurrentMenu->items[CurrentItem + 1].b.res1)
|
|
|
|
{
|
|
|
|
item->a.selmode = -1;
|
|
|
|
CurrentMenu->items[++CurrentItem].a.selmode = 0;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
item->a.selmode = col;
|
|
|
|
}
|
|
|
|
}
|
2008-07-05 03:32:44 +00:00
|
|
|
S_Sound (CHAN_VOICE | CHAN_UI, "menu/cursor", 1, ATTN_NONE);
|
2006-02-24 04:48:15 +00:00
|
|
|
break;
|
|
|
|
|
|
|
|
default:
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
|
2009-07-26 03:25:18 +00:00
|
|
|
case MKEY_Clear:
|
2006-02-24 04:48:15 +00:00
|
|
|
if (item->type == control)
|
|
|
|
{
|
|
|
|
C_UnbindACommand (item->e.command);
|
|
|
|
item->b.key1 = item->c.key2 = 0;
|
|
|
|
}
|
|
|
|
break;
|
2009-07-26 03:25:18 +00:00
|
|
|
/*
|
2006-02-24 04:48:15 +00:00
|
|
|
case '0':
|
|
|
|
case '1':
|
|
|
|
case '2':
|
|
|
|
case '3':
|
|
|
|
case '4':
|
|
|
|
case '5':
|
|
|
|
case '6':
|
|
|
|
case '7':
|
|
|
|
case '8':
|
|
|
|
case '9':
|
|
|
|
{
|
|
|
|
int lookfor = ch == '0' ? 10 : ch - '0', i;
|
|
|
|
for (i = 0; i < CurrentMenu->numitems; ++i)
|
|
|
|
{
|
|
|
|
if (CurrentMenu->items[i].b.position == lookfor)
|
|
|
|
{
|
|
|
|
CurrentItem = i;
|
|
|
|
item = &CurrentMenu->items[i];
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if (i == CurrentMenu->numitems)
|
|
|
|
{
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
// Otherwise, fall through to '\r' below
|
|
|
|
}
|
2009-07-26 03:25:18 +00:00
|
|
|
*/
|
|
|
|
case MKEY_Enter:
|
2007-12-18 03:53:02 +00:00
|
|
|
if (CurrentMenu == &ModesMenu && item->type == screenres)
|
2006-02-24 04:48:15 +00:00
|
|
|
{
|
2007-12-18 03:53:02 +00:00
|
|
|
if (!GetSelectedSize (CurrentItem, &NewWidth, &NewHeight))
|
2006-02-24 04:48:15 +00:00
|
|
|
{
|
|
|
|
NewWidth = SCREENWIDTH;
|
|
|
|
NewHeight = SCREENHEIGHT;
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
testingmode = 1;
|
|
|
|
setmodeneeded = true;
|
|
|
|
NewBits = BitTranslate[DummyDepthCvar];
|
|
|
|
}
|
2008-07-05 03:32:44 +00:00
|
|
|
S_Sound (CHAN_VOICE | CHAN_UI, "menu/choose", 1, ATTN_NONE);
|
2006-02-24 04:48:15 +00:00
|
|
|
SetModesMenu (NewWidth, NewHeight, NewBits);
|
|
|
|
}
|
|
|
|
else if ((item->type == more ||
|
|
|
|
item->type == numberedmore ||
|
|
|
|
item->type == rightmore ||
|
|
|
|
item->type == rsafemore ||
|
2009-07-15 05:53:06 +00:00
|
|
|
item->type == joymore ||
|
2006-02-24 04:48:15 +00:00
|
|
|
item->type == safemore)
|
|
|
|
&& item->e.mfunc)
|
|
|
|
{
|
|
|
|
CurrentMenu->lastOn = CurrentItem;
|
2008-07-05 03:32:44 +00:00
|
|
|
S_Sound (CHAN_VOICE | CHAN_UI, "menu/choose", 1, ATTN_NONE);
|
2006-02-24 04:48:15 +00:00
|
|
|
if (item->type == safemore || item->type == rsafemore)
|
|
|
|
{
|
|
|
|
ActivateConfirm (item->label, item->e.mfunc);
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
item->e.mfunc();
|
|
|
|
}
|
|
|
|
}
|
2008-01-08 04:00:43 +00:00
|
|
|
else if (item->type == discrete || item->type == cdiscrete || item->type == discretes)
|
2006-02-24 04:48:15 +00:00
|
|
|
{
|
|
|
|
int cur;
|
|
|
|
int numvals;
|
|
|
|
|
|
|
|
numvals = (int)item->b.min;
|
|
|
|
value = item->a.cvar->GetGenericRep (CVAR_Float);
|
2008-01-08 04:00:43 +00:00
|
|
|
if (item->type != discretes)
|
|
|
|
{
|
|
|
|
cur = M_FindCurVal (value.Float, item->e.values, numvals);
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
cur = M_FindCurVal (value.Float, item->e.valuestrings, numvals);
|
|
|
|
}
|
2006-02-24 04:48:15 +00:00
|
|
|
if (++cur >= numvals)
|
|
|
|
cur = 0;
|
|
|
|
|
2008-01-08 04:00:43 +00:00
|
|
|
value.Float = item->type != discretes ? item->e.values[cur].value : item->e.valuestrings[cur].value;
|
2006-02-24 04:48:15 +00:00
|
|
|
item->a.cvar->SetGenericRep (value, CVAR_Float);
|
|
|
|
|
|
|
|
// Hack hack. Rebuild list of resolutions
|
|
|
|
if (item->e.values == Depths)
|
|
|
|
BuildModesList (SCREENWIDTH, SCREENHEIGHT, DisplayBits);
|
|
|
|
|
2008-07-05 03:32:44 +00:00
|
|
|
S_Sound (CHAN_VOICE | CHAN_UI, "menu/change", 1, ATTN_NONE);
|
2006-02-24 04:48:15 +00:00
|
|
|
}
|
|
|
|
else if (item->type == control)
|
|
|
|
{
|
|
|
|
menuactive = MENU_WaitKey;
|
|
|
|
OldMessage = CurrentMenu->items[0].label;
|
|
|
|
OldType = CurrentMenu->items[0].type;
|
|
|
|
CurrentMenu->items[0].label = "Press new key for control, ESC to cancel";
|
|
|
|
CurrentMenu->items[0].type = redtext;
|
|
|
|
}
|
|
|
|
else if (item->type == listelement)
|
|
|
|
{
|
|
|
|
CurrentMenu->lastOn = CurrentItem;
|
2008-07-05 03:32:44 +00:00
|
|
|
S_Sound (CHAN_VOICE | CHAN_UI, "menu/choose", 1, ATTN_NONE);
|
2006-02-24 04:48:15 +00:00
|
|
|
item->e.lfunc (CurrentItem);
|
|
|
|
}
|
|
|
|
else if (item->type == inverter)
|
|
|
|
{
|
|
|
|
value = item->a.cvar->GetGenericRep (CVAR_Float);
|
|
|
|
value.Float = -value.Float;
|
|
|
|
item->a.cvar->SetGenericRep (value, CVAR_Float);
|
2008-07-05 03:32:44 +00:00
|
|
|
S_Sound (CHAN_VOICE | CHAN_UI, "menu/change", 1, ATTN_NONE);
|
2006-02-24 04:48:15 +00:00
|
|
|
}
|
2009-06-26 02:45:05 +00:00
|
|
|
else if (item->type == joy_inverter)
|
|
|
|
{
|
|
|
|
assert(item->e.joyslidernum == 0);
|
|
|
|
value.Float = SELECTED_JOYSTICK->GetAxisScale(item->a.joyselection);
|
|
|
|
SELECTED_JOYSTICK->SetAxisScale(item->a.joyselection, -value.Float);
|
|
|
|
S_Sound (CHAN_VOICE | CHAN_UI, "menu/change", 1, ATTN_NONE);
|
|
|
|
}
|
2006-02-24 04:48:15 +00:00
|
|
|
else if (item->type == screenres)
|
|
|
|
{
|
|
|
|
}
|
|
|
|
else if (item->type == colorpicker)
|
|
|
|
{
|
|
|
|
CurrentMenu->lastOn = CurrentItem;
|
2008-07-05 03:32:44 +00:00
|
|
|
S_Sound (CHAN_VOICE | CHAN_UI, "menu/choose", 1, ATTN_NONE);
|
2006-02-24 04:48:15 +00:00
|
|
|
StartColorPickerMenu (item->label, item->a.colorcvar);
|
|
|
|
}
|
|
|
|
else if (item->type == palettegrid)
|
|
|
|
{
|
|
|
|
UpdateSelColor (SelColorIndex + int(item->b.min * 16));
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
|
2009-07-26 03:25:18 +00:00
|
|
|
case MKEY_Back:
|
2006-02-24 04:48:15 +00:00
|
|
|
CurrentMenu->lastOn = CurrentItem;
|
|
|
|
if (CurrentMenu->EscapeHandler != NULL)
|
|
|
|
{
|
|
|
|
CurrentMenu->EscapeHandler ();
|
|
|
|
}
|
|
|
|
M_PopMenuStack ();
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
static void GoToConsole (void)
|
|
|
|
{
|
|
|
|
M_ClearMenus ();
|
|
|
|
C_ToggleConsole ();
|
|
|
|
}
|
|
|
|
|
|
|
|
static void UpdateStuff (void)
|
|
|
|
{
|
|
|
|
M_SizeDisplay (0);
|
|
|
|
}
|
|
|
|
|
|
|
|
void Reset2Defaults (void)
|
|
|
|
{
|
|
|
|
C_SetDefaultBindings ();
|
|
|
|
C_SetCVarsToDefaults ();
|
|
|
|
UpdateStuff();
|
|
|
|
}
|
|
|
|
|
|
|
|
void Reset2Saved (void)
|
|
|
|
{
|
|
|
|
GameConfig->DoGlobalSetup ();
|
|
|
|
GameConfig->DoGameSetup (GameNames[gameinfo.gametype]);
|
|
|
|
UpdateStuff();
|
|
|
|
}
|
|
|
|
|
|
|
|
static void StartMessagesMenu (void)
|
|
|
|
{
|
|
|
|
M_SwitchMenu (&MessagesMenu);
|
|
|
|
}
|
|
|
|
|
|
|
|
static void StartAutomapMenu (void)
|
|
|
|
{
|
|
|
|
M_SwitchMenu (&AutomapMenu);
|
|
|
|
}
|
|
|
|
|
2007-12-06 14:33:28 +00:00
|
|
|
static void StartScoreboardMenu (void)
|
|
|
|
{
|
|
|
|
M_SwitchMenu (&ScoreboardMenu);
|
|
|
|
}
|
|
|
|
|
2008-01-09 09:01:30 +00:00
|
|
|
CCMD (menu_messages)
|
|
|
|
{
|
|
|
|
M_StartControlPanel (true);
|
|
|
|
OptionsActive = true;
|
|
|
|
StartMessagesMenu ();
|
|
|
|
}
|
|
|
|
|
2006-02-24 04:48:15 +00:00
|
|
|
CCMD (menu_automap)
|
|
|
|
{
|
|
|
|
M_StartControlPanel (true);
|
|
|
|
OptionsActive = true;
|
|
|
|
StartAutomapMenu ();
|
|
|
|
}
|
|
|
|
|
2008-01-09 09:01:30 +00:00
|
|
|
CCMD (menu_scoreboard)
|
|
|
|
{
|
|
|
|
M_StartControlPanel (true);
|
|
|
|
OptionsActive = true;
|
|
|
|
StartScoreboardMenu ();
|
|
|
|
}
|
|
|
|
|
2006-02-24 04:48:15 +00:00
|
|
|
static void StartMapColorsMenu (void)
|
|
|
|
{
|
|
|
|
M_SwitchMenu (&MapColorsMenu);
|
|
|
|
}
|
|
|
|
|
|
|
|
CCMD (menu_mapcolors)
|
|
|
|
{
|
|
|
|
M_StartControlPanel (true);
|
|
|
|
OptionsActive = true;
|
|
|
|
StartMapColorsMenu ();
|
|
|
|
}
|
|
|
|
|
|
|
|
static void DefaultCustomColors ()
|
|
|
|
{
|
|
|
|
// Find the color cvars by scanning the MapColors menu.
|
|
|
|
for (int i = 0; i < MapColorsMenu.numitems; ++i)
|
|
|
|
{
|
|
|
|
if (MapColorsItems[i].type == colorpicker)
|
|
|
|
{
|
|
|
|
MapColorsItems[i].a.colorcvar->ResetToDefault ();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2010-01-03 10:04:56 +00:00
|
|
|
static bool ColorPickerDrawer ()
|
2006-02-24 04:48:15 +00:00
|
|
|
{
|
2007-12-22 04:52:51 +00:00
|
|
|
DWORD newColor = MAKEARGB(255,
|
2006-02-24 04:48:15 +00:00
|
|
|
int(ColorPickerItems[2].a.fval),
|
|
|
|
int(ColorPickerItems[3].a.fval),
|
|
|
|
int(ColorPickerItems[4].a.fval));
|
2007-12-22 04:52:51 +00:00
|
|
|
DWORD oldColor = DWORD(*ColorPickerItems[0].a.colorcvar) | 0xFF000000;
|
2006-02-24 04:48:15 +00:00
|
|
|
|
|
|
|
int x = screen->GetWidth()*2/3;
|
2009-12-25 05:55:51 +00:00
|
|
|
int y = (15 + BigFont->GetHeight() + SmallFont->GetHeight()*5 - 10) * CleanYfac_1;
|
2006-02-24 04:48:15 +00:00
|
|
|
|
2009-12-25 05:55:51 +00:00
|
|
|
screen->Clear (x, y, x + 48*CleanXfac_1, y + 48*CleanYfac_1, -1, oldColor);
|
|
|
|
screen->Clear (x + 48*CleanXfac_1, y, x + 48*2*CleanXfac_1, y + 48*CleanYfac_1, -1, newColor);
|
2006-02-24 04:48:15 +00:00
|
|
|
|
2009-12-25 05:55:51 +00:00
|
|
|
y += 49*CleanYfac_1;
|
|
|
|
screen->DrawText (SmallFont, CR_GRAY, x+(24-SmallFont->StringWidth("Old")/2)*CleanXfac_1, y,
|
|
|
|
"Old", DTA_CleanNoMove_1, true, TAG_DONE);
|
|
|
|
screen->DrawText (SmallFont, CR_WHITE, x+(48+24-SmallFont->StringWidth("New")/2)*CleanXfac_1, y,
|
|
|
|
"New", DTA_CleanNoMove_1, true, TAG_DONE);
|
2010-01-03 10:04:56 +00:00
|
|
|
return false;
|
2006-02-24 04:48:15 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
static void SetColorPickerSliders ()
|
|
|
|
{
|
|
|
|
FColorCVar *cvar = ColorPickerItems[0].a.colorcvar;
|
2009-05-15 10:39:40 +00:00
|
|
|
ColorPickerItems[2].a.fval = float(RPART(DWORD(*cvar)));
|
|
|
|
ColorPickerItems[3].a.fval = float(GPART(DWORD(*cvar)));
|
|
|
|
ColorPickerItems[4].a.fval = float(BPART(DWORD(*cvar)));
|
2006-02-24 04:48:15 +00:00
|
|
|
CurrColorIndex = cvar->GetIndex();
|
|
|
|
}
|
|
|
|
|
|
|
|
static void UpdateSelColor (int index)
|
|
|
|
{
|
|
|
|
ColorPickerItems[2].a.fval = GPalette.BaseColors[index].r;
|
|
|
|
ColorPickerItems[3].a.fval = GPalette.BaseColors[index].g;
|
|
|
|
ColorPickerItems[4].a.fval = GPalette.BaseColors[index].b;
|
|
|
|
}
|
|
|
|
|
|
|
|
static void ColorPickerReset ()
|
|
|
|
{
|
|
|
|
SetColorPickerSliders ();
|
|
|
|
}
|
|
|
|
|
|
|
|
static void ActivateColorChoice ()
|
|
|
|
{
|
|
|
|
UCVarValue val;
|
|
|
|
val.Int = MAKERGB
|
|
|
|
(int(ColorPickerItems[2].a.fval),
|
|
|
|
int(ColorPickerItems[3].a.fval),
|
|
|
|
int(ColorPickerItems[4].a.fval));
|
|
|
|
ColorPickerItems[0].a.colorcvar->SetGenericRep (val, CVAR_Int);
|
|
|
|
}
|
|
|
|
|
2006-12-29 03:38:37 +00:00
|
|
|
static void StartColorPickerMenu (const char *colorname, FColorCVar *cvar)
|
2006-02-24 04:48:15 +00:00
|
|
|
{
|
|
|
|
ColorPickerMenu.PreDraw = ColorPickerDrawer;
|
|
|
|
ColorPickerMenu.EscapeHandler = ActivateColorChoice;
|
|
|
|
ColorPickerItems[0].label = colorname;
|
|
|
|
ColorPickerItems[0].a.colorcvar = cvar;
|
|
|
|
SetColorPickerSliders ();
|
|
|
|
M_SwitchMenu (&ColorPickerMenu);
|
|
|
|
}
|
|
|
|
|
|
|
|
static void CustomizeControls (void)
|
|
|
|
{
|
|
|
|
M_BuildKeyList (ControlsMenu.items, ControlsMenu.numitems);
|
|
|
|
M_SwitchMenu (&ControlsMenu);
|
|
|
|
}
|
|
|
|
|
|
|
|
CCMD (menu_keys)
|
|
|
|
{
|
|
|
|
M_StartControlPanel (true);
|
|
|
|
OptionsActive = true;
|
|
|
|
CustomizeControls ();
|
|
|
|
}
|
|
|
|
|
|
|
|
EXTERN_CVAR (Int, dmflags)
|
|
|
|
|
|
|
|
static void GameplayOptions (void)
|
|
|
|
{
|
|
|
|
M_SwitchMenu (&DMFlagsMenu);
|
|
|
|
flagsvar = SHOW_DMFlags | SHOW_DMFlags2;
|
|
|
|
}
|
|
|
|
|
|
|
|
CCMD (menu_gameplay)
|
|
|
|
{
|
|
|
|
M_StartControlPanel (true);
|
|
|
|
OptionsActive = true;
|
|
|
|
GameplayOptions ();
|
|
|
|
}
|
|
|
|
|
|
|
|
static void CompatibilityOptions (void)
|
|
|
|
{
|
|
|
|
M_SwitchMenu (&CompatibilityMenu);
|
|
|
|
flagsvar = SHOW_CompatFlags;
|
|
|
|
}
|
|
|
|
|
|
|
|
CCMD (menu_compatibility)
|
|
|
|
{
|
|
|
|
M_StartControlPanel (true);
|
|
|
|
OptionsActive = true;
|
|
|
|
CompatibilityOptions ();
|
|
|
|
}
|
|
|
|
|
|
|
|
static void MouseOptions ()
|
|
|
|
{
|
|
|
|
M_SwitchMenu (&MouseMenu);
|
|
|
|
}
|
|
|
|
|
|
|
|
CCMD (menu_mouse)
|
|
|
|
{
|
|
|
|
M_StartControlPanel (true);
|
|
|
|
OptionsActive = true;
|
|
|
|
MouseOptions ();
|
|
|
|
}
|
|
|
|
|
2010-01-03 10:04:56 +00:00
|
|
|
static bool DrawJoystickConfigMenuHeader()
|
2009-07-15 05:53:06 +00:00
|
|
|
{
|
|
|
|
FString joyname = SELECTED_JOYSTICK->GetName();
|
|
|
|
screen->DrawText(BigFont, gameinfo.gametype & GAME_DoomChex ? CR_RED : CR_UNTRANSLATED,
|
2009-12-25 05:55:51 +00:00
|
|
|
(screen->GetWidth() - BigFont->StringWidth(CurrentMenu->texttitle) * CleanXfac_1) / 2,
|
|
|
|
5 * CleanYfac_1,
|
|
|
|
CurrentMenu->texttitle, DTA_CleanNoMove_1, true, TAG_DONE);
|
2009-07-15 05:53:06 +00:00
|
|
|
screen->DrawText(SmallFont, gameinfo.gametype & GAME_DoomChex ? CR_RED : CR_UNTRANSLATED,
|
2009-12-25 05:55:51 +00:00
|
|
|
(screen->GetWidth() - SmallFont->StringWidth(joyname) * CleanXfac_1) / 2, (8 + BigFont->GetHeight()) * CleanYfac_1,
|
|
|
|
joyname, DTA_CleanNoMove_1, true, TAG_DONE);
|
2010-01-03 10:04:56 +00:00
|
|
|
return false;
|
2009-07-15 05:53:06 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
static void UpdateJoystickConfigMenu(IJoystickConfig *joy)
|
2006-02-24 04:48:15 +00:00
|
|
|
{
|
2009-06-26 02:45:05 +00:00
|
|
|
int i;
|
|
|
|
menuitem_t item = { whitetext };
|
|
|
|
|
2009-07-15 05:53:06 +00:00
|
|
|
JoystickConfigItems.Clear();
|
|
|
|
if (joy == NULL)
|
2006-02-24 04:48:15 +00:00
|
|
|
{
|
2009-06-26 02:45:05 +00:00
|
|
|
item.type = redtext;
|
2009-07-15 05:53:06 +00:00
|
|
|
item.label = "Invalid controller specified for menu";
|
|
|
|
JoystickConfigItems.Push(item);
|
2006-02-24 04:48:15 +00:00
|
|
|
}
|
|
|
|
else
|
2009-06-26 02:45:05 +00:00
|
|
|
{
|
2009-07-15 05:53:06 +00:00
|
|
|
SELECTED_JOYSTICK = joy;
|
2009-06-26 02:45:05 +00:00
|
|
|
|
|
|
|
item.type = joy_sens;
|
|
|
|
item.label = "Overall sensitivity";
|
2009-07-23 03:03:15 +00:00
|
|
|
item.b.min = 0;
|
|
|
|
item.c.max = 2;
|
|
|
|
item.d.step = 0.1f;
|
2009-07-15 05:53:06 +00:00
|
|
|
JoystickConfigItems.Push(item);
|
2009-06-26 02:45:05 +00:00
|
|
|
|
|
|
|
item.type = redtext;
|
|
|
|
item.label = " ";
|
2009-07-15 05:53:06 +00:00
|
|
|
JoystickConfigItems.Push(item);
|
2009-06-26 02:45:05 +00:00
|
|
|
|
2009-07-15 05:53:06 +00:00
|
|
|
item.type = whitetext;
|
2009-06-26 02:45:05 +00:00
|
|
|
if (joy->GetNumAxes() > 0)
|
|
|
|
{
|
|
|
|
item.label = "Axis Configuration";
|
2009-07-15 05:53:06 +00:00
|
|
|
JoystickConfigItems.Push(item);
|
2009-06-26 02:45:05 +00:00
|
|
|
|
|
|
|
for (i = 0; i < joy->GetNumAxes(); ++i)
|
|
|
|
{
|
|
|
|
item.type = redtext;
|
|
|
|
item.label = " ";
|
2009-07-15 05:53:06 +00:00
|
|
|
JoystickConfigItems.Push(item);
|
2009-06-26 02:45:05 +00:00
|
|
|
|
|
|
|
item.type = joy_map;
|
|
|
|
item.label = joy->GetAxisName(i);
|
|
|
|
item.a.joyselection = i;
|
|
|
|
item.b.numvalues = countof(JoyAxisMapNames);
|
|
|
|
item.e.values = JoyAxisMapNames;
|
2009-07-15 05:53:06 +00:00
|
|
|
JoystickConfigItems.Push(item);
|
2009-06-26 02:45:05 +00:00
|
|
|
|
|
|
|
item.type = joy_slider;
|
|
|
|
item.label = "Sensitivity";
|
|
|
|
item.b.min = 0;
|
|
|
|
item.c.max = 4;
|
2009-07-23 03:03:15 +00:00
|
|
|
item.d.step = 0.1f;
|
2009-06-26 02:45:05 +00:00
|
|
|
item.e.joyslidernum = 0;
|
2009-07-15 05:53:06 +00:00
|
|
|
JoystickConfigItems.Push(item);
|
2009-06-26 02:45:05 +00:00
|
|
|
|
|
|
|
item.type = joy_inverter;
|
|
|
|
item.label = "Invert";
|
2009-07-15 05:53:06 +00:00
|
|
|
JoystickConfigItems.Push(item);
|
2009-06-26 02:45:05 +00:00
|
|
|
|
|
|
|
item.type = joy_slider;
|
|
|
|
item.label = "Dead Zone";
|
|
|
|
item.b.position = 1;
|
|
|
|
item.c.max = 0.9f;
|
|
|
|
item.d.step = 0.05f;
|
|
|
|
item.e.joyslidernum = 1;
|
2009-07-15 05:53:06 +00:00
|
|
|
JoystickConfigItems.Push(item);
|
2009-06-26 02:45:05 +00:00
|
|
|
}
|
|
|
|
}
|
2009-07-15 05:53:06 +00:00
|
|
|
else
|
|
|
|
{
|
|
|
|
item.label = "No configurable axes";
|
|
|
|
JoystickConfigItems.Push(item);
|
|
|
|
}
|
2009-06-26 02:45:05 +00:00
|
|
|
}
|
2009-07-15 05:53:06 +00:00
|
|
|
JoystickConfigMenu.items = &JoystickConfigItems[0];
|
|
|
|
JoystickConfigMenu.numitems = JoystickConfigItems.Size();
|
|
|
|
JoystickConfigMenu.lastOn = 0;
|
|
|
|
JoystickConfigMenu.scrollpos = 0;
|
|
|
|
JoystickConfigMenu.y = 25 + BigFont->GetHeight();
|
|
|
|
JoystickConfigMenu.PreDraw = DrawJoystickConfigMenuHeader;
|
|
|
|
if (screen != NULL)
|
2006-02-24 04:48:15 +00:00
|
|
|
{
|
2009-07-15 05:53:06 +00:00
|
|
|
CalcIndent(&JoystickConfigMenu);
|
|
|
|
}
|
|
|
|
}
|
2006-02-24 04:48:15 +00:00
|
|
|
|
2009-07-15 05:53:06 +00:00
|
|
|
static void StartJoystickConfigMenu()
|
|
|
|
{
|
|
|
|
UpdateJoystickConfigMenu(Joysticks[JoystickItems[JoystickMenu.lastOn].a.joyselection]);
|
|
|
|
M_SwitchMenu(&JoystickConfigMenu);
|
|
|
|
}
|
2006-02-24 04:48:15 +00:00
|
|
|
|
2009-07-15 05:53:06 +00:00
|
|
|
void UpdateJoystickMenu(IJoystickConfig *selected)
|
|
|
|
{
|
|
|
|
int i;
|
|
|
|
menuitem_t item = { whitetext };
|
|
|
|
int itemnum = -1;
|
2006-02-24 04:48:15 +00:00
|
|
|
|
2009-07-15 05:53:06 +00:00
|
|
|
JoystickItems.Clear();
|
|
|
|
I_GetJoysticks(Joysticks);
|
|
|
|
if ((unsigned)itemnum >= Joysticks.Size())
|
|
|
|
{
|
|
|
|
itemnum = Joysticks.Size() - 1;
|
|
|
|
}
|
|
|
|
if (selected != NULL)
|
|
|
|
{
|
|
|
|
for (i = 0; (unsigned)i < Joysticks.Size(); ++i)
|
2006-02-24 04:48:15 +00:00
|
|
|
{
|
2009-07-15 05:53:06 +00:00
|
|
|
if (Joysticks[i] == selected)
|
2006-02-24 04:48:15 +00:00
|
|
|
{
|
2009-07-15 05:53:06 +00:00
|
|
|
itemnum = i;
|
|
|
|
break;
|
2006-02-24 04:48:15 +00:00
|
|
|
}
|
|
|
|
}
|
2009-07-15 05:53:06 +00:00
|
|
|
}
|
|
|
|
item.type = discrete;
|
|
|
|
item.label = "Enable controller support";
|
|
|
|
item.a.cvar = &use_joystick;
|
|
|
|
item.b.numvalues = 2;
|
2009-07-26 03:25:18 +00:00
|
|
|
item.c.discretecenter = 2;
|
2009-07-15 05:53:06 +00:00
|
|
|
item.e.values = YesNo;
|
|
|
|
JoystickItems.Push(item);
|
2006-02-24 04:48:15 +00:00
|
|
|
|
2009-07-15 05:53:06 +00:00
|
|
|
#ifdef _WIN32
|
|
|
|
item.label = "Enable DirectInput controllers";
|
|
|
|
item.a.cvar = &joy_dinput;
|
|
|
|
JoystickItems.Push(item);
|
2006-02-24 04:48:15 +00:00
|
|
|
|
2009-07-15 05:53:06 +00:00
|
|
|
item.label = "Enable XInput controllers";
|
|
|
|
item.a.cvar = &joy_xinput;
|
|
|
|
JoystickItems.Push(item);
|
2006-02-24 04:48:15 +00:00
|
|
|
|
2009-07-15 05:53:06 +00:00
|
|
|
item.label = "Enable raw PlayStation 2 adapters";
|
|
|
|
item.a.cvar = &joy_ps2raw;
|
|
|
|
JoystickItems.Push(item);
|
|
|
|
#endif
|
2006-02-24 04:48:15 +00:00
|
|
|
|
2009-07-15 05:53:06 +00:00
|
|
|
item.type = redtext;
|
|
|
|
item.label = " ";
|
2009-07-26 03:25:18 +00:00
|
|
|
item.c.discretecenter = 0;
|
2009-07-15 05:53:06 +00:00
|
|
|
JoystickItems.Push(item);
|
|
|
|
|
|
|
|
if (Joysticks.Size() == 0)
|
|
|
|
{
|
|
|
|
item.type = redtext;
|
|
|
|
item.label = "No controllers detected";
|
|
|
|
JoystickItems.Push(item);
|
|
|
|
if (!use_joystick)
|
|
|
|
{
|
|
|
|
item.type = whitetext;
|
|
|
|
item.label = "Controller support must be";
|
|
|
|
JoystickItems.Push(item);
|
2006-02-24 04:48:15 +00:00
|
|
|
|
2009-07-15 05:53:06 +00:00
|
|
|
item.label = "enabled to detect any";
|
|
|
|
JoystickItems.Push(item);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
item.label = "Configure controllers:";
|
|
|
|
JoystickItems.Push(item);
|
2006-02-24 04:48:15 +00:00
|
|
|
|
2009-07-15 05:53:06 +00:00
|
|
|
item.type = joymore;
|
|
|
|
item.e.mfunc = StartJoystickConfigMenu;
|
|
|
|
for (int i = 0; i < (int)Joysticks.Size(); ++i)
|
2006-02-24 04:48:15 +00:00
|
|
|
{
|
2009-07-15 05:53:06 +00:00
|
|
|
item.a.joyselection = i;
|
|
|
|
if (i == itemnum)
|
2006-02-24 04:48:15 +00:00
|
|
|
{
|
2009-07-15 05:53:06 +00:00
|
|
|
JoystickMenu.lastOn = JoystickItems.Size();
|
2006-02-24 04:48:15 +00:00
|
|
|
}
|
2009-07-15 05:53:06 +00:00
|
|
|
JoystickItems.Push(item);
|
2006-02-24 04:48:15 +00:00
|
|
|
}
|
|
|
|
}
|
2009-06-26 02:45:05 +00:00
|
|
|
JoystickMenu.items = &JoystickItems[0];
|
|
|
|
JoystickMenu.numitems = JoystickItems.Size();
|
|
|
|
if (JoystickMenu.lastOn >= JoystickMenu.numitems)
|
2006-02-24 04:48:15 +00:00
|
|
|
{
|
2009-06-26 02:45:05 +00:00
|
|
|
JoystickMenu.lastOn = JoystickMenu.numitems - 1;
|
2006-02-24 04:48:15 +00:00
|
|
|
}
|
2009-07-15 05:53:06 +00:00
|
|
|
if (CurrentMenu == &JoystickMenu && CurrentItem >= JoystickMenu.numitems)
|
|
|
|
{
|
|
|
|
CurrentItem = JoystickMenu.lastOn;
|
|
|
|
}
|
2006-02-24 04:48:15 +00:00
|
|
|
if (screen != NULL)
|
|
|
|
{
|
2009-06-26 02:45:05 +00:00
|
|
|
CalcIndent(&JoystickMenu);
|
2006-02-24 04:48:15 +00:00
|
|
|
}
|
2009-07-15 05:53:06 +00:00
|
|
|
|
|
|
|
// If the joystick config menu is open, close it if the device it's
|
|
|
|
// open for is gone.
|
|
|
|
for (i = 0; (unsigned)i < Joysticks.Size(); ++i)
|
|
|
|
{
|
|
|
|
if (Joysticks[i] == SELECTED_JOYSTICK)
|
|
|
|
{
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
2009-08-02 03:38:57 +00:00
|
|
|
if (i == (int)Joysticks.Size())
|
2009-07-15 05:53:06 +00:00
|
|
|
{
|
|
|
|
SELECTED_JOYSTICK = NULL;
|
|
|
|
if (CurrentMenu == &JoystickConfigMenu)
|
|
|
|
{
|
|
|
|
M_PopMenuStack();
|
|
|
|
}
|
|
|
|
}
|
2006-02-24 04:48:15 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
static void JoystickOptions ()
|
|
|
|
{
|
2009-06-27 01:36:10 +00:00
|
|
|
UpdateJoystickMenu (NULL);
|
2006-02-24 04:48:15 +00:00
|
|
|
M_SwitchMenu (&JoystickMenu);
|
|
|
|
}
|
|
|
|
|
|
|
|
CCMD (menu_joystick)
|
|
|
|
{
|
|
|
|
M_StartControlPanel (true);
|
|
|
|
OptionsActive = true;
|
|
|
|
JoystickOptions ();
|
|
|
|
}
|
|
|
|
|
- The garbage collector is now run one last time just before exiting the game.
- Removed movie volume from the sound menu and renamed some of the other
options to give the MIDI device name more room to display itself.
- Moved the midi device selection into the main sound menu.
- Added FMOD as MIDI device -1, to replace the MIDI mapper. This is still the
default device. By default, it uses exactly the same DLS instruments as the
Microsoft GS Wavetable Synth. If you have another set DLS level 1 patch set
you want to use, set the snd_midipatchfile cvar to specify where it should
load the instruments from.
- Changed the ProduceMIDI function to store its output into a TArray<BYTE>.
An overloaded version wraps around it to continue to supply file-writing
support for external Timidity++ usage.
- Added an FMOD credits banner to comply with their non-commercial license.
- Reimplemented the snd_buffersize cvar for the FMOD Ex sound system. Rather
than a time in ms, this is now the length in samples of the DSP buffer.
Also added the snd_buffercount cvar to offer complete control over the
call to FMOD::System::setDSPBufferSize(). Note that with any snd_samplerate
below about 44kHz, you will need to set snd_buffersize to avoid long
latencies.
- Reimplemented the snd_output cvar for the FMOD Ex sound system.
- Changed snd_samplerate default to 0. This now means to use the default
sample rate.
- Made snd_output, snd_output_format, snd_speakermode, snd_resampler, and
snd_hrtf available through the menu.
- Split the HRTF effect selection into its own cvar: snd_hrtf.
- Removed 96000 Hz option from the menu. It's still available through the
cvar, if desired.
- Fixed: If Windows sound init failed, retry with DirectSound. (Apparently,
WASAPI doesn't work with more than two speakers and PCM-Float output at the
same time.)
- Fixed: Area sounds only played from the front speakers once you got within
the 2D panning area.
SVN r854 (trunk)
2008-03-26 04:27:07 +00:00
|
|
|
static void FreeMIDIMenuList()
|
|
|
|
{
|
|
|
|
if (SoundItems[MIDI_DEVICE_ITEM].e.values != NULL)
|
|
|
|
{
|
|
|
|
delete[] SoundItems[MIDI_DEVICE_ITEM].e.values;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2006-02-24 04:48:15 +00:00
|
|
|
static void SoundOptions ()
|
|
|
|
{
|
- The garbage collector is now run one last time just before exiting the game.
- Removed movie volume from the sound menu and renamed some of the other
options to give the MIDI device name more room to display itself.
- Moved the midi device selection into the main sound menu.
- Added FMOD as MIDI device -1, to replace the MIDI mapper. This is still the
default device. By default, it uses exactly the same DLS instruments as the
Microsoft GS Wavetable Synth. If you have another set DLS level 1 patch set
you want to use, set the snd_midipatchfile cvar to specify where it should
load the instruments from.
- Changed the ProduceMIDI function to store its output into a TArray<BYTE>.
An overloaded version wraps around it to continue to supply file-writing
support for external Timidity++ usage.
- Added an FMOD credits banner to comply with their non-commercial license.
- Reimplemented the snd_buffersize cvar for the FMOD Ex sound system. Rather
than a time in ms, this is now the length in samples of the DSP buffer.
Also added the snd_buffercount cvar to offer complete control over the
call to FMOD::System::setDSPBufferSize(). Note that with any snd_samplerate
below about 44kHz, you will need to set snd_buffersize to avoid long
latencies.
- Reimplemented the snd_output cvar for the FMOD Ex sound system.
- Changed snd_samplerate default to 0. This now means to use the default
sample rate.
- Made snd_output, snd_output_format, snd_speakermode, snd_resampler, and
snd_hrtf available through the menu.
- Split the HRTF effect selection into its own cvar: snd_hrtf.
- Removed 96000 Hz option from the menu. It's still available through the
cvar, if desired.
- Fixed: If Windows sound init failed, retry with DirectSound. (Apparently,
WASAPI doesn't work with more than two speakers and PCM-Float output at the
same time.)
- Fixed: Area sounds only played from the front speakers once you got within
the 2D panning area.
SVN r854 (trunk)
2008-03-26 04:27:07 +00:00
|
|
|
I_BuildMIDIMenuList(&SoundItems[MIDI_DEVICE_ITEM].e.values, &SoundItems[MIDI_DEVICE_ITEM].b.min);
|
|
|
|
atterm(FreeMIDIMenuList);
|
|
|
|
M_SwitchMenu(&SoundMenu);
|
2006-02-24 04:48:15 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
CCMD (menu_sound)
|
|
|
|
{
|
|
|
|
M_StartControlPanel (true);
|
|
|
|
OptionsActive = true;
|
|
|
|
SoundOptions ();
|
|
|
|
}
|
|
|
|
|
|
|
|
static void AdvSoundOptions ()
|
|
|
|
{
|
|
|
|
M_SwitchMenu (&AdvSoundMenu);
|
|
|
|
}
|
|
|
|
|
|
|
|
CCMD (menu_advsound)
|
|
|
|
{
|
|
|
|
M_StartControlPanel (true);
|
|
|
|
OptionsActive = true;
|
|
|
|
AdvSoundOptions ();
|
|
|
|
}
|
|
|
|
|
|
|
|
static void MakeSoundChanges (void)
|
2006-12-29 20:28:23 +00:00
|
|
|
{
|
2006-12-29 03:38:37 +00:00
|
|
|
static char snd_reset[] = "snd_reset";
|
|
|
|
AddCommandString (snd_reset);
|
2006-02-24 04:48:15 +00:00
|
|
|
}
|
|
|
|
|
2008-05-29 23:33:07 +00:00
|
|
|
static void ModReplayerOptions()
|
|
|
|
{
|
|
|
|
for (size_t i = 2; i < countof(ModReplayerItems); ++i)
|
|
|
|
{
|
|
|
|
if (ModReplayerItems[i].type == discrete)
|
|
|
|
{
|
|
|
|
ModReplayerItems[i].d.graycheck = &mod_dumb;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
M_SwitchMenu(&ModReplayerMenu);
|
|
|
|
}
|
|
|
|
|
|
|
|
CCMD (menu_modreplayer)
|
|
|
|
{
|
|
|
|
M_StartControlPanel(true);
|
|
|
|
OptionsActive = true;
|
|
|
|
ModReplayerOptions();
|
|
|
|
}
|
|
|
|
|
2006-02-24 04:48:15 +00:00
|
|
|
static void VideoOptions (void)
|
|
|
|
{
|
2008-01-08 04:00:43 +00:00
|
|
|
InitCrosshairsList();
|
2006-02-24 04:48:15 +00:00
|
|
|
M_SwitchMenu (&VideoMenu);
|
|
|
|
}
|
|
|
|
|
|
|
|
CCMD (menu_display)
|
|
|
|
{
|
|
|
|
M_StartControlPanel (true);
|
|
|
|
OptionsActive = true;
|
2008-01-08 04:00:43 +00:00
|
|
|
InitCrosshairsList();
|
2006-02-24 04:48:15 +00:00
|
|
|
M_SwitchMenu (&VideoMenu);
|
|
|
|
}
|
|
|
|
|
|
|
|
static void BuildModesList (int hiwidth, int hiheight, int hi_bits)
|
|
|
|
{
|
|
|
|
char strtemp[32], **str;
|
|
|
|
int i, c;
|
|
|
|
int width, height, showbits;
|
2006-05-04 12:40:39 +00:00
|
|
|
bool letterbox=false;
|
2006-02-24 04:48:15 +00:00
|
|
|
int ratiomatch;
|
|
|
|
|
|
|
|
if (menu_screenratios >= 0 && menu_screenratios <= 4 && menu_screenratios != 3)
|
|
|
|
{
|
|
|
|
ratiomatch = menu_screenratios;
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
ratiomatch = -1;
|
|
|
|
}
|
|
|
|
showbits = BitTranslate[DummyDepthCvar];
|
|
|
|
|
Note: I have not tried compiling these recent changes under Linux. I wouldn't
be surprised if it doesn't work.
- Reorganized the network startup loops so now they are event driven. There is
a single function that gets called to drive it, and it uses callbacks to
perform the different stages of the synchronization. This lets me have a nice,
responsive abort button instead of the previous unannounced hit-escape-to-
abort behavior, and I think the rearranged code is slightly easier to
understand too.
- Increased the number of bytes for version info during D_ArbitrateNetStart(),
in preparation for the day when NETGAMEVERSION requires more than one byte.
- I noticed an issue with Vista RC1 and the new fatal error setup. Even after
releasing a DirectDraw or Direct3D interface, the DWM can still use the
last image drawn using them when it composites the window. It doesn't always
do it but it does often enough that it is a real problem. At this point, I
don't know if it's a problem with the release version of Vista or not.
After messing around, I discovered the problem was caused by ~Win32Video()
hiding the window and then having it immediately shown soon after. The DWM
kept an image of the window to do the transition effect with, and then when
it didn't get a chance to do the transition, it didn't properly forget about
its saved image and kept plastering it on top of everything else
underneath.
- Added a network synchronization panel to the window during netgame startup.
- Fixed: PClass::CreateDerivedClass() must initialize StateList to NULL.
Otherwise, classic DECORATE definitions generate a big, fat crash.
- Resurrected the R_Init progress bar, now as a standard Windows control.
- Removed the sound failure dialog. The FMOD setup already defaulted to no
sound if initialization failed, so this only applies when snd_output is set
to "alternate" which now also falls back to no sound. In addition, it wasn't
working right, and I didn't feel like fixing it for the probably 0% of users
it affected.
- Fixed: The edit control used for logging output added text in reverse order
on Win9x.
- Went back to the roots and made graphics initialization one of the last
things to happen during setup. Now the startup text is visible again. More
importantly, the main window is no longer created invisible, which seems
to cause trouble with it not always appearing in the taskbar. The fatal
error dialog is now also embedded in the main window instead of being a
separate modal dialog, so you can play with the log window to see any
problems that might be reported there.
Rather than completely restoring the original startup order, I tried to
keep things as close to the way they were with early graphics startup. In
particular, V_Init() now creates a dummy screen so that things that need
screen dimensions can get them. It gets replaced by the real screen later
in I_InitGraphics(). Will need to check this under Linux to make sure it
didn't cause any problems there.
- Removed the following stubs that just called functions in Video:
- I_StartModeIterator()
- I_NextMode()
- I_DisplayType()
I_FullscreenChanged() was also removed, and a new fullscreen parameter
was added to IVideo::StartModeIterator(), since that's all it controlled.
- Renamed I_InitHardware() back to I_InitGraphics(), since that's all it's
initialized post-1.22.
SVN r416 (trunk)
2006-12-19 04:09:10 +00:00
|
|
|
if (Video != NULL)
|
|
|
|
{
|
|
|
|
Video->StartModeIterator (showbits, screen->IsFullscreen());
|
|
|
|
}
|
2006-02-24 04:48:15 +00:00
|
|
|
|
|
|
|
for (i = VM_RESSTART; ModesItems[i].type == screenres; i++)
|
|
|
|
{
|
|
|
|
ModesItems[i].e.highlight = -1;
|
|
|
|
for (c = 0; c < 3; c++)
|
|
|
|
{
|
Note: I have not tried compiling these recent changes under Linux. I wouldn't
be surprised if it doesn't work.
- Reorganized the network startup loops so now they are event driven. There is
a single function that gets called to drive it, and it uses callbacks to
perform the different stages of the synchronization. This lets me have a nice,
responsive abort button instead of the previous unannounced hit-escape-to-
abort behavior, and I think the rearranged code is slightly easier to
understand too.
- Increased the number of bytes for version info during D_ArbitrateNetStart(),
in preparation for the day when NETGAMEVERSION requires more than one byte.
- I noticed an issue with Vista RC1 and the new fatal error setup. Even after
releasing a DirectDraw or Direct3D interface, the DWM can still use the
last image drawn using them when it composites the window. It doesn't always
do it but it does often enough that it is a real problem. At this point, I
don't know if it's a problem with the release version of Vista or not.
After messing around, I discovered the problem was caused by ~Win32Video()
hiding the window and then having it immediately shown soon after. The DWM
kept an image of the window to do the transition effect with, and then when
it didn't get a chance to do the transition, it didn't properly forget about
its saved image and kept plastering it on top of everything else
underneath.
- Added a network synchronization panel to the window during netgame startup.
- Fixed: PClass::CreateDerivedClass() must initialize StateList to NULL.
Otherwise, classic DECORATE definitions generate a big, fat crash.
- Resurrected the R_Init progress bar, now as a standard Windows control.
- Removed the sound failure dialog. The FMOD setup already defaulted to no
sound if initialization failed, so this only applies when snd_output is set
to "alternate" which now also falls back to no sound. In addition, it wasn't
working right, and I didn't feel like fixing it for the probably 0% of users
it affected.
- Fixed: The edit control used for logging output added text in reverse order
on Win9x.
- Went back to the roots and made graphics initialization one of the last
things to happen during setup. Now the startup text is visible again. More
importantly, the main window is no longer created invisible, which seems
to cause trouble with it not always appearing in the taskbar. The fatal
error dialog is now also embedded in the main window instead of being a
separate modal dialog, so you can play with the log window to see any
problems that might be reported there.
Rather than completely restoring the original startup order, I tried to
keep things as close to the way they were with early graphics startup. In
particular, V_Init() now creates a dummy screen so that things that need
screen dimensions can get them. It gets replaced by the real screen later
in I_InitGraphics(). Will need to check this under Linux to make sure it
didn't cause any problems there.
- Removed the following stubs that just called functions in Video:
- I_StartModeIterator()
- I_NextMode()
- I_DisplayType()
I_FullscreenChanged() was also removed, and a new fullscreen parameter
was added to IVideo::StartModeIterator(), since that's all it controlled.
- Renamed I_InitHardware() back to I_InitGraphics(), since that's all it's
initialized post-1.22.
SVN r416 (trunk)
2006-12-19 04:09:10 +00:00
|
|
|
bool haveMode = false;
|
2006-02-24 04:48:15 +00:00
|
|
|
|
|
|
|
switch (c)
|
|
|
|
{
|
|
|
|
default: str = &ModesItems[i].b.res1; break;
|
|
|
|
case 1: str = &ModesItems[i].c.res2; break;
|
|
|
|
case 2: str = &ModesItems[i].d.res3; break;
|
|
|
|
}
|
Note: I have not tried compiling these recent changes under Linux. I wouldn't
be surprised if it doesn't work.
- Reorganized the network startup loops so now they are event driven. There is
a single function that gets called to drive it, and it uses callbacks to
perform the different stages of the synchronization. This lets me have a nice,
responsive abort button instead of the previous unannounced hit-escape-to-
abort behavior, and I think the rearranged code is slightly easier to
understand too.
- Increased the number of bytes for version info during D_ArbitrateNetStart(),
in preparation for the day when NETGAMEVERSION requires more than one byte.
- I noticed an issue with Vista RC1 and the new fatal error setup. Even after
releasing a DirectDraw or Direct3D interface, the DWM can still use the
last image drawn using them when it composites the window. It doesn't always
do it but it does often enough that it is a real problem. At this point, I
don't know if it's a problem with the release version of Vista or not.
After messing around, I discovered the problem was caused by ~Win32Video()
hiding the window and then having it immediately shown soon after. The DWM
kept an image of the window to do the transition effect with, and then when
it didn't get a chance to do the transition, it didn't properly forget about
its saved image and kept plastering it on top of everything else
underneath.
- Added a network synchronization panel to the window during netgame startup.
- Fixed: PClass::CreateDerivedClass() must initialize StateList to NULL.
Otherwise, classic DECORATE definitions generate a big, fat crash.
- Resurrected the R_Init progress bar, now as a standard Windows control.
- Removed the sound failure dialog. The FMOD setup already defaulted to no
sound if initialization failed, so this only applies when snd_output is set
to "alternate" which now also falls back to no sound. In addition, it wasn't
working right, and I didn't feel like fixing it for the probably 0% of users
it affected.
- Fixed: The edit control used for logging output added text in reverse order
on Win9x.
- Went back to the roots and made graphics initialization one of the last
things to happen during setup. Now the startup text is visible again. More
importantly, the main window is no longer created invisible, which seems
to cause trouble with it not always appearing in the taskbar. The fatal
error dialog is now also embedded in the main window instead of being a
separate modal dialog, so you can play with the log window to see any
problems that might be reported there.
Rather than completely restoring the original startup order, I tried to
keep things as close to the way they were with early graphics startup. In
particular, V_Init() now creates a dummy screen so that things that need
screen dimensions can get them. It gets replaced by the real screen later
in I_InitGraphics(). Will need to check this under Linux to make sure it
didn't cause any problems there.
- Removed the following stubs that just called functions in Video:
- I_StartModeIterator()
- I_NextMode()
- I_DisplayType()
I_FullscreenChanged() was also removed, and a new fullscreen parameter
was added to IVideo::StartModeIterator(), since that's all it controlled.
- Renamed I_InitHardware() back to I_InitGraphics(), since that's all it's
initialized post-1.22.
SVN r416 (trunk)
2006-12-19 04:09:10 +00:00
|
|
|
if (Video != NULL)
|
2006-02-24 04:48:15 +00:00
|
|
|
{
|
Note: I have not tried compiling these recent changes under Linux. I wouldn't
be surprised if it doesn't work.
- Reorganized the network startup loops so now they are event driven. There is
a single function that gets called to drive it, and it uses callbacks to
perform the different stages of the synchronization. This lets me have a nice,
responsive abort button instead of the previous unannounced hit-escape-to-
abort behavior, and I think the rearranged code is slightly easier to
understand too.
- Increased the number of bytes for version info during D_ArbitrateNetStart(),
in preparation for the day when NETGAMEVERSION requires more than one byte.
- I noticed an issue with Vista RC1 and the new fatal error setup. Even after
releasing a DirectDraw or Direct3D interface, the DWM can still use the
last image drawn using them when it composites the window. It doesn't always
do it but it does often enough that it is a real problem. At this point, I
don't know if it's a problem with the release version of Vista or not.
After messing around, I discovered the problem was caused by ~Win32Video()
hiding the window and then having it immediately shown soon after. The DWM
kept an image of the window to do the transition effect with, and then when
it didn't get a chance to do the transition, it didn't properly forget about
its saved image and kept plastering it on top of everything else
underneath.
- Added a network synchronization panel to the window during netgame startup.
- Fixed: PClass::CreateDerivedClass() must initialize StateList to NULL.
Otherwise, classic DECORATE definitions generate a big, fat crash.
- Resurrected the R_Init progress bar, now as a standard Windows control.
- Removed the sound failure dialog. The FMOD setup already defaulted to no
sound if initialization failed, so this only applies when snd_output is set
to "alternate" which now also falls back to no sound. In addition, it wasn't
working right, and I didn't feel like fixing it for the probably 0% of users
it affected.
- Fixed: The edit control used for logging output added text in reverse order
on Win9x.
- Went back to the roots and made graphics initialization one of the last
things to happen during setup. Now the startup text is visible again. More
importantly, the main window is no longer created invisible, which seems
to cause trouble with it not always appearing in the taskbar. The fatal
error dialog is now also embedded in the main window instead of being a
separate modal dialog, so you can play with the log window to see any
problems that might be reported there.
Rather than completely restoring the original startup order, I tried to
keep things as close to the way they were with early graphics startup. In
particular, V_Init() now creates a dummy screen so that things that need
screen dimensions can get them. It gets replaced by the real screen later
in I_InitGraphics(). Will need to check this under Linux to make sure it
didn't cause any problems there.
- Removed the following stubs that just called functions in Video:
- I_StartModeIterator()
- I_NextMode()
- I_DisplayType()
I_FullscreenChanged() was also removed, and a new fullscreen parameter
was added to IVideo::StartModeIterator(), since that's all it controlled.
- Renamed I_InitHardware() back to I_InitGraphics(), since that's all it's
initialized post-1.22.
SVN r416 (trunk)
2006-12-19 04:09:10 +00:00
|
|
|
while ((haveMode = Video->NextMode (&width, &height, &letterbox)) &&
|
|
|
|
(ratiomatch >= 0 && CheckRatio (width, height) != ratiomatch))
|
|
|
|
{
|
|
|
|
}
|
2006-02-24 04:48:15 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
if (haveMode)
|
|
|
|
{
|
|
|
|
if (/* hi_bits == showbits && */ width == hiwidth && height == hiheight)
|
|
|
|
ModesItems[i].e.highlight = ModesItems[i].a.selmode = c;
|
|
|
|
|
About a week's worth of changes here. As a heads-up, I wouldn't be
surprised if this doesn't build in Linux right now. The CMakeLists.txt
were checked with MinGW and NMake, but how they fair under Linux is an
unknown to me at this time.
- Converted most sprintf (and all wsprintf) calls to either mysnprintf or
FStrings, depending on the situation.
- Changed the strings in the wbstartstruct to be FStrings.
- Changed myvsnprintf() to output nothing if count is greater than INT_MAX.
This is so that I can use a series of mysnprintf() calls and advance the
pointer for each one. Once the pointer goes beyond the end of the buffer,
the count will go negative, but since it's an unsigned type it will be
seen as excessively huge instead. This should not be a problem, as there's
no reason for ZDoom to be using text buffers larger than 2 GB anywhere.
- Ripped out the disabled bit from FGameConfigFile::MigrateOldConfig().
- Changed CalcMapName() to return an FString instead of a pointer to a static
buffer.
- Changed startmap in d_main.cpp into an FString.
- Changed CheckWarpTransMap() to take an FString& as the first argument.
- Changed d_mapname in g_level.cpp into an FString.
- Changed DoSubstitution() in ct_chat.cpp to place the substitutions in an
FString.
- Fixed: The MAPINFO parser wrote into the string buffer to construct a map
name when given a Hexen map number. This was fine with the old scanner
code, but only a happy coincidence prevents it from crashing with the new
code
- Added the 'B' conversion specifier to StringFormat::VWorker() for printing
binary numbers.
- Added CMake support for building with MinGW, MSYS, and NMake. Linux support
is probably broken until I get around to booting into Linux again. Niceties
provided over the existing Makefiles they're replacing:
* All command-line builds can use the same build system, rather than having
a separate one for MinGW and another for Linux.
* Microsoft's NMake tool is supported as a target.
* Progress meters.
* Parallel makes work from a fresh checkout without needing to be primed
first with a single-threaded make.
* Porting to other architectures should be simplified, whenever that day
comes.
- Replaced the makewad tool with zipdir. This handles the dependency tracking
itself instead of generating an external makefile to do it, since I couldn't
figure out how to generate a makefile with an external tool and include it
with a CMake-generated makefile. Where makewad used a master list of files
to generate the package file, zipdir just zips the entire contents of one or
more directories.
- Added the gdtoa package from netlib's fp library so that ZDoom's printf-style
formatting can be entirely independant of the CRT.
SVN r1082 (trunk)
2008-07-23 04:57:26 +00:00
|
|
|
mysnprintf (strtemp, countof(strtemp), "%dx%d%s", width, height, letterbox?TEXTCOLOR_BROWN" LB":"");
|
2006-02-24 04:48:15 +00:00
|
|
|
ReplaceString (str, strtemp);
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
if (*str)
|
|
|
|
{
|
2006-05-11 04:00:58 +00:00
|
|
|
delete[] *str;
|
2006-02-24 04:48:15 +00:00
|
|
|
*str = NULL;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
void M_RefreshModesList ()
|
|
|
|
{
|
|
|
|
BuildModesList (SCREENWIDTH, SCREENHEIGHT, DisplayBits);
|
|
|
|
}
|
|
|
|
|
2006-05-11 04:00:58 +00:00
|
|
|
void M_FreeModesList ()
|
|
|
|
{
|
|
|
|
for (int i = VM_RESSTART; ModesItems[i].type == screenres; ++i)
|
|
|
|
{
|
|
|
|
for (int c = 0; c < 3; ++c)
|
|
|
|
{
|
|
|
|
char **str;
|
|
|
|
|
|
|
|
switch (c)
|
|
|
|
{
|
|
|
|
default: str = &ModesItems[i].b.res1; break;
|
|
|
|
case 1: str = &ModesItems[i].c.res2; break;
|
|
|
|
case 2: str = &ModesItems[i].d.res3; break;
|
|
|
|
}
|
|
|
|
if (str != NULL)
|
|
|
|
{
|
|
|
|
delete[] *str;
|
|
|
|
*str = NULL;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2006-09-14 00:02:31 +00:00
|
|
|
static bool GetSelectedSize (int line, int *width, int *height)
|
2006-02-24 04:48:15 +00:00
|
|
|
{
|
|
|
|
if (ModesItems[line].type != screenres)
|
|
|
|
{
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
char *res, *breakpt;
|
|
|
|
long x, y;
|
|
|
|
|
|
|
|
switch (ModesItems[line].a.selmode)
|
|
|
|
{
|
|
|
|
default: res = ModesItems[line].b.res1; break;
|
|
|
|
case 1: res = ModesItems[line].c.res2; break;
|
|
|
|
case 2: res = ModesItems[line].d.res3; break;
|
|
|
|
}
|
|
|
|
x = strtol (res, &breakpt, 10);
|
|
|
|
y = strtol (breakpt+1, NULL, 10);
|
|
|
|
|
|
|
|
*width = x;
|
|
|
|
*height = y;
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
static int FindBits (int bits)
|
|
|
|
{
|
|
|
|
int i;
|
|
|
|
|
|
|
|
for (i = 0; i < 22; i++)
|
|
|
|
{
|
|
|
|
if (BitTranslate[i] == bits)
|
|
|
|
return i;
|
|
|
|
}
|
|
|
|
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
static void SetModesMenu (int w, int h, int bits)
|
|
|
|
{
|
|
|
|
DummyDepthCvar = FindBits (bits);
|
|
|
|
|
|
|
|
if (testingmode <= 1)
|
|
|
|
{
|
|
|
|
if (ModesItems[VM_ENTERLINE].label != VMEnterText)
|
2006-12-29 03:38:37 +00:00
|
|
|
free (const_cast<char *>(ModesItems[VM_ENTERLINE].label));
|
2006-02-24 04:48:15 +00:00
|
|
|
ModesItems[VM_ENTERLINE].label = VMEnterText;
|
|
|
|
ModesItems[VM_TESTLINE].label = VMTestText;
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
char strtemp[64];
|
|
|
|
|
About a week's worth of changes here. As a heads-up, I wouldn't be
surprised if this doesn't build in Linux right now. The CMakeLists.txt
were checked with MinGW and NMake, but how they fair under Linux is an
unknown to me at this time.
- Converted most sprintf (and all wsprintf) calls to either mysnprintf or
FStrings, depending on the situation.
- Changed the strings in the wbstartstruct to be FStrings.
- Changed myvsnprintf() to output nothing if count is greater than INT_MAX.
This is so that I can use a series of mysnprintf() calls and advance the
pointer for each one. Once the pointer goes beyond the end of the buffer,
the count will go negative, but since it's an unsigned type it will be
seen as excessively huge instead. This should not be a problem, as there's
no reason for ZDoom to be using text buffers larger than 2 GB anywhere.
- Ripped out the disabled bit from FGameConfigFile::MigrateOldConfig().
- Changed CalcMapName() to return an FString instead of a pointer to a static
buffer.
- Changed startmap in d_main.cpp into an FString.
- Changed CheckWarpTransMap() to take an FString& as the first argument.
- Changed d_mapname in g_level.cpp into an FString.
- Changed DoSubstitution() in ct_chat.cpp to place the substitutions in an
FString.
- Fixed: The MAPINFO parser wrote into the string buffer to construct a map
name when given a Hexen map number. This was fine with the old scanner
code, but only a happy coincidence prevents it from crashing with the new
code
- Added the 'B' conversion specifier to StringFormat::VWorker() for printing
binary numbers.
- Added CMake support for building with MinGW, MSYS, and NMake. Linux support
is probably broken until I get around to booting into Linux again. Niceties
provided over the existing Makefiles they're replacing:
* All command-line builds can use the same build system, rather than having
a separate one for MinGW and another for Linux.
* Microsoft's NMake tool is supported as a target.
* Progress meters.
* Parallel makes work from a fresh checkout without needing to be primed
first with a single-threaded make.
* Porting to other architectures should be simplified, whenever that day
comes.
- Replaced the makewad tool with zipdir. This handles the dependency tracking
itself instead of generating an external makefile to do it, since I couldn't
figure out how to generate a makefile with an external tool and include it
with a CMake-generated makefile. Where makewad used a master list of files
to generate the package file, zipdir just zips the entire contents of one or
more directories.
- Added the gdtoa package from netlib's fp library so that ZDoom's printf-style
formatting can be entirely independant of the CRT.
SVN r1082 (trunk)
2008-07-23 04:57:26 +00:00
|
|
|
mysnprintf (strtemp, countof(strtemp), "TESTING %dx%dx%d", w, h, bits);
|
2006-02-24 04:48:15 +00:00
|
|
|
ModesItems[VM_ENTERLINE].label = copystring (strtemp);
|
|
|
|
ModesItems[VM_TESTLINE].label = "Please wait 5 seconds...";
|
|
|
|
}
|
|
|
|
|
|
|
|
BuildModesList (w, h, bits);
|
|
|
|
}
|
|
|
|
|
|
|
|
void M_RestoreMode ()
|
|
|
|
{
|
|
|
|
NewWidth = OldWidth;
|
|
|
|
NewHeight = OldHeight;
|
|
|
|
NewBits = OldBits;
|
|
|
|
setmodeneeded = true;
|
|
|
|
testingmode = 0;
|
|
|
|
SetModesMenu (OldWidth, OldHeight, OldBits);
|
|
|
|
}
|
|
|
|
|
|
|
|
void M_SetDefaultMode ()
|
|
|
|
{
|
|
|
|
// Make current resolution the default
|
|
|
|
vid_defwidth = SCREENWIDTH;
|
|
|
|
vid_defheight = SCREENHEIGHT;
|
|
|
|
vid_defbits = DisplayBits;
|
|
|
|
testingmode = 0;
|
|
|
|
SetModesMenu (SCREENWIDTH, SCREENHEIGHT, DisplayBits);
|
|
|
|
}
|
|
|
|
|
|
|
|
static void SetVidMode ()
|
|
|
|
{
|
|
|
|
SetModesMenu (SCREENWIDTH, SCREENHEIGHT, DisplayBits);
|
|
|
|
if (ModesMenu.items[ModesMenu.lastOn].type == screenres)
|
|
|
|
{
|
|
|
|
if (ModesMenu.items[ModesMenu.lastOn].a.selmode == -1)
|
|
|
|
{
|
|
|
|
ModesMenu.items[ModesMenu.lastOn].a.selmode++;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
M_SwitchMenu (&ModesMenu);
|
|
|
|
}
|
|
|
|
|
|
|
|
CCMD (menu_video)
|
|
|
|
{
|
|
|
|
M_StartControlPanel (true);
|
|
|
|
OptionsActive = true;
|
|
|
|
SetVidMode ();
|
|
|
|
}
|
|
|
|
|
|
|
|
void M_LoadKeys (const char *modname, bool dbl)
|
|
|
|
{
|
|
|
|
char section[64];
|
|
|
|
|
|
|
|
if (GameNames[gameinfo.gametype] == NULL)
|
|
|
|
return;
|
|
|
|
|
About a week's worth of changes here. As a heads-up, I wouldn't be
surprised if this doesn't build in Linux right now. The CMakeLists.txt
were checked with MinGW and NMake, but how they fair under Linux is an
unknown to me at this time.
- Converted most sprintf (and all wsprintf) calls to either mysnprintf or
FStrings, depending on the situation.
- Changed the strings in the wbstartstruct to be FStrings.
- Changed myvsnprintf() to output nothing if count is greater than INT_MAX.
This is so that I can use a series of mysnprintf() calls and advance the
pointer for each one. Once the pointer goes beyond the end of the buffer,
the count will go negative, but since it's an unsigned type it will be
seen as excessively huge instead. This should not be a problem, as there's
no reason for ZDoom to be using text buffers larger than 2 GB anywhere.
- Ripped out the disabled bit from FGameConfigFile::MigrateOldConfig().
- Changed CalcMapName() to return an FString instead of a pointer to a static
buffer.
- Changed startmap in d_main.cpp into an FString.
- Changed CheckWarpTransMap() to take an FString& as the first argument.
- Changed d_mapname in g_level.cpp into an FString.
- Changed DoSubstitution() in ct_chat.cpp to place the substitutions in an
FString.
- Fixed: The MAPINFO parser wrote into the string buffer to construct a map
name when given a Hexen map number. This was fine with the old scanner
code, but only a happy coincidence prevents it from crashing with the new
code
- Added the 'B' conversion specifier to StringFormat::VWorker() for printing
binary numbers.
- Added CMake support for building with MinGW, MSYS, and NMake. Linux support
is probably broken until I get around to booting into Linux again. Niceties
provided over the existing Makefiles they're replacing:
* All command-line builds can use the same build system, rather than having
a separate one for MinGW and another for Linux.
* Microsoft's NMake tool is supported as a target.
* Progress meters.
* Parallel makes work from a fresh checkout without needing to be primed
first with a single-threaded make.
* Porting to other architectures should be simplified, whenever that day
comes.
- Replaced the makewad tool with zipdir. This handles the dependency tracking
itself instead of generating an external makefile to do it, since I couldn't
figure out how to generate a makefile with an external tool and include it
with a CMake-generated makefile. Where makewad used a master list of files
to generate the package file, zipdir just zips the entire contents of one or
more directories.
- Added the gdtoa package from netlib's fp library so that ZDoom's printf-style
formatting can be entirely independant of the CRT.
SVN r1082 (trunk)
2008-07-23 04:57:26 +00:00
|
|
|
mysnprintf (section, countof(section), "%s.%s%sBindings", GameNames[gameinfo.gametype], modname,
|
2006-02-24 04:48:15 +00:00
|
|
|
dbl ? ".Double" : ".");
|
|
|
|
if (GameConfig->SetSection (section))
|
|
|
|
{
|
|
|
|
const char *key, *value;
|
|
|
|
while (GameConfig->NextInSection (key, value))
|
|
|
|
{
|
|
|
|
C_DoBind (key, value, dbl);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
int M_DoSaveKeys (FConfigFile *config, char *section, int i, bool dbl)
|
|
|
|
{
|
|
|
|
int most = (int)CustomControlsItems.Size();
|
|
|
|
|
|
|
|
config->SetSection (section, true);
|
|
|
|
config->ClearCurrentSection ();
|
|
|
|
for (++i; i < most; ++i)
|
|
|
|
{
|
|
|
|
menuitem_t *item = &CustomControlsItems[i];
|
|
|
|
if (item->type == control)
|
|
|
|
{
|
|
|
|
C_ArchiveBindings (config, dbl, item->e.command);
|
|
|
|
continue;
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
return i;
|
|
|
|
}
|
|
|
|
|
About a week's worth of changes here. As a heads-up, I wouldn't be
surprised if this doesn't build in Linux right now. The CMakeLists.txt
were checked with MinGW and NMake, but how they fair under Linux is an
unknown to me at this time.
- Converted most sprintf (and all wsprintf) calls to either mysnprintf or
FStrings, depending on the situation.
- Changed the strings in the wbstartstruct to be FStrings.
- Changed myvsnprintf() to output nothing if count is greater than INT_MAX.
This is so that I can use a series of mysnprintf() calls and advance the
pointer for each one. Once the pointer goes beyond the end of the buffer,
the count will go negative, but since it's an unsigned type it will be
seen as excessively huge instead. This should not be a problem, as there's
no reason for ZDoom to be using text buffers larger than 2 GB anywhere.
- Ripped out the disabled bit from FGameConfigFile::MigrateOldConfig().
- Changed CalcMapName() to return an FString instead of a pointer to a static
buffer.
- Changed startmap in d_main.cpp into an FString.
- Changed CheckWarpTransMap() to take an FString& as the first argument.
- Changed d_mapname in g_level.cpp into an FString.
- Changed DoSubstitution() in ct_chat.cpp to place the substitutions in an
FString.
- Fixed: The MAPINFO parser wrote into the string buffer to construct a map
name when given a Hexen map number. This was fine with the old scanner
code, but only a happy coincidence prevents it from crashing with the new
code
- Added the 'B' conversion specifier to StringFormat::VWorker() for printing
binary numbers.
- Added CMake support for building with MinGW, MSYS, and NMake. Linux support
is probably broken until I get around to booting into Linux again. Niceties
provided over the existing Makefiles they're replacing:
* All command-line builds can use the same build system, rather than having
a separate one for MinGW and another for Linux.
* Microsoft's NMake tool is supported as a target.
* Progress meters.
* Parallel makes work from a fresh checkout without needing to be primed
first with a single-threaded make.
* Porting to other architectures should be simplified, whenever that day
comes.
- Replaced the makewad tool with zipdir. This handles the dependency tracking
itself instead of generating an external makefile to do it, since I couldn't
figure out how to generate a makefile with an external tool and include it
with a CMake-generated makefile. Where makewad used a master list of files
to generate the package file, zipdir just zips the entire contents of one or
more directories.
- Added the gdtoa package from netlib's fp library so that ZDoom's printf-style
formatting can be entirely independant of the CRT.
SVN r1082 (trunk)
2008-07-23 04:57:26 +00:00
|
|
|
void M_SaveCustomKeys (FConfigFile *config, char *section, char *subsection, size_t sublen)
|
2006-02-24 04:48:15 +00:00
|
|
|
{
|
|
|
|
if (ControlsMenu.items == ControlsItems)
|
|
|
|
return;
|
|
|
|
|
|
|
|
// Start after the normal controls
|
- Fixed compilation with mingw again.
- Added multiple-choice sound sequences. These overcome one of the major
deficiences of the Hexen-inherited SNDSEQ system while still being Hexen
compatible: Custom door sounds can now use different opening and closing
sequences, for both normal and blazing speeds.
- Added a serializer for TArray.
- Added a countof macro to doomtype.h. See the1's blog to find out why
it's implemented the way it is.
<http://blogs.msdn.com/the1/articles/210011.aspx>
- Added a new method to FRandom for getting random numbers larger than 255,
which lets me:
- Fixed: SNDSEQ delayrand commands could delay for no more than 255 tics.
- Fixed: If you're going to have sector_t.SoundTarget, then they need to
be included in the pointer cleanup scans.
- Ported back newer name code from 2.1.
- Fixed: Using -warp with only one parameter in Doom and Heretic to
select a map on episode 1 no longer worked.
- New: Loading a multiplayer save now restores the players based on
their names rather than on their connection order. Using connection
order was sensible when -net was the only way to start a network game,
but with -host/-join, it's not so nice. Also, if there aren't enough
players in the save, then the extra players will be spawned normally,
so you can continue a saved game with more players than you started it
with.
- Added some new SNDSEQ commands to make it possible to define Heretic's
ambient sounds in SNDSEQ: volumerel, volumerand, slot, randomsequence,
delayonce, and restart. With these, it is basically possible to obsolete
all of the $ambient SNDINFO commands.
- Fixed: Sound sequences would only execute one command each time they were
ticked.
- Fixed: No bounds checking was done on the volume sound sequences played at.
- Fixed: The tic parameter to playloop was useless and caused it to
act like a redundant playrepeat. I have removed all the logic that
caused playloop to play repeating sounds, and now it acts like an
infinite sequence of play/delay commands until the sequence is
stopped.
- Fixed: Sound sequences were ticked every frame, not every tic, so all
the delay commands were timed incorrectly and varied depending on your
framerate. Since this is useful for restarting looping sounds that got
cut off, I have not changed this. Instead, the delay commands now
record the tic when execution should resume, not the number of tics
left to delay.
SVN r57 (trunk)
2006-04-21 01:22:55 +00:00
|
|
|
unsigned int i = countof(ControlsItems);
|
2006-02-24 04:48:15 +00:00
|
|
|
unsigned int most = CustomControlsItems.Size();
|
|
|
|
|
|
|
|
while (i < most)
|
|
|
|
{
|
|
|
|
menuitem_t *item = &CustomControlsItems[i];
|
|
|
|
|
|
|
|
if (item->type == whitetext)
|
|
|
|
{
|
2006-07-13 02:08:39 +00:00
|
|
|
assert (item->e.command != NULL);
|
About a week's worth of changes here. As a heads-up, I wouldn't be
surprised if this doesn't build in Linux right now. The CMakeLists.txt
were checked with MinGW and NMake, but how they fair under Linux is an
unknown to me at this time.
- Converted most sprintf (and all wsprintf) calls to either mysnprintf or
FStrings, depending on the situation.
- Changed the strings in the wbstartstruct to be FStrings.
- Changed myvsnprintf() to output nothing if count is greater than INT_MAX.
This is so that I can use a series of mysnprintf() calls and advance the
pointer for each one. Once the pointer goes beyond the end of the buffer,
the count will go negative, but since it's an unsigned type it will be
seen as excessively huge instead. This should not be a problem, as there's
no reason for ZDoom to be using text buffers larger than 2 GB anywhere.
- Ripped out the disabled bit from FGameConfigFile::MigrateOldConfig().
- Changed CalcMapName() to return an FString instead of a pointer to a static
buffer.
- Changed startmap in d_main.cpp into an FString.
- Changed CheckWarpTransMap() to take an FString& as the first argument.
- Changed d_mapname in g_level.cpp into an FString.
- Changed DoSubstitution() in ct_chat.cpp to place the substitutions in an
FString.
- Fixed: The MAPINFO parser wrote into the string buffer to construct a map
name when given a Hexen map number. This was fine with the old scanner
code, but only a happy coincidence prevents it from crashing with the new
code
- Added the 'B' conversion specifier to StringFormat::VWorker() for printing
binary numbers.
- Added CMake support for building with MinGW, MSYS, and NMake. Linux support
is probably broken until I get around to booting into Linux again. Niceties
provided over the existing Makefiles they're replacing:
* All command-line builds can use the same build system, rather than having
a separate one for MinGW and another for Linux.
* Microsoft's NMake tool is supported as a target.
* Progress meters.
* Parallel makes work from a fresh checkout without needing to be primed
first with a single-threaded make.
* Porting to other architectures should be simplified, whenever that day
comes.
- Replaced the makewad tool with zipdir. This handles the dependency tracking
itself instead of generating an external makefile to do it, since I couldn't
figure out how to generate a makefile with an external tool and include it
with a CMake-generated makefile. Where makewad used a master list of files
to generate the package file, zipdir just zips the entire contents of one or
more directories.
- Added the gdtoa package from netlib's fp library so that ZDoom's printf-style
formatting can be entirely independant of the CRT.
SVN r1082 (trunk)
2008-07-23 04:57:26 +00:00
|
|
|
mysnprintf (subsection, sublen, "%s.Bindings", item->e.command);
|
2006-02-24 04:48:15 +00:00
|
|
|
M_DoSaveKeys (config, section, (int)i, false);
|
About a week's worth of changes here. As a heads-up, I wouldn't be
surprised if this doesn't build in Linux right now. The CMakeLists.txt
were checked with MinGW and NMake, but how they fair under Linux is an
unknown to me at this time.
- Converted most sprintf (and all wsprintf) calls to either mysnprintf or
FStrings, depending on the situation.
- Changed the strings in the wbstartstruct to be FStrings.
- Changed myvsnprintf() to output nothing if count is greater than INT_MAX.
This is so that I can use a series of mysnprintf() calls and advance the
pointer for each one. Once the pointer goes beyond the end of the buffer,
the count will go negative, but since it's an unsigned type it will be
seen as excessively huge instead. This should not be a problem, as there's
no reason for ZDoom to be using text buffers larger than 2 GB anywhere.
- Ripped out the disabled bit from FGameConfigFile::MigrateOldConfig().
- Changed CalcMapName() to return an FString instead of a pointer to a static
buffer.
- Changed startmap in d_main.cpp into an FString.
- Changed CheckWarpTransMap() to take an FString& as the first argument.
- Changed d_mapname in g_level.cpp into an FString.
- Changed DoSubstitution() in ct_chat.cpp to place the substitutions in an
FString.
- Fixed: The MAPINFO parser wrote into the string buffer to construct a map
name when given a Hexen map number. This was fine with the old scanner
code, but only a happy coincidence prevents it from crashing with the new
code
- Added the 'B' conversion specifier to StringFormat::VWorker() for printing
binary numbers.
- Added CMake support for building with MinGW, MSYS, and NMake. Linux support
is probably broken until I get around to booting into Linux again. Niceties
provided over the existing Makefiles they're replacing:
* All command-line builds can use the same build system, rather than having
a separate one for MinGW and another for Linux.
* Microsoft's NMake tool is supported as a target.
* Progress meters.
* Parallel makes work from a fresh checkout without needing to be primed
first with a single-threaded make.
* Porting to other architectures should be simplified, whenever that day
comes.
- Replaced the makewad tool with zipdir. This handles the dependency tracking
itself instead of generating an external makefile to do it, since I couldn't
figure out how to generate a makefile with an external tool and include it
with a CMake-generated makefile. Where makewad used a master list of files
to generate the package file, zipdir just zips the entire contents of one or
more directories.
- Added the gdtoa package from netlib's fp library so that ZDoom's printf-style
formatting can be entirely independant of the CRT.
SVN r1082 (trunk)
2008-07-23 04:57:26 +00:00
|
|
|
mysnprintf (subsection, sublen, "%s.DoubleBindings", item->e.command);
|
2006-02-24 04:48:15 +00:00
|
|
|
i = M_DoSaveKeys (config, section, (int)i, true);
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
i++;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
static int AddKeySpot;
|
|
|
|
|
2006-07-13 02:08:39 +00:00
|
|
|
void FreeKeySections()
|
2006-06-11 01:06:19 +00:00
|
|
|
{
|
|
|
|
const unsigned int numStdControls = countof(ControlsItems);
|
|
|
|
unsigned int i;
|
|
|
|
|
|
|
|
for (i = numStdControls; i < CustomControlsItems.Size(); ++i)
|
|
|
|
{
|
|
|
|
menuitem_t *item = &CustomControlsItems[i];
|
|
|
|
if (item->type == whitetext || item->type == control)
|
|
|
|
{
|
|
|
|
if (item->label != NULL)
|
|
|
|
{
|
|
|
|
delete[] item->label;
|
|
|
|
item->label = NULL;
|
|
|
|
}
|
|
|
|
if (item->e.command != NULL)
|
|
|
|
{
|
|
|
|
delete[] item->e.command;
|
|
|
|
item->e.command = NULL;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2006-02-24 04:48:15 +00:00
|
|
|
CCMD (addkeysection)
|
|
|
|
{
|
|
|
|
if (argv.argc() != 3)
|
|
|
|
{
|
|
|
|
Printf ("Usage: addkeysection <menu section name> <ini name>\n");
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
- Fixed compilation with mingw again.
- Added multiple-choice sound sequences. These overcome one of the major
deficiences of the Hexen-inherited SNDSEQ system while still being Hexen
compatible: Custom door sounds can now use different opening and closing
sequences, for both normal and blazing speeds.
- Added a serializer for TArray.
- Added a countof macro to doomtype.h. See the1's blog to find out why
it's implemented the way it is.
<http://blogs.msdn.com/the1/articles/210011.aspx>
- Added a new method to FRandom for getting random numbers larger than 255,
which lets me:
- Fixed: SNDSEQ delayrand commands could delay for no more than 255 tics.
- Fixed: If you're going to have sector_t.SoundTarget, then they need to
be included in the pointer cleanup scans.
- Ported back newer name code from 2.1.
- Fixed: Using -warp with only one parameter in Doom and Heretic to
select a map on episode 1 no longer worked.
- New: Loading a multiplayer save now restores the players based on
their names rather than on their connection order. Using connection
order was sensible when -net was the only way to start a network game,
but with -host/-join, it's not so nice. Also, if there aren't enough
players in the save, then the extra players will be spawned normally,
so you can continue a saved game with more players than you started it
with.
- Added some new SNDSEQ commands to make it possible to define Heretic's
ambient sounds in SNDSEQ: volumerel, volumerand, slot, randomsequence,
delayonce, and restart. With these, it is basically possible to obsolete
all of the $ambient SNDINFO commands.
- Fixed: Sound sequences would only execute one command each time they were
ticked.
- Fixed: No bounds checking was done on the volume sound sequences played at.
- Fixed: The tic parameter to playloop was useless and caused it to
act like a redundant playrepeat. I have removed all the logic that
caused playloop to play repeating sounds, and now it acts like an
infinite sequence of play/delay commands until the sequence is
stopped.
- Fixed: Sound sequences were ticked every frame, not every tic, so all
the delay commands were timed incorrectly and varied depending on your
framerate. Since this is useful for restarting looping sounds that got
cut off, I have not changed this. Instead, the delay commands now
record the tic when execution should resume, not the number of tics
left to delay.
SVN r57 (trunk)
2006-04-21 01:22:55 +00:00
|
|
|
const int numStdControls = countof(ControlsItems);
|
2006-02-24 04:48:15 +00:00
|
|
|
int i;
|
|
|
|
|
|
|
|
if (ControlsMenu.items == ControlsItems)
|
|
|
|
{ // No custom controls have been defined yet.
|
|
|
|
for (i = 0; i < numStdControls; ++i)
|
|
|
|
{
|
|
|
|
CustomControlsItems.Push (ControlsItems[i]);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
// See if this section already exists
|
|
|
|
int last = (int)CustomControlsItems.Size();
|
|
|
|
for (i = numStdControls; i < last; ++i)
|
|
|
|
{
|
|
|
|
menuitem_t *item = &CustomControlsItems[i];
|
|
|
|
|
|
|
|
if (item->type == whitetext &&
|
|
|
|
stricmp (item->label, argv[1]) == 0)
|
|
|
|
{ // found it
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
if (i == last)
|
|
|
|
{ // Add the new section
|
|
|
|
// Limit the ini name to 32 chars
|
|
|
|
if (strlen (argv[2]) > 32)
|
|
|
|
argv[2][32] = 0;
|
|
|
|
|
|
|
|
menuitem_t tempItem = { redtext, " " };
|
|
|
|
|
|
|
|
// Add a blank line to the menu
|
|
|
|
CustomControlsItems.Push (tempItem);
|
|
|
|
|
|
|
|
// Add the section name to the menu
|
|
|
|
tempItem.type = whitetext;
|
|
|
|
tempItem.label = copystring (argv[1]);
|
|
|
|
tempItem.e.command = copystring (argv[2]); // Record ini section name in command field
|
|
|
|
CustomControlsItems.Push (tempItem);
|
|
|
|
ControlsMenu.items = &CustomControlsItems[0];
|
|
|
|
|
|
|
|
// Load bindings for this section from the ini
|
|
|
|
M_LoadKeys (argv[2], 0);
|
|
|
|
M_LoadKeys (argv[2], 1);
|
|
|
|
|
|
|
|
AddKeySpot = 0;
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{ // Add new keys to the end of this section
|
|
|
|
do
|
|
|
|
{
|
|
|
|
i++;
|
|
|
|
} while (i < last && CustomControlsItems[i].type == control);
|
|
|
|
if (i < last)
|
|
|
|
{
|
|
|
|
AddKeySpot = i;
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
AddKeySpot = 0;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
CCMD (addmenukey)
|
|
|
|
{
|
|
|
|
if (argv.argc() != 3)
|
|
|
|
{
|
|
|
|
Printf ("Usage: addmenukey <description> <command>\n");
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
if (ControlsMenu.items == ControlsItems)
|
|
|
|
{
|
|
|
|
Printf ("You must use addkeysection first.\n");
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
menuitem_t newItem = { control, };
|
|
|
|
newItem.label = copystring (argv[1]);
|
|
|
|
newItem.e.command = copystring (argv[2]);
|
|
|
|
if (AddKeySpot == 0)
|
|
|
|
{ // Just add to the end of the menu
|
|
|
|
CustomControlsItems.Push (newItem);
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{ // Add somewhere in the middle of the menu
|
|
|
|
size_t movecount = CustomControlsItems.Size() - AddKeySpot;
|
|
|
|
CustomControlsItems.Reserve (1);
|
|
|
|
memmove (&CustomControlsItems[AddKeySpot+1],
|
|
|
|
&CustomControlsItems[AddKeySpot],
|
|
|
|
sizeof(menuitem_t)*movecount);
|
|
|
|
CustomControlsItems[AddKeySpot++] = newItem;
|
|
|
|
}
|
|
|
|
ControlsMenu.items = &CustomControlsItems[0];
|
|
|
|
ControlsMenu.numitems = (int)CustomControlsItems.Size();
|
|
|
|
}
|
2006-05-12 03:14:40 +00:00
|
|
|
|
|
|
|
void M_Deinit ()
|
|
|
|
{
|
|
|
|
// Free bitdepth names for the modes menu.
|
2006-05-16 04:19:20 +00:00
|
|
|
for (size_t i = 0; i < countof(Depths); ++i)
|
2006-05-12 03:14:40 +00:00
|
|
|
{
|
|
|
|
if (Depths[i].name != NULL)
|
|
|
|
{
|
|
|
|
delete[] Depths[i].name;
|
|
|
|
Depths[i].name = NULL;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
// Free resolutions from the modes menu.
|
|
|
|
M_FreeModesList();
|
|
|
|
}
|
|
|
|
|
2008-01-08 04:00:43 +00:00
|
|
|
// Reads any XHAIRS lumps for the names of crosshairs and
|
|
|
|
// adds them to the display options menu.
|
|
|
|
void InitCrosshairsList()
|
|
|
|
{
|
|
|
|
int lastlump, lump;
|
|
|
|
valuestring_t value;
|
|
|
|
|
|
|
|
lastlump = 0;
|
|
|
|
|
|
|
|
Crosshairs.Clear();
|
|
|
|
value.value = 0;
|
|
|
|
value.name = "None";
|
|
|
|
Crosshairs.Push(value);
|
|
|
|
|
|
|
|
while ((lump = Wads.FindLump("XHAIRS", &lastlump)) != -1)
|
|
|
|
{
|
2008-04-03 03:19:21 +00:00
|
|
|
FScanner sc(lump);
|
- Updated lempar.c to v1.31.
- Added .txt files to the list of types (wad, zip, and pk3) that can be
loaded without listing them after -file.
- Fonts that are created by the ACS setfont command to wrap a texture now
support animated textures.
- FON2 fonts can now use their full palette for CR_UNTRANSLATED when drawn
with the hardware 2D path instead of being restricted to the game palette.
- Fixed: Toggling vid_vsync would reset the displayed fullscreen gamma to 1
on a Radeon 9000.
- Added back the off-by-one palette handling, but in a much more limited
scope than before. The skipped entry is assumed to always be at 248, and
it is assumed that all Shader Model 1.4 cards suffer from this. That's
because all SM1.4 cards are based on variants of the ATI R200 core, and the
RV250 in a Radeon 9000 craps up like this. I see no reason to assume that
other flavors of the R200 are any different. (Interesting note: With the
Radeon 9000, D3DTADDRESS_CLAMP is an invalid address mode when using the
debug Direct3D 9 runtime, but it works perfectly fine with the retail
Direct3D 9 runtime.) (Insight: The R200 probably uses bytes for all its
math inside pixel shaders. That would explain perfectly why I can't use
constants greater than 1 with PS1.4 and why it can't do an exact mapping to
every entry in the color palette.
- Fixed: The software shaded drawer did not work for 2D, because its selected
"color"map was replaced with the identitymap before being used.
- Fixed: I cannot use Printf to output messages before the framebuffer was
completely setup, meaning that Shader Model 1.4 cards could not change
resolution.
- I have decided to let remap palettes specify variable alpha values for
their colors. D3DFB no longer forces them to 255.
- Updated re2c to version 0.12.3.
- Fixed: A_Wander used threshold as a timer, when it should have used
reactiontime.
- Fixed: A_CustomRailgun would not fire at all for actors without a target
when the aim parameter was disabled.
- Made the warp command work in multiplayer, again courtesy of Karate Chris.
- Fixed: Trying to spawn a bot while not in a game made for a crashing time.
(Patch courtesy of Karate Chris.)
- Removed some floating point math from hu_scores.cpp that somebody's GCC
gave warnings for (not mine, though).
- Fixed: The SBarInfo drawbar command crashed if the sprite image was
unavailable.
- Fixed: FString::operator=(const char *) did not release its old buffer when
being assigned to the null string.
- The scanner no longer has an upper limit on the length of strings it
accepts, though short strings will be faster than long ones.
- Moved all the text scanning functions into a class. Mainly, this means that
multiple script scanner states can be stored without being forced to do so
recursively. I think I might be taking advantage of that in the near
future. Possibly. Maybe.
- Removed some potential buffer overflows from the decal parser.
- Applied Blzut3's SBARINFO update #9:
* Fixed: When using even length values in drawnumber it would cap to a 98
value instead of a 99 as intended.
* The SBarInfo parser can now accept negatives for coordinates. This
doesn't allow much right now, but later I plan to add better fullscreen
hud support in which the negatives will be more useful. This also cleans
up the source a bit since all calls for (x, y) coordinates are with the
function getCoordinates().
- Added support for stencilling actors.
- Added support for non-black colors specified with DTA_ColorOverlay to the
software renderer.
- Fixed: The inverse, gold, red, and green fixed colormaps each allocated
space for 32 different colormaps, even though each only used the first one.
- Added two new blending flags to make reverse subtract blending more useful:
STYLEF_InvertSource and STYLEF_InvertOverlay. These invert the color that
gets blended with the background, since that seems like a good idea for
reverse subtraction. They also work with the other two blending operations.
- Added subtract and reverse subtract blending operations to the renderer.
Since the ERenderStyle enumeration was getting rather unwieldy, I converted
it into a new FRenderStyle structure that lets each parameter of the
blending equation be set separately. This simplified the set up for the
blend quite a bit, and it means a number of new combinations are available
by setting the parameters properly.
SVN r710 (trunk)
2008-01-25 23:57:44 +00:00
|
|
|
while (sc.GetNumber())
|
2008-01-08 04:00:43 +00:00
|
|
|
{
|
- Updated lempar.c to v1.31.
- Added .txt files to the list of types (wad, zip, and pk3) that can be
loaded without listing them after -file.
- Fonts that are created by the ACS setfont command to wrap a texture now
support animated textures.
- FON2 fonts can now use their full palette for CR_UNTRANSLATED when drawn
with the hardware 2D path instead of being restricted to the game palette.
- Fixed: Toggling vid_vsync would reset the displayed fullscreen gamma to 1
on a Radeon 9000.
- Added back the off-by-one palette handling, but in a much more limited
scope than before. The skipped entry is assumed to always be at 248, and
it is assumed that all Shader Model 1.4 cards suffer from this. That's
because all SM1.4 cards are based on variants of the ATI R200 core, and the
RV250 in a Radeon 9000 craps up like this. I see no reason to assume that
other flavors of the R200 are any different. (Interesting note: With the
Radeon 9000, D3DTADDRESS_CLAMP is an invalid address mode when using the
debug Direct3D 9 runtime, but it works perfectly fine with the retail
Direct3D 9 runtime.) (Insight: The R200 probably uses bytes for all its
math inside pixel shaders. That would explain perfectly why I can't use
constants greater than 1 with PS1.4 and why it can't do an exact mapping to
every entry in the color palette.
- Fixed: The software shaded drawer did not work for 2D, because its selected
"color"map was replaced with the identitymap before being used.
- Fixed: I cannot use Printf to output messages before the framebuffer was
completely setup, meaning that Shader Model 1.4 cards could not change
resolution.
- I have decided to let remap palettes specify variable alpha values for
their colors. D3DFB no longer forces them to 255.
- Updated re2c to version 0.12.3.
- Fixed: A_Wander used threshold as a timer, when it should have used
reactiontime.
- Fixed: A_CustomRailgun would not fire at all for actors without a target
when the aim parameter was disabled.
- Made the warp command work in multiplayer, again courtesy of Karate Chris.
- Fixed: Trying to spawn a bot while not in a game made for a crashing time.
(Patch courtesy of Karate Chris.)
- Removed some floating point math from hu_scores.cpp that somebody's GCC
gave warnings for (not mine, though).
- Fixed: The SBarInfo drawbar command crashed if the sprite image was
unavailable.
- Fixed: FString::operator=(const char *) did not release its old buffer when
being assigned to the null string.
- The scanner no longer has an upper limit on the length of strings it
accepts, though short strings will be faster than long ones.
- Moved all the text scanning functions into a class. Mainly, this means that
multiple script scanner states can be stored without being forced to do so
recursively. I think I might be taking advantage of that in the near
future. Possibly. Maybe.
- Removed some potential buffer overflows from the decal parser.
- Applied Blzut3's SBARINFO update #9:
* Fixed: When using even length values in drawnumber it would cap to a 98
value instead of a 99 as intended.
* The SBarInfo parser can now accept negatives for coordinates. This
doesn't allow much right now, but later I plan to add better fullscreen
hud support in which the negatives will be more useful. This also cleans
up the source a bit since all calls for (x, y) coordinates are with the
function getCoordinates().
- Added support for stencilling actors.
- Added support for non-black colors specified with DTA_ColorOverlay to the
software renderer.
- Fixed: The inverse, gold, red, and green fixed colormaps each allocated
space for 32 different colormaps, even though each only used the first one.
- Added two new blending flags to make reverse subtract blending more useful:
STYLEF_InvertSource and STYLEF_InvertOverlay. These invert the color that
gets blended with the background, since that seems like a good idea for
reverse subtraction. They also work with the other two blending operations.
- Added subtract and reverse subtract blending operations to the renderer.
Since the ERenderStyle enumeration was getting rather unwieldy, I converted
it into a new FRenderStyle structure that lets each parameter of the
blending equation be set separately. This simplified the set up for the
blend quite a bit, and it means a number of new combinations are available
by setting the parameters properly.
SVN r710 (trunk)
2008-01-25 23:57:44 +00:00
|
|
|
value.value = float(sc.Number);
|
|
|
|
sc.MustGetString();
|
|
|
|
value.name = sc.String;
|
2008-01-08 04:00:43 +00:00
|
|
|
if (value.value != 0)
|
|
|
|
{ // Check if it already exists. If not, add it.
|
|
|
|
unsigned int i;
|
|
|
|
|
|
|
|
for (i = 1; i < Crosshairs.Size(); ++i)
|
|
|
|
{
|
|
|
|
if (Crosshairs[i].value == value.value)
|
|
|
|
{
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if (i < Crosshairs.Size())
|
|
|
|
{
|
|
|
|
Crosshairs[i].name = value.name;
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
Crosshairs.Push(value);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2008-01-10 11:02:07 +00:00
|
|
|
VideoItems[CROSSHAIR_INDEX].b.numvalues = float(Crosshairs.Size());
|
|
|
|
VideoItems[CROSSHAIR_INDEX].e.valuestrings = &Crosshairs[0];
|
2008-01-08 04:00:43 +00:00
|
|
|
}
|