mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-12-25 19:20:46 +00:00
- changed licenses in a few files.
These originated from GZDoom and originally contained original Doom code, but for Demolition the offending parts are no longer present so the ZDoom-BSD license applies now.
This commit is contained in:
parent
f658b0f33d
commit
782dfcdc54
3 changed files with 47 additions and 143 deletions
|
@ -1,24 +1,37 @@
|
||||||
//-----------------------------------------------------------------------------
|
/*
|
||||||
//
|
** c_dispatch.cpp
|
||||||
// Copyright 1993-1996 id Software
|
** Functions for executing console commands and aliases
|
||||||
// Copyright 1999-2016 Randy Heit
|
**
|
||||||
// Copyright 2002-2016 Christoph Oelckers
|
**---------------------------------------------------------------------------
|
||||||
//
|
** Copyright 1998-2016 Randy Heit
|
||||||
// This program is free software: you can redistribute it and/or modify
|
** Copyright 2003-2019 Christoph Oelckers
|
||||||
// it under the terms of the GNU General Public License as published by
|
** All rights reserved.
|
||||||
// the Free Software Foundation, either version 2 of the License, or
|
**
|
||||||
// (at your option) any later version.
|
** Redistribution and use in source and binary forms, with or without
|
||||||
//
|
** modification, are permitted provided that the following conditions
|
||||||
// This program is distributed in the hope that it will be useful,
|
** are met:
|
||||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
**
|
||||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
** 1. Redistributions of source code must retain the above copyright
|
||||||
// GNU General Public License for more details.
|
** notice, this list of conditions and the following disclaimer.
|
||||||
//
|
** 2. Redistributions in binary form must reproduce the above copyright
|
||||||
// You should have received a copy of the GNU General Public License
|
** notice, this list of conditions and the following disclaimer in the
|
||||||
// along with this program. If not, see http://www.gnu.org/licenses/
|
** 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.
|
||||||
|
**---------------------------------------------------------------------------
|
||||||
|
**
|
||||||
|
*/
|
||||||
|
|
||||||
#include "c_bind.h"
|
#include "c_bind.h"
|
||||||
#include "d_event.h"
|
#include "d_event.h"
|
||||||
|
@ -40,62 +53,6 @@ event_t events[NUM_EVENTS];
|
||||||
|
|
||||||
bool G_Responder (event_t *ev)
|
bool G_Responder (event_t *ev)
|
||||||
{
|
{
|
||||||
#if 0
|
|
||||||
// any other key pops up menu if in demos
|
|
||||||
// [RH] But only if the key isn't bound to a "special" command
|
|
||||||
if (gameaction == ga_nothing &&
|
|
||||||
(demoplayback || gamestate == GS_DEMOSCREEN || gamestate == GS_TITLELEVEL))
|
|
||||||
{
|
|
||||||
const char *cmd = Bindings.GetBind (ev->data1);
|
|
||||||
|
|
||||||
if (ev->type == EV_KeyDown)
|
|
||||||
{
|
|
||||||
|
|
||||||
if (!cmd || (
|
|
||||||
strnicmp (cmd, "menu_", 5) &&
|
|
||||||
stricmp (cmd, "toggleconsole") &&
|
|
||||||
stricmp (cmd, "sizeup") &&
|
|
||||||
stricmp (cmd, "sizedown") &&
|
|
||||||
stricmp (cmd, "togglemap") &&
|
|
||||||
stricmp (cmd, "spynext") &&
|
|
||||||
stricmp (cmd, "spyprev") &&
|
|
||||||
stricmp (cmd, "chase") &&
|
|
||||||
stricmp (cmd, "+showscores") &&
|
|
||||||
stricmp (cmd, "bumpgamma") &&
|
|
||||||
stricmp (cmd, "screenshot")))
|
|
||||||
{
|
|
||||||
M_StartControlPanel(true);
|
|
||||||
M_SetMenu(NAME_MainMenu, -1);
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
return
|
|
||||||
C_DoKey (ev, &Bindings, &DoubleBindings);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (cmd && cmd[0] == '+')
|
|
||||||
return C_DoKey (ev, &Bindings, &DoubleBindings);
|
|
||||||
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if 0
|
|
||||||
if (gamestate == GS_LEVEL)
|
|
||||||
{
|
|
||||||
if (ST_Responder (ev))
|
|
||||||
return true; // status window ate it
|
|
||||||
if (!viewactive && primaryLevel->automap->Responder (ev, false))
|
|
||||||
return true; // automap ate it
|
|
||||||
}
|
|
||||||
else if (gamestate == GS_FINALE)
|
|
||||||
{
|
|
||||||
if (F_Responder (ev))
|
|
||||||
return true; // finale ate the event
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
switch (ev->type)
|
switch (ev->type)
|
||||||
{
|
{
|
||||||
case EV_KeyDown:
|
case EV_KeyDown:
|
||||||
|
@ -116,10 +73,11 @@ bool G_Responder (event_t *ev)
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
// [RH] If the view is active, give the automap a chance at
|
|
||||||
// the events *last* so that any bound keys get precedence.
|
|
||||||
|
|
||||||
#if 0
|
#if 0
|
||||||
|
// [RH] If the view is active, give the automap a chance at
|
||||||
|
// the events *last* so that any bound keys get precedence.
|
||||||
|
// An option for later. Currently the automap is insufficiently separated from the game loop
|
||||||
if (gamestate == GS_LEVEL && viewactive && primaryLevel->automap)
|
if (gamestate == GS_LEVEL && viewactive && primaryLevel->automap)
|
||||||
return primaryLevel->automap->Responder (ev, true);
|
return primaryLevel->automap->Responder (ev, true);
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -1,36 +1,6 @@
|
||||||
//-----------------------------------------------------------------------------
|
#pragma once
|
||||||
//
|
|
||||||
// Copyright 1993-1996 id Software
|
|
||||||
// Copyright 1999-2016 Randy Heit
|
|
||||||
// Copyright 2002-2016 Christoph Oelckers
|
|
||||||
//
|
|
||||||
// This program 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 3 of the License, or
|
|
||||||
// (at your option) any later version.
|
|
||||||
//
|
|
||||||
// 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, see http://www.gnu.org/licenses/
|
|
||||||
//
|
|
||||||
//-----------------------------------------------------------------------------
|
|
||||||
|
|
||||||
|
|
||||||
#ifndef __D_EVENT_H__
|
|
||||||
#define __D_EVENT_H__
|
|
||||||
|
|
||||||
|
|
||||||
#include <functional>
|
#include <functional>
|
||||||
|
|
||||||
|
|
||||||
//
|
|
||||||
// Event handling.
|
|
||||||
//
|
|
||||||
|
|
||||||
// Input event types.
|
// Input event types.
|
||||||
enum EGenericEvent
|
enum EGenericEvent
|
||||||
{
|
{
|
||||||
|
@ -61,10 +31,6 @@ void D_PostEvent (const event_t* ev);
|
||||||
void D_RemoveNextCharEvent();
|
void D_RemoveNextCharEvent();
|
||||||
void D_ProcessEvents(void);
|
void D_ProcessEvents(void);
|
||||||
|
|
||||||
|
|
||||||
//
|
|
||||||
// GLOBAL VARIABLES
|
|
||||||
//
|
|
||||||
enum
|
enum
|
||||||
{
|
{
|
||||||
NUM_EVENTS = 128
|
NUM_EVENTS = 128
|
||||||
|
@ -72,5 +38,3 @@ enum
|
||||||
|
|
||||||
extern event_t events[NUM_EVENTS];
|
extern event_t events[NUM_EVENTS];
|
||||||
|
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
|
@ -1,29 +1,11 @@
|
||||||
//-----------------------------------------------------------------------------
|
/*
|
||||||
//
|
**
|
||||||
// Copyright 1993-1996 id Software
|
** music.cpp
|
||||||
// Copyright 1999-2016 Randy Heit
|
**
|
||||||
// Copyright 2002-2016 Christoph Oelckers
|
** music engine - borrowed from GZDoom
|
||||||
//
|
**
|
||||||
// This program is free software: you can redistribute it and/or modify
|
** Copyright 1999-2016 Randy Heit
|
||||||
// it under the terms of the GNU General Public License as published by
|
** Copyright 2002-2016 Christoph Oelckers
|
||||||
// the Free Software Foundation, either version 3 of the License, or
|
|
||||||
// (at your option) any later version.
|
|
||||||
//
|
|
||||||
// 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, see http://www.gnu.org/licenses/
|
|
||||||
//
|
|
||||||
//-----------------------------------------------------------------------------
|
|
||||||
//
|
|
||||||
// DESCRIPTION: none
|
|
||||||
//
|
|
||||||
//-----------------------------------------------------------------------------
|
|
||||||
|
|
||||||
/* For code that originates from ZDoom the following applies:
|
|
||||||
**
|
**
|
||||||
**---------------------------------------------------------------------------
|
**---------------------------------------------------------------------------
|
||||||
**
|
**
|
||||||
|
|
Loading…
Reference in a new issue