Skip to content

Commit

Permalink
Merge branch 'master' into openal
Browse files Browse the repository at this point in the history
  • Loading branch information
Christoph Oelckers committed Apr 24, 2015
2 parents 98b2475 + 920a4fb commit 1f2a431
Show file tree
Hide file tree
Showing 318 changed files with 7,797 additions and 5,873 deletions.
8 changes: 6 additions & 2 deletions CMakeLists.txt
Expand Up @@ -2,8 +2,12 @@ cmake_minimum_required( VERSION 2.4 )
project(ZDoom)

if( COMMAND cmake_policy )
cmake_policy( SET CMP0011 NEW )
cmake_policy( SET CMP0054 NEW )
if( POLICY CMP0011 )
cmake_policy( SET CMP0011 NEW )
endif( POLICY CMP0011 )
if( POLICY CMP0054 )
cmake_policy( SET CMP0054 NEW )
endif( POLICY CMP0054 )
endif( COMMAND cmake_policy )

list( APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR} )
Expand Down
4 changes: 3 additions & 1 deletion CreateLaunchers.cmake
Expand Up @@ -44,7 +44,9 @@ if(__create_launchers)
endif()
set(__create_launchers YES)

cmake_policy( SET CMP0026 OLD )
if( POLICY CMP0026 )
cmake_policy( SET CMP0026 OLD )
endif( POLICY CMP0026 )

include(CleanDirectoryList)

Expand Down
5 changes: 5 additions & 0 deletions specs/udmf_zdoom.txt
Expand Up @@ -119,6 +119,7 @@ Note: All <bool> fields default to false unless mentioned otherwise.
blockhitscan = <bool>; // Line blocks hitscan attacks
locknumber = <int>; // Line special is locked
arg0str = <string>; // Alternate string-based version of arg0
moreids = <string>; // Additional line IDs, specified as a space separated list of numbers (e.g. "2 666 1003 4505")

transparent = <bool>; // true = line is a Strife transparent line (alpha 0.25)

Expand Down Expand Up @@ -201,6 +202,7 @@ Note: All <bool> fields default to false unless mentioned otherwise.
// sound sequence thing in the sector will override this property.
hidden = <bool>; // if true this sector will not be drawn on the textured automap.
waterzone = <bool>; // Sector is under water and swimmable
moreids = <string>; // Additional sector IDs/tags, specified as a space separated list of numbers (e.g. "2 666 1003 4505")

* Note about dropactors

Expand Down Expand Up @@ -370,6 +372,9 @@ Added transparent line property (to be folded back to core UDMF standard), and h
Added plane equations for sector slopes. (Please read carefully to ensure proper use!)
Changed language describing the DIALOGUE lump to mention USDF as an option.

1.25 19.04.2015
Added 'moreids' for linedefs and sectors.

===============================================================================
EOF
===============================================================================
3 changes: 3 additions & 0 deletions src/CMakeLists.txt
Expand Up @@ -783,6 +783,7 @@ set( NOT_COMPILED_SOURCE_FILES
g_hexen/a_fighterquietus.cpp
g_hexen/a_firedemon.cpp
g_hexen/a_flechette.cpp
g_hexen/a_flies.cpp
g_hexen/a_fog.cpp
g_hexen/a_healingradius.cpp
g_hexen/a_heresiarch.cpp
Expand Down Expand Up @@ -875,6 +876,7 @@ add_executable( zdoom WIN32 MACOSX_BUNDLE
f_wipe.cpp
farchive.cpp
files.cpp
g_doomedmap.cpp
g_game.cpp
g_hub.cpp
g_level.cpp
Expand Down Expand Up @@ -935,6 +937,7 @@ add_executable( zdoom WIN32 MACOSX_BUNDLE
p_spec.cpp
p_states.cpp
p_switch.cpp
p_tags.cpp
p_teleport.cpp
p_terrain.cpp
p_things.cpp
Expand Down
2 changes: 1 addition & 1 deletion src/actor.h
Expand Up @@ -1035,7 +1035,7 @@ class AActor : public DThinker
virtual bool UpdateWaterLevel (fixed_t oldz, bool splash=true);
bool isFast();
bool isSlow();
void SetIdle();
void SetIdle(bool nofunction=false);
void ClearCounters();
FState *GetRaiseState();
void Revive();
Expand Down
208 changes: 27 additions & 181 deletions src/c_bind.cpp
Expand Up @@ -43,158 +43,11 @@
#include "configfile.h"
#include "i_system.h"
#include "d_event.h"
#include "w_wad.h"

#include <math.h>
#include <stdlib.h>

/* Default keybindings for Doom (and all other games)
*/
static const FBinding DefBindings[] =
{
{ "`", "toggleconsole" },
{ "1", "slot 1" },
{ "2", "slot 2" },
{ "3", "slot 3" },
{ "4", "slot 4" },
{ "5", "slot 5" },
{ "6", "slot 6" },
{ "7", "slot 7" },
{ "8", "slot 8" },
{ "9", "slot 9" },
{ "0", "slot 0" },
{ "[", "invprev" },
{ "]", "invnext" },
{ "mwheelleft", "invprev" },
{ "mwheelright", "invnext" },
{ "enter", "invuse" },
{ "-", "sizedown" },
{ "=", "sizeup" },
{ "ctrl", "+attack" },
{ "alt", "+strafe" },
{ "shift", "+speed" },
{ "space", "+use" },
{ "rightarrow", "+right" },
{ "leftarrow", "+left" },
{ "uparrow", "+forward" },
{ "downarrow", "+back" },
{ ",", "+moveleft" },
{ ".", "+moveright" },
{ "mouse1", "+attack" },
{ "mouse2", "+strafe" },
{ "mouse3", "+forward" },
{ "mouse4", "+speed" },
{ "capslock", "toggle cl_run" },
{ "f1", "menu_help" },
{ "f2", "menu_save" },
{ "f3", "menu_load" },
{ "f4", "menu_options" },
{ "f5", "menu_display" },
{ "f6", "quicksave" },
{ "f7", "menu_endgame" },
{ "f8", "togglemessages" },
{ "f9", "quickload" },
{ "f11", "bumpgamma" },
{ "f10", "menu_quit" },
{ "tab", "togglemap" },
{ "pause", "pause" },
{ "sysrq", "screenshot" },
{ "t", "messagemode" },
{ "\\", "+showscores" },
{ "f12", "spynext" },
{ "mwheeldown", "weapnext" },
{ "mwheelup", "weapprev" },

// Generic joystick buttons
{ "joy1", "+attack" },
{ "joy2", "+strafe" },
{ "joy3", "+speed" },
{ "joy4", "+use" },

// Xbox 360 / PS2 controllers
{ "pad_a", "+use" },
{ "pad_y", "+jump" },
{ "rtrigger", "+attack" },
{ "ltrigger", "+altattack" },
{ "lshoulder", "weapprev" },
{ "rshoulder", "weapnext" },
{ "dpadleft", "invprev" },
{ "dpadright", "invnext" },
{ "dpaddown", "invuse" },
{ "dpadup", "togglemap" },
{ "pad_start", "pause" },
{ "pad_back", "menu_main" },
{ "lthumb", "crouch" },
{ NULL, NULL }
};

static const FBinding DefRavenBindings[] =
{
{ "pgup", "+moveup" },
{ "ins", "+movedown" },
{ "home", "land" },
{ "pgdn", "+lookup" },
{ "del", "+lookdown" },
{ "end", "centerview" },
{ NULL, NULL }
};

static const FBinding DefHereticBindings[] =
{
{ "backspace", "use ArtiTomeOfPower" },
{ NULL, NULL }
};

static const FBinding DefHexenBindings[] =
{
{ "/", "+jump" },
{ "backspace", "invuseall" },
{ "\\", "use ArtiHealth" },
{ "0", "useflechette" },
{ "9", "use ArtiBlastRadius" },
{ "8", "use ArtiTeleport" },
{ "7", "use ArtiTeleportOther" },
{ "6", "use ArtiPork" },
{ "5", "use ArtiInvulnerability2" },
{ "scroll", "+showscores" },
{ NULL, NULL }
};

static const FBinding DefStrifeBindings[] =
{
{ "a", "+jump" },
{ "w", "showpop 1" },
{ "backspace", "invdrop" },
{ "z", "showpop 3" },
{ "k", "showpop 2" },
{ "q", "invquery" },
{ NULL, NULL }
// not done
// h - use health
};

static const FBinding DefAutomapBindings[] =
{
{ "f", "am_togglefollow" },
{ "g", "am_togglegrid" },
{ "p", "am_toggletexture" },
{ "m", "am_setmark" },
{ "c", "am_clearmarks" },
{ "0", "am_gobig" },
{ "rightarrow", "+am_panright" },
{ "leftarrow", "+am_panleft" },
{ "uparrow", "+am_panup" },
{ "downarrow", "+am_pandown" },
{ "-", "+am_zoomout" },
{ "=", "+am_zoomin" },
{ "kp-", "+am_zoomout" },
{ "kp+", "+am_zoomin" },
{ "mwheelup", "am_zoom 1.2" },
{ "mwheeldown", "am_zoom -1.2" },
{ NULL, NULL }
};



const char *KeyNames[NUM_KEYS] =
{
// This array is dependant on the particular keyboard input
Expand Down Expand Up @@ -452,21 +305,6 @@ void FKeyBindings::DoBind (const char *key, const char *bind)
//
//=============================================================================

void FKeyBindings::SetBinds(const FBinding *binds)
{
while (binds->Key)
{
DoBind (binds->Key, binds->Bind);
binds++;
}
}

//=============================================================================
//
//
//
//=============================================================================

void FKeyBindings::UnbindAll ()
{
for (int i = 0; i < NUM_KEYS; ++i)
Expand Down Expand Up @@ -785,29 +623,37 @@ CCMD (rebind)

void C_BindDefaults ()
{
Bindings.SetBinds (DefBindings);

if (gameinfo.gametype & (GAME_Raven|GAME_Strife))
{
Bindings.SetBinds (DefRavenBindings);
}
int lump, lastlump = 0;

if (gameinfo.gametype == GAME_Heretic)
while ((lump = Wads.FindLump("DEFBINDS", &lastlump)) != -1)
{
Bindings.SetBinds (DefHereticBindings);
}
FScanner sc(lump);

if (gameinfo.gametype == GAME_Hexen)
{
Bindings.SetBinds (DefHexenBindings);
}
while (sc.GetString())
{
FKeyBindings *dest = &Bindings;
int key;

if (gameinfo.gametype == GAME_Strife)
{
Bindings.SetBinds (DefStrifeBindings);
// bind destination is optional and is the same as the console command
if (sc.Compare("bind"))
{
sc.MustGetString();
}
else if (sc.Compare("doublebind"))
{
dest = &DoubleBindings;
sc.MustGetString();
}
else if (sc.Compare("mapbind"))
{
dest = &AutomapBindings;
sc.MustGetString();
}
key = GetConfigKeyFromName(sc.String);
sc.MustGetString();
dest->SetBind(key, sc.String);
}
}

AutomapBindings.SetBinds(DefAutomapBindings);
}

CCMD(binddefaults)
Expand Down
7 changes: 0 additions & 7 deletions src/c_bind.h
Expand Up @@ -42,19 +42,12 @@ class FCommandLine;

void C_NameKeys (char *str, int first, int second);

struct FBinding
{
const char *Key;
const char *Bind;
};

class FKeyBindings
{
FString Binds[NUM_KEYS];

public:
void PerformBind(FCommandLine &argv, const char *msg);
void SetBinds(const FBinding *binds);
bool DoKey(event_t *ev);
void ArchiveBindings(FConfigFile *F, const char *matchcmd = NULL);
int GetKeysForCommand (const char *cmd, int *first, int *second);
Expand Down

0 comments on commit 1f2a431

Please sign in to comment.