mirror of
https://github.com/ZDoom/qzdoom-gpl.git
synced 2024-11-27 22:22:08 +00:00
Merge branch 'master' of https://github.com/rheit/zdoom
This commit is contained in:
commit
1d0706cb61
30 changed files with 439 additions and 434 deletions
208
src/c_bind.cpp
208
src/c_bind.cpp
|
@ -43,158 +43,11 @@
|
||||||
#include "configfile.h"
|
#include "configfile.h"
|
||||||
#include "i_system.h"
|
#include "i_system.h"
|
||||||
#include "d_event.h"
|
#include "d_event.h"
|
||||||
|
#include "w_wad.h"
|
||||||
|
|
||||||
#include <math.h>
|
#include <math.h>
|
||||||
#include <stdlib.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] =
|
const char *KeyNames[NUM_KEYS] =
|
||||||
{
|
{
|
||||||
// This array is dependant on the particular keyboard input
|
// This array is dependant on the particular keyboard input
|
||||||
|
@ -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 ()
|
void FKeyBindings::UnbindAll ()
|
||||||
{
|
{
|
||||||
for (int i = 0; i < NUM_KEYS; ++i)
|
for (int i = 0; i < NUM_KEYS; ++i)
|
||||||
|
@ -785,29 +623,37 @@ CCMD (rebind)
|
||||||
|
|
||||||
void C_BindDefaults ()
|
void C_BindDefaults ()
|
||||||
{
|
{
|
||||||
Bindings.SetBinds (DefBindings);
|
int lump, lastlump = 0;
|
||||||
|
|
||||||
if (gameinfo.gametype & (GAME_Raven|GAME_Strife))
|
while ((lump = Wads.FindLump("DEFBINDS", &lastlump)) != -1)
|
||||||
{
|
{
|
||||||
Bindings.SetBinds (DefRavenBindings);
|
FScanner sc(lump);
|
||||||
}
|
|
||||||
|
|
||||||
if (gameinfo.gametype == GAME_Heretic)
|
while (sc.GetString())
|
||||||
{
|
{
|
||||||
Bindings.SetBinds (DefHereticBindings);
|
FKeyBindings *dest = &Bindings;
|
||||||
}
|
int key;
|
||||||
|
|
||||||
if (gameinfo.gametype == GAME_Hexen)
|
// bind destination is optional and is the same as the console command
|
||||||
{
|
if (sc.Compare("bind"))
|
||||||
Bindings.SetBinds (DefHexenBindings);
|
{
|
||||||
|
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);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (gameinfo.gametype == GAME_Strife)
|
|
||||||
{
|
|
||||||
Bindings.SetBinds (DefStrifeBindings);
|
|
||||||
}
|
|
||||||
|
|
||||||
AutomapBindings.SetBinds(DefAutomapBindings);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
CCMD(binddefaults)
|
CCMD(binddefaults)
|
||||||
|
|
|
@ -42,19 +42,12 @@ class FCommandLine;
|
||||||
|
|
||||||
void C_NameKeys (char *str, int first, int second);
|
void C_NameKeys (char *str, int first, int second);
|
||||||
|
|
||||||
struct FBinding
|
|
||||||
{
|
|
||||||
const char *Key;
|
|
||||||
const char *Bind;
|
|
||||||
};
|
|
||||||
|
|
||||||
class FKeyBindings
|
class FKeyBindings
|
||||||
{
|
{
|
||||||
FString Binds[NUM_KEYS];
|
FString Binds[NUM_KEYS];
|
||||||
|
|
||||||
public:
|
public:
|
||||||
void PerformBind(FCommandLine &argv, const char *msg);
|
void PerformBind(FCommandLine &argv, const char *msg);
|
||||||
void SetBinds(const FBinding *binds);
|
|
||||||
bool DoKey(event_t *ev);
|
bool DoKey(event_t *ev);
|
||||||
void ArchiveBindings(FConfigFile *F, const char *matchcmd = NULL);
|
void ArchiveBindings(FConfigFile *F, const char *matchcmd = NULL);
|
||||||
int GetKeysForCommand (const char *cmd, int *first, int *second);
|
int GetKeysForCommand (const char *cmd, int *first, int *second);
|
||||||
|
|
|
@ -66,15 +66,13 @@ FConfigFile::FConfigFile ()
|
||||||
//
|
//
|
||||||
//====================================================================
|
//====================================================================
|
||||||
|
|
||||||
FConfigFile::FConfigFile (const char *pathname,
|
FConfigFile::FConfigFile (const char *pathname)
|
||||||
void (*nosechandler)(const char *pathname, FConfigFile *config, void *userdata),
|
|
||||||
void *userdata)
|
|
||||||
{
|
{
|
||||||
Sections = CurrentSection = NULL;
|
Sections = CurrentSection = NULL;
|
||||||
LastSectionPtr = &Sections;
|
LastSectionPtr = &Sections;
|
||||||
CurrentEntry = NULL;
|
CurrentEntry = NULL;
|
||||||
ChangePathName (pathname);
|
ChangePathName (pathname);
|
||||||
LoadConfigFile (nosechandler, userdata);
|
LoadConfigFile ();
|
||||||
OkayToWrite = true;
|
OkayToWrite = true;
|
||||||
FileExisted = true;
|
FileExisted = true;
|
||||||
}
|
}
|
||||||
|
@ -118,8 +116,7 @@ FConfigFile::~FConfigFile ()
|
||||||
delete[] (char *)entry;
|
delete[] (char *)entry;
|
||||||
entry = nextentry;
|
entry = nextentry;
|
||||||
}
|
}
|
||||||
section->~FConfigSection();
|
delete section;
|
||||||
delete[] (char *)section;
|
|
||||||
section = nextsection;
|
section = nextsection;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -140,7 +137,7 @@ FConfigFile &FConfigFile::operator = (const FConfigFile &other)
|
||||||
while (fromsection != NULL)
|
while (fromsection != NULL)
|
||||||
{
|
{
|
||||||
fromentry = fromsection->RootEntry;
|
fromentry = fromsection->RootEntry;
|
||||||
tosection = NewConfigSection (fromsection->Name);
|
tosection = NewConfigSection (fromsection->SectionName);
|
||||||
while (fromentry != NULL)
|
while (fromentry != NULL)
|
||||||
{
|
{
|
||||||
NewConfigEntry (tosection, fromentry->Key, fromentry->Value);
|
NewConfigEntry (tosection, fromentry->Key, fromentry->Value);
|
||||||
|
@ -311,7 +308,7 @@ const char *FConfigFile::GetCurrentSection () const
|
||||||
{
|
{
|
||||||
if (CurrentSection != NULL)
|
if (CurrentSection != NULL)
|
||||||
{
|
{
|
||||||
return CurrentSection->Name;
|
return CurrentSection->SectionName.GetChars();
|
||||||
}
|
}
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
@ -508,13 +505,29 @@ FConfigFile::FConfigSection *FConfigFile::FindSection (const char *name) const
|
||||||
{
|
{
|
||||||
FConfigSection *section = Sections;
|
FConfigSection *section = Sections;
|
||||||
|
|
||||||
while (section != NULL && stricmp (section->Name, name) != 0)
|
while (section != NULL && section->SectionName.CompareNoCase(name) != 0)
|
||||||
{
|
{
|
||||||
section = section->Next;
|
section = section->Next;
|
||||||
}
|
}
|
||||||
return section;
|
return section;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//====================================================================
|
||||||
|
//
|
||||||
|
// FConfigFile :: RenameSection
|
||||||
|
//
|
||||||
|
//====================================================================
|
||||||
|
|
||||||
|
void FConfigFile::RenameSection (const char *oldname, const char *newname) const
|
||||||
|
{
|
||||||
|
FConfigSection *section = FindSection(oldname);
|
||||||
|
|
||||||
|
if (section != NULL)
|
||||||
|
{
|
||||||
|
section->SectionName = newname;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
//====================================================================
|
//====================================================================
|
||||||
//
|
//
|
||||||
// FConfigFile :: FindEntry
|
// FConfigFile :: FindEntry
|
||||||
|
@ -542,19 +555,15 @@ FConfigFile::FConfigEntry *FConfigFile::FindEntry (
|
||||||
FConfigFile::FConfigSection *FConfigFile::NewConfigSection (const char *name)
|
FConfigFile::FConfigSection *FConfigFile::NewConfigSection (const char *name)
|
||||||
{
|
{
|
||||||
FConfigSection *section;
|
FConfigSection *section;
|
||||||
char *memblock;
|
|
||||||
|
|
||||||
section = FindSection (name);
|
section = FindSection (name);
|
||||||
if (section == NULL)
|
if (section == NULL)
|
||||||
{
|
{
|
||||||
size_t namelen = strlen (name);
|
section = new FConfigSection;
|
||||||
memblock = new char[sizeof(*section)+namelen];
|
|
||||||
section = ::new(memblock) FConfigSection;
|
|
||||||
section->RootEntry = NULL;
|
section->RootEntry = NULL;
|
||||||
section->LastEntryPtr = §ion->RootEntry;
|
section->LastEntryPtr = §ion->RootEntry;
|
||||||
section->Next = NULL;
|
section->Next = NULL;
|
||||||
memcpy (section->Name, name, namelen);
|
section->SectionName = name;
|
||||||
section->Name[namelen] = 0;
|
|
||||||
*LastSectionPtr = section;
|
*LastSectionPtr = section;
|
||||||
LastSectionPtr = §ion->Next;
|
LastSectionPtr = §ion->Next;
|
||||||
}
|
}
|
||||||
|
@ -591,7 +600,7 @@ FConfigFile::FConfigEntry *FConfigFile::NewConfigEntry (
|
||||||
//
|
//
|
||||||
//====================================================================
|
//====================================================================
|
||||||
|
|
||||||
void FConfigFile::LoadConfigFile (void (*nosechandler)(const char *pathname, FConfigFile *config, void *userdata), void *userdata)
|
void FConfigFile::LoadConfigFile ()
|
||||||
{
|
{
|
||||||
FILE *file = fopen (PathName, "r");
|
FILE *file = fopen (PathName, "r");
|
||||||
bool succ;
|
bool succ;
|
||||||
|
@ -605,14 +614,6 @@ void FConfigFile::LoadConfigFile (void (*nosechandler)(const char *pathname, FCo
|
||||||
succ = ReadConfig (file);
|
succ = ReadConfig (file);
|
||||||
fclose (file);
|
fclose (file);
|
||||||
FileExisted = succ;
|
FileExisted = succ;
|
||||||
|
|
||||||
if (!succ)
|
|
||||||
{ // First valid line did not define a section
|
|
||||||
if (nosechandler != NULL)
|
|
||||||
{
|
|
||||||
nosechandler (PathName, this, userdata);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//====================================================================
|
//====================================================================
|
||||||
|
@ -787,7 +788,7 @@ bool FConfigFile::WriteConfigFile () const
|
||||||
{
|
{
|
||||||
fputs (section->Note.GetChars(), file);
|
fputs (section->Note.GetChars(), file);
|
||||||
}
|
}
|
||||||
fprintf (file, "[%s]\n", section->Name);
|
fprintf (file, "[%s]\n", section->SectionName.GetChars());
|
||||||
while (entry != NULL)
|
while (entry != NULL)
|
||||||
{
|
{
|
||||||
if (strpbrk(entry->Value, "\r\n") == NULL)
|
if (strpbrk(entry->Value, "\r\n") == NULL)
|
||||||
|
|
|
@ -41,8 +41,7 @@ class FConfigFile
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
FConfigFile ();
|
FConfigFile ();
|
||||||
FConfigFile (const char *pathname,
|
FConfigFile (const char *pathname);
|
||||||
void (*nosechandler)(const char *pathname, FConfigFile *config, void *userdata)=0, void *userdata=NULL);
|
|
||||||
FConfigFile (const FConfigFile &other);
|
FConfigFile (const FConfigFile &other);
|
||||||
virtual ~FConfigFile ();
|
virtual ~FConfigFile ();
|
||||||
|
|
||||||
|
@ -70,7 +69,7 @@ public:
|
||||||
const char *GetPathName () const { return PathName.GetChars(); }
|
const char *GetPathName () const { return PathName.GetChars(); }
|
||||||
void ChangePathName (const char *path);
|
void ChangePathName (const char *path);
|
||||||
|
|
||||||
void LoadConfigFile (void (*nosechandler)(const char *pathname, FConfigFile *config, void *userdata), void *userdata);
|
void LoadConfigFile ();
|
||||||
bool WriteConfigFile () const;
|
bool WriteConfigFile () const;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
@ -79,6 +78,7 @@ protected:
|
||||||
virtual char *ReadLine (char *string, int n, void *file) const;
|
virtual char *ReadLine (char *string, int n, void *file) const;
|
||||||
bool ReadConfig (void *file);
|
bool ReadConfig (void *file);
|
||||||
static const char *GenerateEndTag(const char *value);
|
static const char *GenerateEndTag(const char *value);
|
||||||
|
void RenameSection(const char *oldname, const char *newname) const;
|
||||||
|
|
||||||
bool OkayToWrite;
|
bool OkayToWrite;
|
||||||
bool FileExisted;
|
bool FileExisted;
|
||||||
|
@ -94,11 +94,12 @@ private:
|
||||||
};
|
};
|
||||||
struct FConfigSection
|
struct FConfigSection
|
||||||
{
|
{
|
||||||
|
FString SectionName;
|
||||||
FConfigEntry *RootEntry;
|
FConfigEntry *RootEntry;
|
||||||
FConfigEntry **LastEntryPtr;
|
FConfigEntry **LastEntryPtr;
|
||||||
FConfigSection *Next;
|
FConfigSection *Next;
|
||||||
FString Note;
|
FString Note;
|
||||||
char Name[1]; // + length of name
|
//char Name[1]; // + length of name
|
||||||
};
|
};
|
||||||
|
|
||||||
FConfigSection *Sections;
|
FConfigSection *Sections;
|
||||||
|
|
|
@ -138,12 +138,6 @@ void FIWadManager::ParseIWadInfo(const char *fn, const char *data, int datasize)
|
||||||
sc.MustGetString();
|
sc.MustGetString();
|
||||||
iwad->Autoname = sc.String;
|
iwad->Autoname = sc.String;
|
||||||
}
|
}
|
||||||
else if (sc.Compare("Group"))
|
|
||||||
{
|
|
||||||
sc.MustGetStringName("=");
|
|
||||||
sc.MustGetString();
|
|
||||||
iwad->Group = sc.String;
|
|
||||||
}
|
|
||||||
else if (sc.Compare("Config"))
|
else if (sc.Compare("Config"))
|
||||||
{
|
{
|
||||||
sc.MustGetStringName("=");
|
sc.MustGetStringName("=");
|
||||||
|
@ -393,7 +387,6 @@ int FIWadManager::IdentifyVersion (TArray<FString> &wadfiles, const char *iwad,
|
||||||
bool iwadparmfound = false;
|
bool iwadparmfound = false;
|
||||||
FString custwad;
|
FString custwad;
|
||||||
|
|
||||||
ParseIWadInfos(zdoom_wad);
|
|
||||||
wads.Resize(mIWadNames.Size());
|
wads.Resize(mIWadNames.Size());
|
||||||
foundwads.Resize(mIWads.Size());
|
foundwads.Resize(mIWads.Size());
|
||||||
memset(&foundwads[0], 0, foundwads.Size() * sizeof(foundwads[0]));
|
memset(&foundwads[0], 0, foundwads.Size() * sizeof(foundwads[0]));
|
||||||
|
|
|
@ -1657,7 +1657,7 @@ static const char *BaseFileSearch (const char *file, const char *ext, bool lookf
|
||||||
return wad;
|
return wad;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (GameConfig->SetSection ("FileSearch.Directories"))
|
if (GameConfig != NULL && GameConfig->SetSection ("FileSearch.Directories"))
|
||||||
{
|
{
|
||||||
const char *key;
|
const char *key;
|
||||||
const char *value;
|
const char *value;
|
||||||
|
@ -1978,10 +1978,6 @@ static void D_DoomInit()
|
||||||
}
|
}
|
||||||
|
|
||||||
FRandom::StaticClearRandom ();
|
FRandom::StaticClearRandom ();
|
||||||
|
|
||||||
Printf ("M_LoadDefaults: Load system defaults.\n");
|
|
||||||
M_LoadDefaults (); // load before initing other systems
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//==========================================================================
|
//==========================================================================
|
||||||
|
@ -1990,10 +1986,9 @@ static void D_DoomInit()
|
||||||
//
|
//
|
||||||
//==========================================================================
|
//==========================================================================
|
||||||
|
|
||||||
static void AddAutoloadFiles(const char *group, const char *autoname)
|
static void AddAutoloadFiles(const char *autoname)
|
||||||
{
|
{
|
||||||
LumpFilterGroup = group;
|
LumpFilterIWAD.Format("%s.", autoname); // The '.' is appened to simplify parsing the string
|
||||||
LumpFilterIWAD = autoname;
|
|
||||||
|
|
||||||
if (!(gameinfo.flags & GI_SHAREWARE) && !Args->CheckParm("-noautoload"))
|
if (!(gameinfo.flags & GI_SHAREWARE) && !Args->CheckParm("-noautoload"))
|
||||||
{
|
{
|
||||||
|
@ -2025,25 +2020,14 @@ static void AddAutoloadFiles(const char *group, const char *autoname)
|
||||||
// Add common (global) wads
|
// Add common (global) wads
|
||||||
D_AddConfigWads (allwads, "Global.Autoload");
|
D_AddConfigWads (allwads, "Global.Autoload");
|
||||||
|
|
||||||
// Add game-specific wads
|
long len;
|
||||||
file = gameinfo.ConfigName;
|
int lastpos = -1;
|
||||||
file += ".Autoload";
|
|
||||||
D_AddConfigWads (allwads, file);
|
|
||||||
|
|
||||||
// Add group-specific wads
|
while ((len = LumpFilterIWAD.IndexOf('.', lastpos+1)) > 0)
|
||||||
if (group != NULL)
|
|
||||||
{
|
|
||||||
file = group;
|
|
||||||
file += ".Autoload";
|
|
||||||
D_AddConfigWads(allwads, file);
|
|
||||||
}
|
|
||||||
|
|
||||||
// Add IWAD-specific wads
|
|
||||||
if (autoname != NULL)
|
|
||||||
{
|
{
|
||||||
file = autoname;
|
file = LumpFilterIWAD.Left(len) + ".Autoload";
|
||||||
file += ".Autoload";
|
|
||||||
D_AddConfigWads(allwads, file);
|
D_AddConfigWads(allwads, file);
|
||||||
|
lastpos = len;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -2215,7 +2199,8 @@ void D_DoomMain (void)
|
||||||
DArgs *execFiles;
|
DArgs *execFiles;
|
||||||
TArray<FString> pwads;
|
TArray<FString> pwads;
|
||||||
FString *args;
|
FString *args;
|
||||||
int argcount;
|
int argcount;
|
||||||
|
FIWadManager *iwad_man;
|
||||||
|
|
||||||
// +logfile gets checked too late to catch the full startup log in the logfile so do some extra check for it here.
|
// +logfile gets checked too late to catch the full startup log in the logfile so do some extra check for it here.
|
||||||
FString logfile = Args->TakeValue("+logfile");
|
FString logfile = Args->TakeValue("+logfile");
|
||||||
|
@ -2245,8 +2230,6 @@ void D_DoomMain (void)
|
||||||
}
|
}
|
||||||
|
|
||||||
D_DoomInit();
|
D_DoomInit();
|
||||||
PClass::StaticInit ();
|
|
||||||
atterm(FinalGC);
|
|
||||||
|
|
||||||
// [RH] Make sure zdoom.pk3 is always loaded,
|
// [RH] Make sure zdoom.pk3 is always loaded,
|
||||||
// as it contains magic stuff we need.
|
// as it contains magic stuff we need.
|
||||||
|
@ -2258,6 +2241,14 @@ void D_DoomMain (void)
|
||||||
}
|
}
|
||||||
FString basewad = wad;
|
FString basewad = wad;
|
||||||
|
|
||||||
|
iwad_man = new FIWadManager;
|
||||||
|
iwad_man->ParseIWadInfos(basewad);
|
||||||
|
|
||||||
|
Printf ("M_LoadDefaults: Load system defaults.\n");
|
||||||
|
M_LoadDefaults (iwad_man); // load before initing other systems
|
||||||
|
|
||||||
|
PClass::StaticInit ();
|
||||||
|
atterm(FinalGC);
|
||||||
|
|
||||||
// reinit from here
|
// reinit from here
|
||||||
|
|
||||||
|
@ -2279,7 +2270,11 @@ void D_DoomMain (void)
|
||||||
// restart is initiated without a defined IWAD assume for now that it's not going to change.
|
// restart is initiated without a defined IWAD assume for now that it's not going to change.
|
||||||
if (iwad.IsEmpty()) iwad = lastIWAD;
|
if (iwad.IsEmpty()) iwad = lastIWAD;
|
||||||
|
|
||||||
FIWadManager *iwad_man = new FIWadManager;
|
if (iwad_man == NULL)
|
||||||
|
{
|
||||||
|
iwad_man = new FIWadManager;
|
||||||
|
iwad_man->ParseIWadInfos(basewad);
|
||||||
|
}
|
||||||
const FIWADInfo *iwad_info = iwad_man->FindIWAD(allwads, iwad, basewad);
|
const FIWADInfo *iwad_info = iwad_man->FindIWAD(allwads, iwad, basewad);
|
||||||
gameinfo.gametype = iwad_info->gametype;
|
gameinfo.gametype = iwad_info->gametype;
|
||||||
gameinfo.flags = iwad_info->flags;
|
gameinfo.flags = iwad_info->flags;
|
||||||
|
@ -2294,7 +2289,7 @@ void D_DoomMain (void)
|
||||||
FBaseCVar::DisableCallbacks();
|
FBaseCVar::DisableCallbacks();
|
||||||
GameConfig->DoGameSetup (gameinfo.ConfigName);
|
GameConfig->DoGameSetup (gameinfo.ConfigName);
|
||||||
|
|
||||||
AddAutoloadFiles(iwad_info->Group, iwad_info->Autoname);
|
AddAutoloadFiles(iwad_info->Autoname);
|
||||||
|
|
||||||
// Run automatically executed files
|
// Run automatically executed files
|
||||||
execFiles = new DArgs;
|
execFiles = new DArgs;
|
||||||
|
@ -2324,6 +2319,8 @@ void D_DoomMain (void)
|
||||||
allwads.ShrinkToFit();
|
allwads.ShrinkToFit();
|
||||||
SetMapxxFlag();
|
SetMapxxFlag();
|
||||||
|
|
||||||
|
GameConfig->DoKeySetup(gameinfo.ConfigName);
|
||||||
|
|
||||||
// Now that wads are loaded, define mod-specific cvars.
|
// Now that wads are loaded, define mod-specific cvars.
|
||||||
ParseCVarInfo();
|
ParseCVarInfo();
|
||||||
|
|
||||||
|
@ -2496,6 +2493,7 @@ void D_DoomMain (void)
|
||||||
FBaseCVar::EnableNoSet ();
|
FBaseCVar::EnableNoSet ();
|
||||||
|
|
||||||
delete iwad_man; // now we won't need this anymore
|
delete iwad_man; // now we won't need this anymore
|
||||||
|
iwad_man = NULL;
|
||||||
|
|
||||||
// [RH] Run any saved commands from the command line or autoexec.cfg now.
|
// [RH] Run any saved commands from the command line or autoexec.cfg now.
|
||||||
gamestate = GS_FULLCONSOLE;
|
gamestate = GS_FULLCONSOLE;
|
||||||
|
|
17
src/d_main.h
17
src/d_main.h
|
@ -75,7 +75,6 @@ struct FIWADInfo
|
||||||
{
|
{
|
||||||
FString Name; // Title banner text for this IWAD
|
FString Name; // Title banner text for this IWAD
|
||||||
FString Autoname; // Name of autoload ini section for this IWAD
|
FString Autoname; // Name of autoload ini section for this IWAD
|
||||||
FString Group; // Groupname for this IWAD
|
|
||||||
FString Configname; // Name of config section for this IWAD
|
FString Configname; // Name of config section for this IWAD
|
||||||
FString Required; // Requires another IWAD
|
FString Required; // Requires another IWAD
|
||||||
DWORD FgColor; // Foreground color for title banner
|
DWORD FgColor; // Foreground color for title banner
|
||||||
|
@ -116,15 +115,13 @@ extern FStartupInfo DoomStartupInfo;
|
||||||
//
|
//
|
||||||
//==========================================================================
|
//==========================================================================
|
||||||
|
|
||||||
struct FIWadManager
|
class FIWadManager
|
||||||
{
|
{
|
||||||
private:
|
|
||||||
TArray<FIWADInfo> mIWads;
|
TArray<FIWADInfo> mIWads;
|
||||||
TArray<FString> mIWadNames;
|
TArray<FString> mIWadNames;
|
||||||
TArray<int> mLumpsFound;
|
TArray<int> mLumpsFound;
|
||||||
|
|
||||||
void ParseIWadInfo(const char *fn, const char *data, int datasize);
|
void ParseIWadInfo(const char *fn, const char *data, int datasize);
|
||||||
void ParseIWadInfos(const char *fn);
|
|
||||||
void ClearChecks();
|
void ClearChecks();
|
||||||
void CheckLumpName(const char *name);
|
void CheckLumpName(const char *name);
|
||||||
int GetIWadInfo();
|
int GetIWadInfo();
|
||||||
|
@ -132,7 +129,19 @@ private:
|
||||||
int CheckIWAD (const char *doomwaddir, WadStuff *wads);
|
int CheckIWAD (const char *doomwaddir, WadStuff *wads);
|
||||||
int IdentifyVersion (TArray<FString> &wadfiles, const char *iwad, const char *zdoom_wad);
|
int IdentifyVersion (TArray<FString> &wadfiles, const char *iwad, const char *zdoom_wad);
|
||||||
public:
|
public:
|
||||||
|
void ParseIWadInfos(const char *fn);
|
||||||
const FIWADInfo *FindIWAD(TArray<FString> &wadfiles, const char *iwad, const char *basewad);
|
const FIWADInfo *FindIWAD(TArray<FString> &wadfiles, const char *iwad, const char *basewad);
|
||||||
|
const FString *GetAutoname(unsigned int num) const
|
||||||
|
{
|
||||||
|
if (num < mIWads.Size()) return &mIWads[num].Autoname;
|
||||||
|
else return NULL;
|
||||||
|
}
|
||||||
|
int GetIWadFlags(unsigned int num) const
|
||||||
|
{
|
||||||
|
if (num < mIWads.Size()) return mIWads[num].flags;
|
||||||
|
else return false;
|
||||||
|
}
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -69,4 +69,4 @@ int SinglePlayerClass[MAXPLAYERS];
|
||||||
bool ToggleFullscreen;
|
bool ToggleFullscreen;
|
||||||
int BorderTopRefresh;
|
int BorderTopRefresh;
|
||||||
|
|
||||||
FString LumpFilterGroup, LumpFilterIWAD;
|
FString LumpFilterIWAD;
|
||||||
|
|
|
@ -251,6 +251,6 @@ EXTERN_CVAR (Int, compatflags2);
|
||||||
extern int i_compatflags, i_compatflags2, ii_compatflags, ii_compatflags2, ib_compatflags;
|
extern int i_compatflags, i_compatflags2, ii_compatflags, ii_compatflags2, ib_compatflags;
|
||||||
|
|
||||||
// Filters from AddAutoloadFiles(). Used to filter files from archives.
|
// Filters from AddAutoloadFiles(). Used to filter files from archives.
|
||||||
extern FString LumpFilterGroup, LumpFilterIWAD;
|
extern FString LumpFilterIWAD;
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -61,6 +61,7 @@ extern HWND Window;
|
||||||
#include "doomstat.h"
|
#include "doomstat.h"
|
||||||
#include "i_system.h"
|
#include "i_system.h"
|
||||||
#include "gi.h"
|
#include "gi.h"
|
||||||
|
#include "d_main.h"
|
||||||
|
|
||||||
EXTERN_CVAR (Bool, con_centernotify)
|
EXTERN_CVAR (Bool, con_centernotify)
|
||||||
EXTERN_CVAR (Int, msg0color)
|
EXTERN_CVAR (Int, msg0color)
|
||||||
|
@ -75,7 +76,7 @@ EXTERN_CVAR (Color, am_cdwallcolor)
|
||||||
EXTERN_CVAR (Float, spc_amp)
|
EXTERN_CVAR (Float, spc_amp)
|
||||||
EXTERN_CVAR (Bool, wi_percents)
|
EXTERN_CVAR (Bool, wi_percents)
|
||||||
|
|
||||||
FGameConfigFile::FGameConfigFile ()
|
FGameConfigFile::FGameConfigFile (FIWadManager *iwad_man)
|
||||||
{
|
{
|
||||||
#ifdef __APPLE__
|
#ifdef __APPLE__
|
||||||
FString user_docs, user_app_support, local_app_support;
|
FString user_docs, user_app_support, local_app_support;
|
||||||
|
@ -83,16 +84,10 @@ FGameConfigFile::FGameConfigFile ()
|
||||||
FString pathname;
|
FString pathname;
|
||||||
|
|
||||||
OkayToWrite = false; // Do not allow saving of the config before DoGameSetup()
|
OkayToWrite = false; // Do not allow saving of the config before DoGameSetup()
|
||||||
bMigrating = false;
|
|
||||||
bModSetup = false;
|
bModSetup = false;
|
||||||
pathname = GetConfigPath (true);
|
pathname = GetConfigPath (true);
|
||||||
ChangePathName (pathname);
|
ChangePathName (pathname);
|
||||||
LoadConfigFile (MigrateStub, NULL);
|
LoadConfigFile ();
|
||||||
|
|
||||||
if (!HaveSections ())
|
|
||||||
{ // Config file not found; try the old one
|
|
||||||
MigrateOldConfig ();
|
|
||||||
}
|
|
||||||
|
|
||||||
// If zdoom.ini was read from the program directory, switch
|
// If zdoom.ini was read from the program directory, switch
|
||||||
// to the user directory now. If it was read from the user
|
// to the user directory now. If it was read from the user
|
||||||
|
@ -169,28 +164,49 @@ FGameConfigFile::FGameConfigFile ()
|
||||||
// Create auto-load sections, so users know what's available.
|
// Create auto-load sections, so users know what's available.
|
||||||
// Note that this totem pole is the reverse of the order that
|
// Note that this totem pole is the reverse of the order that
|
||||||
// they will appear in the file.
|
// they will appear in the file.
|
||||||
CreateSectionAtStart("Harmony.Autoload");
|
|
||||||
CreateSectionAtStart("UrbanBrawl.Autoload");
|
double last = 0;
|
||||||
CreateSectionAtStart("Chex3.Autoload");
|
if (SetSection ("LastRun"))
|
||||||
CreateSectionAtStart("Chex1.Autoload");
|
{
|
||||||
CreateSectionAtStart("Chex.Autoload");
|
const char *lastver = GetValueForKey ("Version");
|
||||||
CreateSectionAtStart("Strife.Autoload");
|
if (lastver != NULL) last = atof(lastver);
|
||||||
CreateSectionAtStart("HexenDK.Autoload");
|
}
|
||||||
CreateSectionAtStart("Hexen.Autoload");
|
|
||||||
CreateSectionAtStart("HereticSR.Autoload");
|
if (last < 211)
|
||||||
CreateSectionAtStart("Heretic.Autoload");
|
{
|
||||||
CreateSectionAtStart("FreeDM.Autoload");
|
RenameSection("Chex3.Autoload", "chex.chex3.Autoload");
|
||||||
CreateSectionAtStart("Freedoom2.Autoload");
|
RenameSection("Chex1.Autoload", "chex.chex1.Autoload");
|
||||||
CreateSectionAtStart("Freedoom1.Autoload");
|
RenameSection("HexenDK.Autoload", "hexen.deathkings.Autoload");
|
||||||
CreateSectionAtStart("Freedoom.Autoload");
|
RenameSection("HereticSR.Autoload", "heretic.shadow.Autoload");
|
||||||
CreateSectionAtStart("Plutonia.Autoload");
|
RenameSection("FreeDM.Autoload", "doom.freedoom.freedm.Autoload");
|
||||||
CreateSectionAtStart("TNT.Autoload");
|
RenameSection("Freedoom2.Autoload", "doom.freedoom.phase2.Autoload");
|
||||||
CreateSectionAtStart("Doom2BFG.Autoload");
|
RenameSection("Freedoom1.Autoload", "doom.freedoom.phase1.Autoload");
|
||||||
CreateSectionAtStart("Doom2.Autoload");
|
RenameSection("Freedoom.Autoload", "doom.freedoom.Autoload");
|
||||||
CreateSectionAtStart("DoomBFG.Autoload");
|
RenameSection("DoomBFG.Autoload", "doom.doom1.bfg.Autoload");
|
||||||
CreateSectionAtStart("DoomU.Autoload");
|
RenameSection("DoomU.Autoload", "doom.doom1.ultimate.Autoload");
|
||||||
CreateSectionAtStart("Doom1.Autoload");
|
RenameSection("Doom1.Autoload", "doom.doom1.registered.Autoload");
|
||||||
CreateSectionAtStart("Doom.Autoload");
|
RenameSection("TNT.Autoload", "doom.doom2.tnt.Autoload");
|
||||||
|
RenameSection("Plutonia.Autoload", "doom.doom2.plutonia.Autoload");
|
||||||
|
RenameSection("Doom2BFG.Autoload", "doom.doom2.bfg.Autoload");
|
||||||
|
RenameSection("Doom2.Autoload", "doom.doom2.commercial.Autoload");
|
||||||
|
}
|
||||||
|
const FString *pAuto;
|
||||||
|
for (int num = 0; (pAuto = iwad_man->GetAutoname(num)) != NULL; num++)
|
||||||
|
{
|
||||||
|
if (!(iwad_man->GetIWadFlags(num) & GI_SHAREWARE)) // we do not want autoload sections for shareware IWADs (which may have an autoname for resource filtering)
|
||||||
|
{
|
||||||
|
FString workname = *pAuto;
|
||||||
|
|
||||||
|
while (workname.IsNotEmpty())
|
||||||
|
{
|
||||||
|
FString section = workname + ".Autoload";
|
||||||
|
CreateSectionAtStart(section.GetChars());
|
||||||
|
long dotpos = workname.LastIndexOf('.');
|
||||||
|
if (dotpos < 0) break;
|
||||||
|
workname.Truncate(dotpos);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
CreateSectionAtStart("Global.Autoload");
|
CreateSectionAtStart("Global.Autoload");
|
||||||
|
|
||||||
// The same goes for auto-exec files.
|
// The same goes for auto-exec files.
|
||||||
|
@ -237,18 +253,6 @@ void FGameConfigFile::WriteCommentHeader (FILE *file) const
|
||||||
fprintf (file, "# This file was generated by " GAMENAME " %s on %s\n", GetVersionString(), myasctime());
|
fprintf (file, "# This file was generated by " GAMENAME " %s on %s\n", GetVersionString(), myasctime());
|
||||||
}
|
}
|
||||||
|
|
||||||
void FGameConfigFile::MigrateStub (const char *pathname, FConfigFile *config, void *userdata)
|
|
||||||
{
|
|
||||||
static_cast<FGameConfigFile *>(config)->bMigrating = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
void FGameConfigFile::MigrateOldConfig ()
|
|
||||||
{
|
|
||||||
// Set default key bindings. These will be overridden
|
|
||||||
// by the bindings in the config file if it exists.
|
|
||||||
C_SetDefaultBindings ();
|
|
||||||
}
|
|
||||||
|
|
||||||
void FGameConfigFile::DoGlobalSetup ()
|
void FGameConfigFile::DoGlobalSetup ()
|
||||||
{
|
{
|
||||||
if (SetSection ("GlobalSettings.Unknown"))
|
if (SetSection ("GlobalSettings.Unknown"))
|
||||||
|
@ -361,10 +365,6 @@ void FGameConfigFile::DoGameSetup (const char *gamename)
|
||||||
const char *key;
|
const char *key;
|
||||||
const char *value;
|
const char *value;
|
||||||
|
|
||||||
if (bMigrating)
|
|
||||||
{
|
|
||||||
MigrateOldConfig ();
|
|
||||||
}
|
|
||||||
sublen = countof(section) - 1 - mysnprintf (section, countof(section), "%s.", gamename);
|
sublen = countof(section) - 1 - mysnprintf (section, countof(section), "%s.", gamename);
|
||||||
subsection = section + countof(section) - sublen - 1;
|
subsection = section + countof(section) - sublen - 1;
|
||||||
section[countof(section) - 1] = '\0';
|
section[countof(section) - 1] = '\0';
|
||||||
|
@ -400,41 +400,6 @@ void FGameConfigFile::DoGameSetup (const char *gamename)
|
||||||
ReadCVars (0);
|
ReadCVars (0);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!bMigrating)
|
|
||||||
{
|
|
||||||
C_SetDefaultBindings ();
|
|
||||||
}
|
|
||||||
|
|
||||||
strncpy (subsection, "Bindings", sublen);
|
|
||||||
if (SetSection (section))
|
|
||||||
{
|
|
||||||
Bindings.UnbindAll();
|
|
||||||
while (NextInSection (key, value))
|
|
||||||
{
|
|
||||||
Bindings.DoBind (key, value);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
strncpy (subsection, "DoubleBindings", sublen);
|
|
||||||
if (SetSection (section))
|
|
||||||
{
|
|
||||||
DoubleBindings.UnbindAll();
|
|
||||||
while (NextInSection (key, value))
|
|
||||||
{
|
|
||||||
DoubleBindings.DoBind (key, value);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
strncpy (subsection, "AutomapBindings", sublen);
|
|
||||||
if (SetSection (section))
|
|
||||||
{
|
|
||||||
AutomapBindings.UnbindAll();
|
|
||||||
while (NextInSection (key, value))
|
|
||||||
{
|
|
||||||
AutomapBindings.DoBind (key, value);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
strncpy (subsection, "ConsoleAliases", sublen);
|
strncpy (subsection, "ConsoleAliases", sublen);
|
||||||
if (SetSection (section))
|
if (SetSection (section))
|
||||||
{
|
{
|
||||||
|
@ -455,6 +420,39 @@ void FGameConfigFile::DoGameSetup (const char *gamename)
|
||||||
OkayToWrite = true;
|
OkayToWrite = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Moved from DoGameSetup so that it can happen after wads are loaded
|
||||||
|
void FGameConfigFile::DoKeySetup(const char *gamename)
|
||||||
|
{
|
||||||
|
static const struct { const char *label; FKeyBindings *bindings; } binders[] =
|
||||||
|
{
|
||||||
|
{ "Bindings", &Bindings },
|
||||||
|
{ "DoubleBindings", &DoubleBindings },
|
||||||
|
{ "AutomapBindings", &AutomapBindings },
|
||||||
|
NULL, NULL
|
||||||
|
};
|
||||||
|
const char *key, *value;
|
||||||
|
|
||||||
|
sublen = countof(section) - 1 - mysnprintf(section, countof(section), "%s.", gamename);
|
||||||
|
subsection = section + countof(section) - sublen - 1;
|
||||||
|
section[countof(section) - 1] = '\0';
|
||||||
|
|
||||||
|
C_SetDefaultBindings ();
|
||||||
|
|
||||||
|
for (int i = 0; binders[i].label != NULL; ++i)
|
||||||
|
{
|
||||||
|
strncpy(subsection, binders[i].label, sublen);
|
||||||
|
if (SetSection(section))
|
||||||
|
{
|
||||||
|
FKeyBindings *bindings = binders[i].bindings;
|
||||||
|
bindings->UnbindAll();
|
||||||
|
while (NextInSection(key, value))
|
||||||
|
{
|
||||||
|
bindings->DoBind(key, value);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// Like DoGameSetup(), but for mod-specific cvars.
|
// Like DoGameSetup(), but for mod-specific cvars.
|
||||||
// Called after CVARINFO has been parsed.
|
// Called after CVARINFO has been parsed.
|
||||||
void FGameConfigFile::DoModSetup(const char *gamename)
|
void FGameConfigFile::DoModSetup(const char *gamename)
|
||||||
|
@ -628,41 +626,20 @@ void FGameConfigFile::AddAutoexec (DArgs *list, const char *game)
|
||||||
|
|
||||||
mysnprintf (section, countof(section), "%s.AutoExec", game);
|
mysnprintf (section, countof(section), "%s.AutoExec", game);
|
||||||
|
|
||||||
if (bMigrating)
|
// If <game>.AutoExec section does not exist, create it
|
||||||
|
// with a default autoexec.cfg file present.
|
||||||
|
CreateStandardAutoExec(section, false);
|
||||||
|
// Run any files listed in the <game>.AutoExec section
|
||||||
|
if (!SectionIsEmpty())
|
||||||
{
|
{
|
||||||
FBaseCVar *autoexec = FindCVar ("autoexec", NULL);
|
while (NextInSection (key, value))
|
||||||
|
|
||||||
if (autoexec != NULL)
|
|
||||||
{
|
{
|
||||||
UCVarValue val;
|
if (stricmp (key, "Path") == 0 && *value != '\0')
|
||||||
char *path;
|
|
||||||
|
|
||||||
val = autoexec->GetGenericRep (CVAR_String);
|
|
||||||
path = copystring (val.String);
|
|
||||||
delete autoexec;
|
|
||||||
SetSection (section, true);
|
|
||||||
SetValueForKey ("Path", path);
|
|
||||||
list->AppendArg (path);
|
|
||||||
delete[] path;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
// If <game>.AutoExec section does not exist, create it
|
|
||||||
// with a default autoexec.cfg file present.
|
|
||||||
CreateStandardAutoExec(section, false);
|
|
||||||
// Run any files listed in the <game>.AutoExec section
|
|
||||||
if (!SectionIsEmpty())
|
|
||||||
{
|
|
||||||
while (NextInSection (key, value))
|
|
||||||
{
|
{
|
||||||
if (stricmp (key, "Path") == 0 && *value != '\0')
|
FString expanded_path = ExpandEnvVars(value);
|
||||||
|
if (FileExists(expanded_path))
|
||||||
{
|
{
|
||||||
FString expanded_path = ExpandEnvVars(value);
|
list->AppendArg (ExpandEnvVars(value));
|
||||||
if (FileExists(expanded_path))
|
|
||||||
{
|
|
||||||
list->AppendArg (ExpandEnvVars(value));
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -673,13 +650,6 @@ void FGameConfigFile::SetRavenDefaults (bool isHexen)
|
||||||
{
|
{
|
||||||
UCVarValue val;
|
UCVarValue val;
|
||||||
|
|
||||||
if (bMigrating)
|
|
||||||
{
|
|
||||||
con_centernotify.ResetToDefault ();
|
|
||||||
msg0color.ResetToDefault ();
|
|
||||||
color.ResetToDefault ();
|
|
||||||
}
|
|
||||||
|
|
||||||
val.Bool = false;
|
val.Bool = false;
|
||||||
wi_percents.SetGenericRepDefault (val, CVAR_Bool);
|
wi_percents.SetGenericRepDefault (val, CVAR_Bool);
|
||||||
val.Bool = true;
|
val.Bool = true;
|
||||||
|
|
|
@ -38,15 +38,17 @@
|
||||||
#include "configfile.h"
|
#include "configfile.h"
|
||||||
|
|
||||||
class DArgs;
|
class DArgs;
|
||||||
|
class FIWadManager;
|
||||||
|
|
||||||
class FGameConfigFile : public FConfigFile
|
class FGameConfigFile : public FConfigFile
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
FGameConfigFile ();
|
FGameConfigFile (FIWadManager *iwad_man);
|
||||||
~FGameConfigFile ();
|
~FGameConfigFile ();
|
||||||
|
|
||||||
void DoGlobalSetup ();
|
void DoGlobalSetup ();
|
||||||
void DoGameSetup (const char *gamename);
|
void DoGameSetup (const char *gamename);
|
||||||
|
void DoKeySetup (const char *gamename);
|
||||||
void DoModSetup (const char *gamename);
|
void DoModSetup (const char *gamename);
|
||||||
void ArchiveGlobalData ();
|
void ArchiveGlobalData ();
|
||||||
void ArchiveGameData (const char *gamename);
|
void ArchiveGameData (const char *gamename);
|
||||||
|
@ -59,13 +61,9 @@ protected:
|
||||||
void CreateStandardAutoExec (const char *section, bool start);
|
void CreateStandardAutoExec (const char *section, bool start);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
static void MigrateStub (const char *pathname, FConfigFile *config, void *userdata);
|
|
||||||
|
|
||||||
void MigrateOldConfig ();
|
|
||||||
void SetRavenDefaults (bool isHexen);
|
void SetRavenDefaults (bool isHexen);
|
||||||
void ReadCVars (DWORD flags);
|
void ReadCVars (DWORD flags);
|
||||||
|
|
||||||
bool bMigrating;
|
|
||||||
bool bModSetup;
|
bool bModSetup;
|
||||||
|
|
||||||
char section[64];
|
char section[64];
|
||||||
|
|
|
@ -410,9 +410,9 @@ CCMD (writeini)
|
||||||
// M_LoadDefaults
|
// M_LoadDefaults
|
||||||
//
|
//
|
||||||
|
|
||||||
void M_LoadDefaults ()
|
void M_LoadDefaults (FIWadManager *iwad_man)
|
||||||
{
|
{
|
||||||
GameConfig = new FGameConfigFile;
|
GameConfig = new FGameConfigFile(iwad_man);
|
||||||
GameConfig->DoGlobalSetup ();
|
GameConfig->DoGlobalSetup ();
|
||||||
atterm (M_SaveDefaultsFinal);
|
atterm (M_SaveDefaultsFinal);
|
||||||
}
|
}
|
||||||
|
|
|
@ -28,6 +28,7 @@
|
||||||
|
|
||||||
class FConfigFile;
|
class FConfigFile;
|
||||||
class FGameConfigFile;
|
class FGameConfigFile;
|
||||||
|
class FIWadManager;
|
||||||
|
|
||||||
extern FGameConfigFile *GameConfig;
|
extern FGameConfigFile *GameConfig;
|
||||||
|
|
||||||
|
@ -40,7 +41,7 @@ void M_FindResponseFile (void);
|
||||||
// Pass a NULL to get the original behavior.
|
// Pass a NULL to get the original behavior.
|
||||||
void M_ScreenShot (const char *filename);
|
void M_ScreenShot (const char *filename);
|
||||||
|
|
||||||
void M_LoadDefaults ();
|
void M_LoadDefaults (FIWadManager *iwad_man);
|
||||||
|
|
||||||
bool M_SaveDefaults (const char *filename);
|
bool M_SaveDefaults (const char *filename);
|
||||||
void M_SaveCustomKeys (FConfigFile *config, char *section, char *subsection, size_t sublen);
|
void M_SaveCustomKeys (FConfigFile *config, char *section, char *subsection, size_t sublen);
|
||||||
|
|
|
@ -4617,7 +4617,7 @@ AActor *P_SpawnMapThing (FMapThing *mthing, int position)
|
||||||
}
|
}
|
||||||
|
|
||||||
// copy args to mapthing so that we have them in one place for the rest of this function
|
// copy args to mapthing so that we have them in one place for the rest of this function
|
||||||
if (mentry->Special >= 0)
|
if (mentry->Type != NULL && mentry->Special >= 0)
|
||||||
{
|
{
|
||||||
mthing->special = mentry->Special;
|
mthing->special = mentry->Special;
|
||||||
memcpy(mthing->args, mentry->Args, sizeof(mthing->args));
|
memcpy(mthing->args, mentry->Args, sizeof(mthing->args));
|
||||||
|
|
|
@ -128,6 +128,8 @@ enum
|
||||||
kVK_UpArrow = 0x7E
|
kVK_UpArrow = 0x7E
|
||||||
};
|
};
|
||||||
|
|
||||||
|
static const NSOpenGLPixelFormatAttribute NSOpenGLPFAAllowOfflineRenderers = NSOpenGLPixelFormatAttribute(96);
|
||||||
|
|
||||||
#endif // prior to 10.5
|
#endif // prior to 10.5
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -603,6 +603,15 @@ int I_FindAttr (findstate_t *fileinfo)
|
||||||
|
|
||||||
#ifdef __APPLE__
|
#ifdef __APPLE__
|
||||||
static PasteboardRef s_clipboard;
|
static PasteboardRef s_clipboard;
|
||||||
|
|
||||||
|
static CFDataRef GetPasteboardData(const PasteboardItemID itemID, const CFStringRef flavorType)
|
||||||
|
{
|
||||||
|
CFDataRef data = NULL;
|
||||||
|
|
||||||
|
const OSStatus result = PasteboardCopyItemFlavorData(s_clipboard, itemID, flavorType, &data);
|
||||||
|
|
||||||
|
return noErr == result ? data : NULL;
|
||||||
|
}
|
||||||
#endif // __APPLE__
|
#endif // __APPLE__
|
||||||
|
|
||||||
// Clipboard support requires GTK+
|
// Clipboard support requires GTK+
|
||||||
|
@ -688,35 +697,41 @@ FString I_GetFromClipboard (bool use_primary_selection)
|
||||||
return FString();
|
return FString();
|
||||||
}
|
}
|
||||||
|
|
||||||
CFArrayRef flavorTypeArray;
|
if (CFDataRef data = GetPasteboardData(itemID, kUTTypeUTF8PlainText))
|
||||||
|
|
||||||
if (0 != PasteboardCopyItemFlavors(s_clipboard, itemID, &flavorTypeArray))
|
|
||||||
{
|
{
|
||||||
return FString();
|
const CFIndex bufferLength = CFDataGetLength(data);
|
||||||
|
char* const buffer = result.LockNewBuffer(bufferLength);
|
||||||
|
|
||||||
|
memcpy(buffer, CFDataGetBytePtr(data), bufferLength);
|
||||||
|
|
||||||
|
result.UnlockBuffer();
|
||||||
}
|
}
|
||||||
|
else if (CFDataRef data = GetPasteboardData(itemID, kUTTypeUTF16PlainText))
|
||||||
const CFIndex flavorCount = CFArrayGetCount(flavorTypeArray);
|
|
||||||
|
|
||||||
for (CFIndex flavorIndex = 0; flavorIndex < flavorCount; ++flavorIndex)
|
|
||||||
{
|
{
|
||||||
const CFStringRef flavorType = static_cast<const CFStringRef>(
|
#ifdef __LITTLE_ENDIAN__
|
||||||
CFArrayGetValueAtIndex(flavorTypeArray, flavorIndex));
|
static const CFStringEncoding ENCODING = kCFStringEncodingUTF16LE;
|
||||||
|
#else // __BIG_ENDIAN__
|
||||||
|
static const CFStringEncoding ENCODING = kCFStringEncodingUTF16BE;
|
||||||
|
#endif // __LITTLE_ENDIAN__
|
||||||
|
|
||||||
if (UTTypeConformsTo(flavorType, CFSTR("public.utf8-plain-text")))
|
if (const CFStringRef utf16 = CFStringCreateFromExternalRepresentation(kCFAllocatorDefault, data, ENCODING))
|
||||||
{
|
{
|
||||||
CFDataRef flavorData;
|
const CFRange range = { 0, CFStringGetLength(utf16) };
|
||||||
|
CFIndex bufferLength = 0;
|
||||||
|
|
||||||
if (0 == PasteboardCopyItemFlavorData(s_clipboard, itemID, flavorType, &flavorData))
|
if (CFStringGetBytes(utf16, range, kCFStringEncodingUTF8, '?', false, NULL, 0, &bufferLength) > 0)
|
||||||
{
|
{
|
||||||
result += reinterpret_cast<const char*>(CFDataGetBytePtr(flavorData));
|
UInt8* const buffer = reinterpret_cast<UInt8*>(result.LockNewBuffer(bufferLength));
|
||||||
|
|
||||||
|
CFStringGetBytes(utf16, range, kCFStringEncodingUTF8, '?', false, buffer, bufferLength, NULL);
|
||||||
|
|
||||||
|
result.UnlockBuffer();
|
||||||
}
|
}
|
||||||
|
|
||||||
CFRelease(flavorData);
|
CFRelease(utf16);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
CFRelease(flavorTypeArray);
|
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
#endif
|
#endif
|
||||||
return "";
|
return "";
|
||||||
|
|
|
@ -344,9 +344,17 @@ void FResourceFile::PostProcessArchive(void *lumps, size_t lumpsize)
|
||||||
// in the ini file use. We reduce the maximum lump concidered after
|
// in the ini file use. We reduce the maximum lump concidered after
|
||||||
// each one so that we don't risk refiltering already filtered lumps.
|
// each one so that we don't risk refiltering already filtered lumps.
|
||||||
DWORD max = NumLumps;
|
DWORD max = NumLumps;
|
||||||
max -= FilterLumps(gameinfo.ConfigName, lumps, lumpsize, max);
|
max -= FilterLumpsByGameType(gameinfo.gametype, lumps, lumpsize, max);
|
||||||
max -= FilterLumps(LumpFilterGroup, lumps, lumpsize, max);
|
|
||||||
max -= FilterLumps(LumpFilterIWAD, lumps, lumpsize, max);
|
long len;
|
||||||
|
int lastpos = -1;
|
||||||
|
FString file;
|
||||||
|
|
||||||
|
while ((len = LumpFilterIWAD.IndexOf('.', lastpos+1)) > 0)
|
||||||
|
{
|
||||||
|
max -= FilterLumps(LumpFilterIWAD.Left(len), lumps, lumpsize, max);
|
||||||
|
lastpos = len;
|
||||||
|
}
|
||||||
JunkLeftoverFilters(lumps, lumpsize, max);
|
JunkLeftoverFilters(lumps, lumpsize, max);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -406,6 +414,41 @@ int FResourceFile::FilterLumps(FString filtername, void *lumps, size_t lumpsize,
|
||||||
return end - start;
|
return end - start;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//==========================================================================
|
||||||
|
//
|
||||||
|
// FResourceFile :: FilterLumpsByGameType
|
||||||
|
//
|
||||||
|
// Matches any lumps that match "filter/game-<gametype>/*". Includes
|
||||||
|
// inclusive gametypes like Raven.
|
||||||
|
//
|
||||||
|
//==========================================================================
|
||||||
|
|
||||||
|
int FResourceFile::FilterLumpsByGameType(int type, void *lumps, size_t lumpsize, DWORD max)
|
||||||
|
{
|
||||||
|
static const struct { int match; const char *name; } blanket[] =
|
||||||
|
{
|
||||||
|
{ GAME_Raven, "game-Raven" },
|
||||||
|
{ GAME_DoomStrifeChex, "game-DoomStrifeChex" },
|
||||||
|
{ GAME_DoomChex, "game-DoomChex" },
|
||||||
|
{ GAME_Any, NULL }
|
||||||
|
};
|
||||||
|
if (type == 0)
|
||||||
|
{
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
int count = 0;
|
||||||
|
for (int i = 0; blanket[i].name != NULL; ++i)
|
||||||
|
{
|
||||||
|
if (type & blanket[i].match)
|
||||||
|
{
|
||||||
|
count += FilterLumps(blanket[i].name, lumps, lumpsize, max);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
FString filter = "game-";
|
||||||
|
filter += GameNames[type];
|
||||||
|
return count + FilterLumps(filter, lumps, lumpsize, max);
|
||||||
|
}
|
||||||
|
|
||||||
//==========================================================================
|
//==========================================================================
|
||||||
//
|
//
|
||||||
// FResourceFile :: JunkLeftoverFilters
|
// FResourceFile :: JunkLeftoverFilters
|
||||||
|
|
|
@ -72,6 +72,7 @@ private:
|
||||||
DWORD FirstLump;
|
DWORD FirstLump;
|
||||||
|
|
||||||
int FilterLumps(FString filtername, void *lumps, size_t lumpsize, DWORD max);
|
int FilterLumps(FString filtername, void *lumps, size_t lumpsize, DWORD max);
|
||||||
|
int FilterLumpsByGameType(int gametype, void *lumps, size_t lumpsize, DWORD max);
|
||||||
bool FindPrefixRange(FString filter, void *lumps, size_t lumpsize, DWORD max, DWORD &start, DWORD &end);
|
bool FindPrefixRange(FString filter, void *lumps, size_t lumpsize, DWORD max, DWORD &start, DWORD &end);
|
||||||
void JunkLeftoverFilters(void *lumps, size_t lumpsize, DWORD max);
|
void JunkLeftoverFilters(void *lumps, size_t lumpsize, DWORD max);
|
||||||
|
|
||||||
|
|
|
@ -56,7 +56,7 @@ const char *GetVersionString();
|
||||||
// Version stored in the ini's [LastRun] section.
|
// Version stored in the ini's [LastRun] section.
|
||||||
// Bump it if you made some configuration change that you want to
|
// Bump it if you made some configuration change that you want to
|
||||||
// be able to migrate in FGameConfigFile::DoGlobalSetup().
|
// be able to migrate in FGameConfigFile::DoGlobalSetup().
|
||||||
#define LASTRUNVERSION "210"
|
#define LASTRUNVERSION "211"
|
||||||
|
|
||||||
// Protocol version used in demos.
|
// Protocol version used in demos.
|
||||||
// Bump it if you change existing DEM_ commands or add new ones.
|
// Bump it if you change existing DEM_ commands or add new ones.
|
||||||
|
|
103
wadsrc/static/defbinds.txt
Normal file
103
wadsrc/static/defbinds.txt
Normal file
|
@ -0,0 +1,103 @@
|
||||||
|
/* Default keybindings for all games */
|
||||||
|
|
||||||
|
` 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
|
||||||
|
|
||||||
|
// Originally just for Heretic, Hexen, and Strife.
|
||||||
|
// I can't see why they shouldn't be for Doom or Chex either.
|
||||||
|
pgup +moveup
|
||||||
|
ins +movedown
|
||||||
|
home land
|
||||||
|
pgdn +lookup
|
||||||
|
del +lookdown
|
||||||
|
end centerview
|
||||||
|
|
||||||
|
// 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
|
||||||
|
|
||||||
|
|
||||||
|
/* Default automap bindings */
|
||||||
|
mapbind f am_togglefollow
|
||||||
|
mapbind g am_togglegrid
|
||||||
|
mapbind p am_toggletexture
|
||||||
|
mapbind m am_setmark
|
||||||
|
mapbind c am_clearmarks
|
||||||
|
mapbind 0 am_gobig
|
||||||
|
mapbind rightarrow +am_panright
|
||||||
|
mapbind leftarrow +am_panleft
|
||||||
|
mapbind uparrow +am_panup
|
||||||
|
mapbind downarrow +am_pandown
|
||||||
|
mapbind - +am_zoomout
|
||||||
|
mapbind = +am_zoomin
|
||||||
|
mapbind kp- +am_zoomout
|
||||||
|
mapbind kp+ +am_zoomin
|
||||||
|
mapbind mwheelup "am_zoom 1.2"
|
||||||
|
mapbind mwheeldown "am_zoom -1.2"
|
|
@ -1,3 +1,4 @@
|
||||||
|
|
||||||
/****************************************************************************/
|
/****************************************************************************/
|
||||||
/* */
|
/* */
|
||||||
/* DOOM SOUNDS */
|
/* DOOM SOUNDS */
|
3
wadsrc/static/filter/game-heretic/defbinds.txt
Normal file
3
wadsrc/static/filter/game-heretic/defbinds.txt
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
/* Default keybindings for Heretic */
|
||||||
|
|
||||||
|
backspace "use ArtiTomeOfPower"
|
|
@ -1,3 +1,4 @@
|
||||||
|
|
||||||
/****************************************************************************/
|
/****************************************************************************/
|
||||||
/* */
|
/* */
|
||||||
/* HERETIC SOUNDS */
|
/* HERETIC SOUNDS */
|
12
wadsrc/static/filter/game-hexen/defbinds.txt
Normal file
12
wadsrc/static/filter/game-hexen/defbinds.txt
Normal file
|
@ -0,0 +1,12 @@
|
||||||
|
/* Default keybindings for Hexen */
|
||||||
|
|
||||||
|
/ +jump
|
||||||
|
backspace invuseall
|
||||||
|
\ "use ArtiHealth"
|
||||||
|
0 useflechette
|
||||||
|
9 "use ArtiBlastRadius"
|
||||||
|
8 "use ArtiTeleport"
|
||||||
|
7 "use ArtiTeleportOther"
|
||||||
|
6 "use ArtiPork"
|
||||||
|
5 "use ArtiInvulnerability2"
|
||||||
|
scroll +showscores
|
|
@ -1,3 +1,4 @@
|
||||||
|
|
||||||
/****************************************************************************/
|
/****************************************************************************/
|
||||||
/* */
|
/* */
|
||||||
/* HEXEN SOUNDS */
|
/* HEXEN SOUNDS */
|
11
wadsrc/static/filter/game-strife/defbinds.txt
Normal file
11
wadsrc/static/filter/game-strife/defbinds.txt
Normal file
|
@ -0,0 +1,11 @@
|
||||||
|
/* Default keybindings for Strife */
|
||||||
|
|
||||||
|
a +jump
|
||||||
|
w "showpop 1"
|
||||||
|
backspace invdrop
|
||||||
|
z "showpop 3"
|
||||||
|
k "showpop 2"
|
||||||
|
q invquery
|
||||||
|
|
||||||
|
; not done
|
||||||
|
; h - use health
|
|
@ -1,3 +1,4 @@
|
||||||
|
|
||||||
/****************************************************************************/
|
/****************************************************************************/
|
||||||
/* */
|
/* */
|
||||||
/* STRIFE SOUNDS */
|
/* STRIFE SOUNDS */
|
|
@ -3,6 +3,7 @@
|
||||||
IWad
|
IWad
|
||||||
{
|
{
|
||||||
Name = "The Adventures of Square"
|
Name = "The Adventures of Square"
|
||||||
|
Autoname = "square.square"
|
||||||
Game = "Doom"
|
Game = "Doom"
|
||||||
Config = "Square"
|
Config = "Square"
|
||||||
MustContain = "SQU-IWAD", "E1A1"
|
MustContain = "SQU-IWAD", "E1A1"
|
||||||
|
@ -12,6 +13,7 @@ IWad
|
||||||
IWad
|
IWad
|
||||||
{
|
{
|
||||||
Name = "The Adventures of Square (Square-ware)"
|
Name = "The Adventures of Square (Square-ware)"
|
||||||
|
Autoname = "square.squareware"
|
||||||
Game = "Doom"
|
Game = "Doom"
|
||||||
Config = "Square"
|
Config = "Square"
|
||||||
MustContain = "SQU-SWE1", "E1A1"
|
MustContain = "SQU-SWE1", "E1A1"
|
||||||
|
@ -21,6 +23,7 @@ IWad
|
||||||
IWad
|
IWad
|
||||||
{
|
{
|
||||||
Name = "Harmony"
|
Name = "Harmony"
|
||||||
|
Autoname = "harmony"
|
||||||
Game = "Doom"
|
Game = "Doom"
|
||||||
Config = "Harmony"
|
Config = "Harmony"
|
||||||
Mapinfo = "mapinfo/hacxharm.txt"
|
Mapinfo = "mapinfo/hacxharm.txt"
|
||||||
|
@ -33,7 +36,7 @@ IWad
|
||||||
Name = "Hacx 2.0"
|
Name = "Hacx 2.0"
|
||||||
Game = "Doom"
|
Game = "Doom"
|
||||||
Config = "Hacx"
|
Config = "Hacx"
|
||||||
Autoname = "Hacx2"
|
Autoname = "hacx.hacx2"
|
||||||
Mapinfo = "mapinfo/hacxharm.txt"
|
Mapinfo = "mapinfo/hacxharm.txt"
|
||||||
MustContain = "MAP01", "HACX-E"
|
MustContain = "MAP01", "HACX-E"
|
||||||
BannerColors = "ff ff ff", "00 88 22"
|
BannerColors = "ff ff ff", "00 88 22"
|
||||||
|
@ -44,7 +47,7 @@ IWad
|
||||||
Name = "Hacx: Twitch'n Kill"
|
Name = "Hacx: Twitch'n Kill"
|
||||||
Game = "Doom"
|
Game = "Doom"
|
||||||
Config = "Hacx"
|
Config = "Hacx"
|
||||||
Autoname = "Hacx12"
|
Autoname = "hacx.hacx1"
|
||||||
Mapinfo = "mapinfo/hacxharm.txt"
|
Mapinfo = "mapinfo/hacxharm.txt"
|
||||||
MustContain = "MAP01", "HACX-R"
|
MustContain = "MAP01", "HACX-R"
|
||||||
BannerColors = "00 00 a8", "a8 a8 a8"
|
BannerColors = "00 00 a8", "a8 a8 a8"
|
||||||
|
@ -53,6 +56,7 @@ IWad
|
||||||
IWad
|
IWad
|
||||||
{
|
{
|
||||||
Name = "Action Doom 2: Urban Brawl"
|
Name = "Action Doom 2: Urban Brawl"
|
||||||
|
Autoname = "urbanbrawl"
|
||||||
Game = "Doom"
|
Game = "Doom"
|
||||||
Config = "UrbanBrawl"
|
Config = "UrbanBrawl"
|
||||||
Mapinfo = "mapinfo/urbanbrawl.txt"
|
Mapinfo = "mapinfo/urbanbrawl.txt"
|
||||||
|
@ -63,7 +67,7 @@ IWad
|
||||||
IWad
|
IWad
|
||||||
{
|
{
|
||||||
Name = "Chex(R) Quest 3"
|
Name = "Chex(R) Quest 3"
|
||||||
Autoname = "Chex3"
|
Autoname = "chex.chex3"
|
||||||
Game = "Chex"
|
Game = "Chex"
|
||||||
Config = "Chex"
|
Config = "Chex"
|
||||||
Mapinfo = "mapinfo/chex.txt"
|
Mapinfo = "mapinfo/chex.txt"
|
||||||
|
@ -75,7 +79,7 @@ IWad
|
||||||
IWad
|
IWad
|
||||||
{
|
{
|
||||||
Name = "Chex(R) Quest"
|
Name = "Chex(R) Quest"
|
||||||
Autoname = "Chex1"
|
Autoname = "chex.chex1"
|
||||||
Game = "Chex"
|
Game = "Chex"
|
||||||
Config = "Chex"
|
Config = "Chex"
|
||||||
Mapinfo = "mapinfo/chex.txt"
|
Mapinfo = "mapinfo/chex.txt"
|
||||||
|
@ -86,6 +90,7 @@ IWad
|
||||||
IWad
|
IWad
|
||||||
{
|
{
|
||||||
Name = "Strife: Quest for the Sigil"
|
Name = "Strife: Quest for the Sigil"
|
||||||
|
Autoname = "strife"
|
||||||
Game = "Strife"
|
Game = "Strife"
|
||||||
Config = "Strife"
|
Config = "Strife"
|
||||||
Mapinfo = "mapinfo/strife.txt"
|
Mapinfo = "mapinfo/strife.txt"
|
||||||
|
@ -99,7 +104,7 @@ IWad
|
||||||
Name = "Strife: Teaser (New Version)"
|
Name = "Strife: Teaser (New Version)"
|
||||||
Game = "Strife"
|
Game = "Strife"
|
||||||
Config = "Strife"
|
Config = "Strife"
|
||||||
Autoname = "Strifeteaser2"
|
Autoname = "strifeteaser2"
|
||||||
Mapinfo = "mapinfo/strife.txt"
|
Mapinfo = "mapinfo/strife.txt"
|
||||||
Compatibility = "Shareware", "Teaser2"
|
Compatibility = "Shareware", "Teaser2"
|
||||||
MustContain = "MAP33", "ENDSTRF", "INVCURS"
|
MustContain = "MAP33", "ENDSTRF", "INVCURS"
|
||||||
|
@ -111,7 +116,7 @@ IWad
|
||||||
Name = "Strife: Teaser (Old Version)"
|
Name = "Strife: Teaser (Old Version)"
|
||||||
Game = "Strife"
|
Game = "Strife"
|
||||||
Config = "Strife"
|
Config = "Strife"
|
||||||
Autoname = "Strifeteaser1"
|
Autoname = "strifeteaser1"
|
||||||
Mapinfo = "mapinfo/strife.txt"
|
Mapinfo = "mapinfo/strife.txt"
|
||||||
Compatibility = "Shareware"
|
Compatibility = "Shareware"
|
||||||
MustContain = "MAP33", "ENDSTRF"
|
MustContain = "MAP33", "ENDSTRF"
|
||||||
|
@ -123,7 +128,7 @@ IWad
|
||||||
Name = "Hexen: Beyond Heretic"
|
Name = "Hexen: Beyond Heretic"
|
||||||
Game = "Hexen"
|
Game = "Hexen"
|
||||||
Config = "Hexen"
|
Config = "Hexen"
|
||||||
Autoname = "Hexen1"
|
Autoname = "hexen.hexen"
|
||||||
Mapinfo = "mapinfo/hexen.txt"
|
Mapinfo = "mapinfo/hexen.txt"
|
||||||
Compatibility = "Poly1"
|
Compatibility = "Poly1"
|
||||||
MustContain = "TITLE", "MAP01", "MAP40", "WINNOWR"
|
MustContain = "TITLE", "MAP01", "MAP40", "WINNOWR"
|
||||||
|
@ -133,7 +138,7 @@ IWad
|
||||||
IWad
|
IWad
|
||||||
{
|
{
|
||||||
Name = "Hexen: Deathkings of the Dark Citadel"
|
Name = "Hexen: Deathkings of the Dark Citadel"
|
||||||
Autoname = "HexenDK"
|
Autoname = "hexen.deathkings"
|
||||||
Game = "Hexen"
|
Game = "Hexen"
|
||||||
Config = "Hexen"
|
Config = "Hexen"
|
||||||
Mapinfo = "mapinfo/hexen.txt"
|
Mapinfo = "mapinfo/hexen.txt"
|
||||||
|
@ -157,7 +162,7 @@ IWad
|
||||||
IWad
|
IWad
|
||||||
{
|
{
|
||||||
Name = "Blasphemer"
|
Name = "Blasphemer"
|
||||||
Autoname = "Blasphemer"
|
Autoname = "blasphemer"
|
||||||
Game = "Heretic"
|
Game = "Heretic"
|
||||||
Config = "Heretic"
|
Config = "Heretic"
|
||||||
Mapinfo = "mapinfo/heretic.txt"
|
Mapinfo = "mapinfo/heretic.txt"
|
||||||
|
@ -168,7 +173,7 @@ IWad
|
||||||
IWad
|
IWad
|
||||||
{
|
{
|
||||||
Name = "Heretic: Shadow of the Serpent Riders"
|
Name = "Heretic: Shadow of the Serpent Riders"
|
||||||
Autoname = "HereticSR"
|
Autoname = "heretic.shadow"
|
||||||
Game = "Heretic"
|
Game = "Heretic"
|
||||||
Config = "Heretic"
|
Config = "Heretic"
|
||||||
Mapinfo = "mapinfo/heretic.txt"
|
Mapinfo = "mapinfo/heretic.txt"
|
||||||
|
@ -182,7 +187,7 @@ IWad
|
||||||
Name = "Heretic"
|
Name = "Heretic"
|
||||||
Game = "Heretic"
|
Game = "Heretic"
|
||||||
Config = "Heretic"
|
Config = "Heretic"
|
||||||
Autoname = "Heretic1"
|
Autoname = "heretic.heretic"
|
||||||
Mapinfo = "mapinfo/heretic.txt"
|
Mapinfo = "mapinfo/heretic.txt"
|
||||||
MustContain = "E1M1", "E2M1", "TITLE", "MUS_E1M1"
|
MustContain = "E1M1", "E2M1", "TITLE", "MUS_E1M1"
|
||||||
BannerColors = "fc fc 00", "a8 00 00"
|
BannerColors = "fc fc 00", "a8 00 00"
|
||||||
|
@ -202,8 +207,7 @@ IWad
|
||||||
IWad
|
IWad
|
||||||
{
|
{
|
||||||
Name = "FreeDM"
|
Name = "FreeDM"
|
||||||
Autoname = "FreeDM"
|
Autoname = "doom.freedoom.freedm"
|
||||||
Group = "Freedoom"
|
|
||||||
Game = "Doom"
|
Game = "Doom"
|
||||||
Config = "Doom"
|
Config = "Doom"
|
||||||
Mapinfo = "mapinfo/doom2.txt"
|
Mapinfo = "mapinfo/doom2.txt"
|
||||||
|
@ -214,8 +218,7 @@ IWad
|
||||||
IWad
|
IWad
|
||||||
{
|
{
|
||||||
Name = "Freedoom: Phase 2"
|
Name = "Freedoom: Phase 2"
|
||||||
Autoname = "Freedoom2"
|
Autoname = "doom.freedoom.phase2"
|
||||||
Group = "Freedoom"
|
|
||||||
Game = "Doom"
|
Game = "Doom"
|
||||||
Config = "Doom"
|
Config = "Doom"
|
||||||
Mapinfo = "mapinfo/doom2.txt"
|
Mapinfo = "mapinfo/doom2.txt"
|
||||||
|
@ -226,8 +229,7 @@ IWad
|
||||||
IWad
|
IWad
|
||||||
{
|
{
|
||||||
Name = "Freedoom: Phase 1"
|
Name = "Freedoom: Phase 1"
|
||||||
Autoname = "Freedoom1"
|
Autoname = "doom.freedoom.phase1"
|
||||||
Group = "Freedoom"
|
|
||||||
Game = "Doom"
|
Game = "Doom"
|
||||||
Config = "Doom"
|
Config = "Doom"
|
||||||
Mapinfo = "mapinfo/doom1.txt"
|
Mapinfo = "mapinfo/doom1.txt"
|
||||||
|
@ -238,8 +240,7 @@ IWad
|
||||||
IWad
|
IWad
|
||||||
{
|
{
|
||||||
Name = "Freedoom: Demo Version"
|
Name = "Freedoom: Demo Version"
|
||||||
Autoname = "Freedoom1"
|
Autoname = "doom.freedoom.demo"
|
||||||
Group = "Freedoom"
|
|
||||||
Game = "Doom"
|
Game = "Doom"
|
||||||
Config = "Doom"
|
Config = "Doom"
|
||||||
Mapinfo = "mapinfo/doom1.txt"
|
Mapinfo = "mapinfo/doom1.txt"
|
||||||
|
@ -250,7 +251,7 @@ IWad
|
||||||
IWad
|
IWad
|
||||||
{
|
{
|
||||||
Name = "DOOM: BFG Edition"
|
Name = "DOOM: BFG Edition"
|
||||||
Autoname = "DoomBFG"
|
Autoname = "doom.doom1.bfg"
|
||||||
Game = "Doom"
|
Game = "Doom"
|
||||||
Config = "Doom"
|
Config = "Doom"
|
||||||
Mapinfo = "mapinfo/ultdoom.txt"
|
Mapinfo = "mapinfo/ultdoom.txt"
|
||||||
|
@ -265,7 +266,7 @@ IWad
|
||||||
IWad
|
IWad
|
||||||
{
|
{
|
||||||
Name = "The Ultimate DOOM"
|
Name = "The Ultimate DOOM"
|
||||||
Autoname = "DoomU"
|
Autoname = "doom.doom1.ultimate"
|
||||||
Game = "Doom"
|
Game = "Doom"
|
||||||
Config = "Doom"
|
Config = "Doom"
|
||||||
Mapinfo = "mapinfo/ultdoom.txt"
|
Mapinfo = "mapinfo/ultdoom.txt"
|
||||||
|
@ -279,7 +280,7 @@ IWad
|
||||||
IWad
|
IWad
|
||||||
{
|
{
|
||||||
Name = "DOOM Registered"
|
Name = "DOOM Registered"
|
||||||
Autoname = "Doom1"
|
Autoname = "doom.doom1.registered"
|
||||||
Game = "Doom"
|
Game = "Doom"
|
||||||
Config = "Doom"
|
Config = "Doom"
|
||||||
Mapinfo = "mapinfo/doom1.txt"
|
Mapinfo = "mapinfo/doom1.txt"
|
||||||
|
@ -304,7 +305,7 @@ IWad
|
||||||
IWad
|
IWad
|
||||||
{
|
{
|
||||||
Name = "Final Doom: TNT - Evilution"
|
Name = "Final Doom: TNT - Evilution"
|
||||||
Autoname = "TNT"
|
Autoname = "doom.doom2.tnt"
|
||||||
Game = "Doom"
|
Game = "Doom"
|
||||||
Config = "Doom"
|
Config = "Doom"
|
||||||
Mapinfo = "mapinfo/tnt.txt"
|
Mapinfo = "mapinfo/tnt.txt"
|
||||||
|
@ -316,7 +317,7 @@ IWad
|
||||||
IWad
|
IWad
|
||||||
{
|
{
|
||||||
Name = "Final Doom: Plutonia Experiment"
|
Name = "Final Doom: Plutonia Experiment"
|
||||||
Autoname = "Plutonia"
|
Autoname = "doom.doom2.plutonia"
|
||||||
Game = "Doom"
|
Game = "Doom"
|
||||||
Config = "Doom"
|
Config = "Doom"
|
||||||
Mapinfo = "mapinfo/plutonia.txt"
|
Mapinfo = "mapinfo/plutonia.txt"
|
||||||
|
@ -328,7 +329,7 @@ IWad
|
||||||
IWad
|
IWad
|
||||||
{
|
{
|
||||||
Name = "DOOM 2: BFG Edition"
|
Name = "DOOM 2: BFG Edition"
|
||||||
Autoname = "Doom2BFG"
|
Autoname = "doom.doom2.bfg"
|
||||||
Game = "Doom"
|
Game = "Doom"
|
||||||
Config = "Doom"
|
Config = "Doom"
|
||||||
Mapinfo = "mapinfo/doom2bfg.txt"
|
Mapinfo = "mapinfo/doom2bfg.txt"
|
||||||
|
@ -342,7 +343,7 @@ IWad
|
||||||
IWad
|
IWad
|
||||||
{
|
{
|
||||||
Name = "DOOM 2: Hell on Earth"
|
Name = "DOOM 2: Hell on Earth"
|
||||||
Autoname = "Doom2"
|
Autoname = "doom.doom2.commercial"
|
||||||
Game = "Doom"
|
Game = "Doom"
|
||||||
Config = "Doom"
|
Config = "Doom"
|
||||||
Mapinfo = "mapinfo/doom2.txt"
|
Mapinfo = "mapinfo/doom2.txt"
|
||||||
|
|
Loading…
Reference in a new issue