2006-04-13 20:47:06 +00:00
|
|
|
//-------------------------------------------------------------------------
|
|
|
|
/*
|
2016-02-07 02:38:08 +00:00
|
|
|
Copyright (C) 2016 EDuke32 developers and contributors
|
2006-04-13 20:47:06 +00:00
|
|
|
|
2010-05-25 10:56:00 +00:00
|
|
|
This file is part of EDuke32.
|
2006-04-13 20:47:06 +00:00
|
|
|
|
|
|
|
EDuke32 is free software; you can redistribute it and/or
|
|
|
|
modify it under the terms of the GNU General Public License version 2
|
|
|
|
as published by the Free Software Foundation.
|
|
|
|
|
|
|
|
This program is distributed in the hope that it will be useful,
|
|
|
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
|
|
|
|
|
|
|
See the GNU General Public License for more details.
|
|
|
|
|
|
|
|
You should have received a copy of the GNU General Public License
|
|
|
|
along with this program; if not, write to the Free Software
|
2014-07-20 08:55:56 +00:00
|
|
|
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
2006-04-13 20:47:06 +00:00
|
|
|
*/
|
|
|
|
//-------------------------------------------------------------------------
|
|
|
|
|
2019-09-21 18:59:54 +00:00
|
|
|
#include "ns.h" // Must come before everything else!
|
|
|
|
|
2006-04-13 20:47:06 +00:00
|
|
|
#include "duke3d.h"
|
2008-06-30 01:03:51 +00:00
|
|
|
#include "osdcmds.h"
|
2016-02-13 21:06:12 +00:00
|
|
|
#include "renderlayer.h"
|
2017-02-19 22:15:32 +00:00
|
|
|
#include "cmdline.h"
|
2006-04-13 20:47:06 +00:00
|
|
|
|
2018-06-14 21:25:20 +00:00
|
|
|
#if defined RENDERTYPESDL && defined SDL_TARGET && SDL_TARGET > 1
|
|
|
|
# include "sdl_inc.h"
|
2014-04-15 19:02:48 +00:00
|
|
|
#endif
|
|
|
|
|
2006-04-13 20:47:06 +00:00
|
|
|
// we load this in to get default button and key assignments
|
|
|
|
// as well as setting up function mappings
|
|
|
|
|
2019-09-21 20:53:00 +00:00
|
|
|
BEGIN_DUKE_NS
|
|
|
|
|
2006-04-13 20:47:06 +00:00
|
|
|
|
2019-08-13 09:15:49 +00:00
|
|
|
|
2006-11-14 21:35:50 +00:00
|
|
|
void CONFIG_SetDefaults(void)
|
2006-04-13 20:47:06 +00:00
|
|
|
{
|
2018-11-18 18:08:53 +00:00
|
|
|
|
2018-06-14 17:49:46 +00:00
|
|
|
# if defined RENDERTYPESDL && SDL_MAJOR_VERSION > 1
|
2018-02-26 14:46:52 +00:00
|
|
|
uint32_t inited = SDL_WasInit(SDL_INIT_VIDEO);
|
|
|
|
if (inited == 0)
|
|
|
|
SDL_Init(SDL_INIT_VIDEO);
|
|
|
|
else if (!(inited & SDL_INIT_VIDEO))
|
|
|
|
SDL_InitSubSystem(SDL_INIT_VIDEO);
|
|
|
|
|
|
|
|
SDL_DisplayMode dm;
|
|
|
|
if (SDL_GetDesktopDisplayMode(0, &dm) == 0)
|
|
|
|
{
|
2019-10-27 12:40:24 +00:00
|
|
|
ScreenWidth = dm.w;
|
|
|
|
ScreenHeight = dm.h;
|
2018-02-26 14:46:52 +00:00
|
|
|
}
|
|
|
|
else
|
|
|
|
# endif
|
|
|
|
{
|
2019-10-27 12:40:24 +00:00
|
|
|
ScreenWidth = 1024;
|
|
|
|
ScreenHeight = 768;
|
2018-02-26 14:46:52 +00:00
|
|
|
}
|
2014-03-22 09:25:51 +00:00
|
|
|
|
2019-10-27 12:40:24 +00:00
|
|
|
ScreenBPP = 32;
|
2018-11-18 18:08:44 +00:00
|
|
|
|
2019-10-22 23:04:07 +00:00
|
|
|
|
|
|
|
ud.camera_time = 0;//4;
|
2014-04-17 20:00:24 +00:00
|
|
|
|
2018-11-18 18:08:44 +00:00
|
|
|
g_player[0].ps->aim_mode = 1;
|
|
|
|
|
2019-10-27 12:40:24 +00:00
|
|
|
ScreenMode = 1;
|
2018-11-18 18:13:02 +00:00
|
|
|
|
2018-11-18 18:08:44 +00:00
|
|
|
ud.althud = 1;
|
|
|
|
ud.angleinterpolation = 0;
|
|
|
|
ud.camerasprite = -1;
|
|
|
|
ud.config.ShowWeapons = 0;
|
|
|
|
ud.display_bonus_screen = 1;
|
2019-10-22 23:04:07 +00:00
|
|
|
|
2019-10-23 23:30:33 +00:00
|
|
|
hud_position = 0;
|
2018-11-18 18:08:44 +00:00
|
|
|
ud.menubackground = 1;
|
|
|
|
ud.screen_size = 4;
|
|
|
|
ud.screen_tilting = 1;
|
|
|
|
ud.screenfade = 1;
|
|
|
|
ud.shadow_pal = 4;
|
|
|
|
ud.show_level_text = 1;
|
|
|
|
ud.slidebar_paldisabled = 1;
|
2019-10-22 21:31:46 +00:00
|
|
|
ud.statusbarflags = 0;//STATUSBAR_NOSHRINK;
|
2018-11-18 18:08:44 +00:00
|
|
|
ud.statusbarmode = 1;
|
|
|
|
ud.statusbarscale = 100;
|
2009-03-14 02:55:39 +00:00
|
|
|
|
2019-10-28 21:19:50 +00:00
|
|
|
ud.god = 0;
|
|
|
|
ud.m_respawn_items = 0;
|
|
|
|
ud.m_respawn_monsters = 0;
|
|
|
|
ud.m_respawn_inventory = 0;
|
|
|
|
ud.warp_on = 0;
|
|
|
|
ud.cashman = 0;
|
2019-11-09 18:15:03 +00:00
|
|
|
m_ffire = 1;
|
2019-10-28 21:19:50 +00:00
|
|
|
ud.m_player_skill = ud.player_skill = 2;
|
|
|
|
memcpy(g_player[0].wchoice, "\3\4\5\7\0x8\6\0\2\0x9\1", 10);
|
|
|
|
wchoice.Callback();
|
2006-04-13 20:47:06 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2018-11-18 18:08:44 +00:00
|
|
|
int CONFIG_ReadSetup(void)
|
2006-04-13 20:47:06 +00:00
|
|
|
{
|
|
|
|
CONFIG_SetDefaults();
|
2019-10-27 12:40:24 +00:00
|
|
|
if (ScreenBPP < 8) ScreenBPP = 32;
|
2006-07-01 01:40:18 +00:00
|
|
|
return 0;
|
2006-04-13 20:47:06 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
2015-10-20 07:15:01 +00:00
|
|
|
void CONFIG_WriteSettings(void) // save binds and aliases to <cfgname>_settings.cfg
|
2008-06-29 12:29:42 +00:00
|
|
|
{
|
|
|
|
}
|
|
|
|
|
2019-08-14 05:25:27 +00:00
|
|
|
|
2019-09-21 20:53:00 +00:00
|
|
|
END_DUKE_NS
|