2020-06-11 07:22:16 +00:00
|
|
|
//-------------------------------------------------------------------------
|
|
|
|
/*
|
2020-06-23 19:56:42 +00:00
|
|
|
Copyright (C) 1996, 2003 - 3D Realms Entertainment
|
2020-06-11 07:22:16 +00:00
|
|
|
|
2020-06-23 19:56:42 +00:00
|
|
|
This file is part of Duke Nukem 3D version 1.5 - Atomic Edition
|
2020-06-11 07:22:16 +00:00
|
|
|
|
2020-06-23 19:56:42 +00:00
|
|
|
Duke Nukem 3D is free software; you can redistribute it and/or
|
|
|
|
modify it under the terms of the GNU General Public License
|
|
|
|
as published by the Free Software Foundation; either version 2
|
|
|
|
of the License, or (at your option) any later version.
|
2020-06-11 07:22:16 +00:00
|
|
|
|
|
|
|
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
|
2020-06-23 19:56:42 +00:00
|
|
|
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|
|
|
|
|
|
|
Original Source: 1996 - Todd Replogle
|
|
|
|
Prepared for public release: 03/21/2003 - Charlie Wiederhold, 3D Realms
|
|
|
|
Modifications for JonoF's port by Jonathon Fowler (jf@jonof.id.au)
|
2020-06-11 07:22:16 +00:00
|
|
|
*/
|
2020-06-23 19:56:42 +00:00
|
|
|
//-------------------------------------------------------------------------
|
2020-06-11 07:22:16 +00:00
|
|
|
|
|
|
|
#include "ns.h" // Must come before everything else!
|
|
|
|
|
2020-06-21 20:18:12 +00:00
|
|
|
#include "duke3d.h"
|
2020-06-11 07:22:16 +00:00
|
|
|
#include "demo.h"
|
|
|
|
#include "screens.h"
|
|
|
|
#include "baselayer.h"
|
|
|
|
#include "m_argv.h"
|
|
|
|
|
|
|
|
BEGIN_DUKE_NS
|
|
|
|
|
2020-06-23 19:56:42 +00:00
|
|
|
//---------------------------------------------------------------------------
|
|
|
|
//
|
|
|
|
// game specific command line args go here.
|
|
|
|
//
|
|
|
|
//---------------------------------------------------------------------------
|
2020-06-11 07:22:16 +00:00
|
|
|
|
2020-06-23 19:56:42 +00:00
|
|
|
void checkcommandline()
|
2020-06-11 07:22:16 +00:00
|
|
|
{
|
|
|
|
auto val = Args->CheckValue("-skill");
|
2020-06-23 19:56:42 +00:00
|
|
|
if (!val) val = Args->CheckValue("-s");
|
2020-06-11 07:22:16 +00:00
|
|
|
if (val)
|
|
|
|
{
|
|
|
|
ud.m_player_skill = ud.player_skill = clamp((int)strtol(val, nullptr, 0), 0, 5);
|
|
|
|
if (ud.m_player_skill == 4) ud.m_respawn_monsters = ud.respawn_monsters = 1;
|
|
|
|
}
|
|
|
|
val = Args->CheckValue("-respawn");
|
2020-06-23 19:56:42 +00:00
|
|
|
if (!val) val = Args->CheckValue("-t");
|
2020-06-11 07:22:16 +00:00
|
|
|
if (val)
|
|
|
|
{
|
|
|
|
if (*val == '1') ud.m_respawn_monsters = 1;
|
|
|
|
else if (*val == '2') ud.m_respawn_items = 1;
|
|
|
|
else if (*val == '3') ud.m_respawn_inventory = 1;
|
|
|
|
else
|
|
|
|
{
|
|
|
|
ud.m_respawn_monsters = 1;
|
|
|
|
ud.m_respawn_items = 1;
|
|
|
|
ud.m_respawn_inventory = 1;
|
|
|
|
}
|
|
|
|
Printf("Respawn on.\n");
|
|
|
|
}
|
|
|
|
}
|
2020-06-23 19:56:42 +00:00
|
|
|
|
2020-06-11 07:22:16 +00:00
|
|
|
END_DUKE_NS
|
2020-06-23 19:56:42 +00:00
|
|
|
|