mirror of
https://github.com/ZDoom/Raze.git
synced 2025-05-30 17:01:03 +00:00
- set up the Witchaven specific controls and their menu entries.
Sorry, no text file yet.
This commit is contained in:
parent
7f921be824
commit
fd3303ab2b
11 changed files with 96 additions and 9 deletions
|
@ -681,6 +681,17 @@ void ReadBindings(int lump, bool override)
|
|||
FKeyBindings* dest = &Bindings;
|
||||
int key;
|
||||
|
||||
if (sc.Compare("unbind"))
|
||||
{
|
||||
sc.MustGetString();
|
||||
if (override)
|
||||
{
|
||||
// This is only for games to clear unsuitable base defaults, not for mods.
|
||||
dest->UnbindKey(sc.String);
|
||||
}
|
||||
continue;
|
||||
}
|
||||
|
||||
// bind destination is optional and is the same as the console command
|
||||
if (sc.Compare("bind"))
|
||||
{
|
||||
|
@ -711,7 +722,18 @@ void ReadBindings(int lump, bool override)
|
|||
void C_SetDefaultKeys(const char* baseconfig)
|
||||
{
|
||||
auto lump = fileSystem.CheckNumForFullName("engine/commonbinds.txt");
|
||||
if (lump >= 0) ReadBindings(lump, true);
|
||||
if (lump >= 0)
|
||||
{
|
||||
// Bail out if a mod tries to override this. Main game resources are allowed to do this, though.
|
||||
auto fileno2 = fileSystem.GetFileContainer(lump);
|
||||
if (fileno2 > fileSystem.GetMaxIwadNum())
|
||||
{
|
||||
I_FatalError("File %s is overriding core lump %s.",
|
||||
fileSystem.GetResourceFileFullName(fileno2), "engine/commonbinds.txt");
|
||||
}
|
||||
|
||||
ReadBindings(lump, true);
|
||||
}
|
||||
int lastlump = 0;
|
||||
|
||||
while ((lump = fileSystem.FindLumpFullName(baseconfig, &lastlump)) != -1)
|
||||
|
|
|
@ -138,10 +138,11 @@ void spellswitch(PLAYER& plr, int j)
|
|||
|
||||
void bookprocess(int snum) {
|
||||
PLAYER& plr = player[snum];
|
||||
|
||||
|
||||
int spell = plr.spellnum;
|
||||
plr.spellnum = -1;
|
||||
|
||||
if (plr.currweaponanim == 0 && plr.currweaponflip == 0) {
|
||||
int spell = plr.spellnum;
|
||||
|
||||
if(spell != -1 && spell < 10)
|
||||
{
|
||||
if(spell != 9 && spell != 8) {
|
||||
|
|
|
@ -33,6 +33,7 @@ End "+Aim_Down"
|
|||
RCtrl "+Fire"
|
||||
Pause "pause"
|
||||
` "toggleconsole"
|
||||
CapsLock "toggle cl_autorun"
|
||||
|
||||
T "messagemode"
|
||||
Tab "togglemap"
|
||||
|
|
|
@ -22,4 +22,3 @@ mapbind D "+am_panright"
|
|||
KP- "sizedown"
|
||||
KP+ "sizeup"
|
||||
Y "show_weapon"
|
||||
CapsLock "toggle cl_autorun"
|
||||
|
|
|
@ -13,4 +13,3 @@ KP9 "+Strafe_Right"
|
|||
KP. "+Look_Right"
|
||||
Mouse2 "+Open"
|
||||
Mouse3 "+Run"
|
||||
CapsLock "toggle cl_autorun"
|
||||
|
|
|
@ -19,6 +19,5 @@ KP- "sizedown"
|
|||
KP+ "sizeup"
|
||||
U "+Mouse_Aiming"
|
||||
I "toggle cl_crosshair"
|
||||
CapsLock "toggle cl_autorun"
|
||||
mapbind uparrow "+am_panup"
|
||||
mapbind downarrow "+am_pandown"
|
||||
|
|
4
wadsrc/static/filter/witchaven/engine/commonbinds.txt
Normal file
4
wadsrc/static/filter/witchaven/engine/commonbinds.txt
Normal file
|
@ -0,0 +1,4 @@
|
|||
Ins "+alt_fire" // fly up
|
||||
Del "+toggle_crouch" // fly down
|
||||
End "holsterweapon" // end flying
|
||||
unbind "c"
|
10
wadsrc/static/filter/witchaven/engine/defbinds.txt
Normal file
10
wadsrc/static/filter/witchaven/engine/defbinds.txt
Normal file
|
@ -0,0 +1,10 @@
|
|||
kp1 "spell 0" //Scare_Spell
|
||||
kp2 "spell 1" //Nightvision_Spell
|
||||
kp3 "spell 2" //Freeze_Spell
|
||||
kp4 "spell 3" //Arrow_Spell
|
||||
kp5 "spell 4" //Opendoor_Spell
|
||||
kp6 "spell 5" //Fly_Spell
|
||||
kp7 "spell 6" //Fire_Spell
|
||||
kp8 "spell 7" //Nuke_Spell
|
||||
' "spell 8"
|
||||
";" "spell 9"
|
10
wadsrc/static/filter/witchaven/engine/leftbinds.txt
Normal file
10
wadsrc/static/filter/witchaven/engine/leftbinds.txt
Normal file
|
@ -0,0 +1,10 @@
|
|||
// This is unfortunately a bit limited because for this config both the function keys and the numpad are blocked.
|
||||
q "spell 0" //Scare_Spell
|
||||
w "spell 1" //Nightvision_Spell
|
||||
e "spell 2" //Freeze_Spell
|
||||
r "spell 3" //Arrow_Spell
|
||||
// t is already reserved.
|
||||
y "spell 4" //Opendoor_Spell
|
||||
u "spell 5" //Fly_Spell
|
||||
i "spell 6" //Fire_Spell
|
||||
o "spell 7" //Nuke_Spell
|
9
wadsrc/static/filter/witchaven/engine/origbinds.txt
Normal file
9
wadsrc/static/filter/witchaven/engine/origbinds.txt
Normal file
|
@ -0,0 +1,9 @@
|
|||
` "backoff" // i.e. cast spell
|
||||
F1 "spell 1"
|
||||
F2 "spell 2"
|
||||
F3 "spell 3"
|
||||
F4 "spell 4"
|
||||
F5 "spell 5"
|
||||
F6 "spell 6"
|
||||
F7 "spell 7"
|
||||
F8 "spell 8"
|
|
@ -608,11 +608,17 @@ OptionMenu "ActionControlsMenu" protected
|
|||
StaticText ""
|
||||
Control "$CNTRLMNU_JUMP" , "+jump"
|
||||
Control "$CNTRLMNU_CROUCH" , "+crouch"
|
||||
ifgame(Duke, Nam, WW2GI, Redneck, RedneckRides)
|
||||
ifgame(Duke, Nam, WW2GI, Redneck, RedneckRides, ShadowWarrior)
|
||||
{
|
||||
// Fixme: Make this work in all games
|
||||
Control "$CNTRLMNU_TOGGLECROUCH" , "+toggle_crouch"
|
||||
}
|
||||
ifgame(Witchaven, Witchaven2)
|
||||
{
|
||||
Control "$CNTRLMNU_FLYUP" , "+alt_fire"
|
||||
Control "$CNTRLMNU_FLYDOWN" , "+toggle_crouch"
|
||||
Control "$CNTRLMNU_FLYSTOP" , "holsterweapon"
|
||||
}
|
||||
|
||||
StaticText ""
|
||||
Control "$CNTRLMNU_MOUSELOOK" , "+mouse_aiming"
|
||||
|
@ -670,7 +676,10 @@ OptionMenu "WeaponsControlMenu" protected
|
|||
Control "$CNTRLMNU_SLOT9" , "slot 9"
|
||||
Control "$CNTRLMNU_SLOT0" , "slot 10"
|
||||
StaticText ""
|
||||
Control "$CNTRLMNU_HOLSTER" , "holsterweapon"
|
||||
ifnotgame(Witchaven, Witchaven2)
|
||||
{
|
||||
Control "$CNTRLMNU_HOLSTER" , "holsterweapon"
|
||||
}
|
||||
}
|
||||
ifgame(Duke, Nam, WW2GI)
|
||||
{
|
||||
|
@ -689,6 +698,21 @@ OptionMenu "WeaponsControlMenu" protected
|
|||
Control "$CNTRLMNU_FLASHBOMB","useitem 6"
|
||||
Control "$CNTRLMNU_CALTROPS" ,"useitem 7"
|
||||
}
|
||||
ifgame(Witchaven, Witchaven2)
|
||||
{
|
||||
StaticText "CNTRLMNU_SPELLS"
|
||||
Control "$CNTRLMNU_SPELL0" , "spell 0"
|
||||
Control "$CNTRLMNU_SPELL1" , "spell 1"
|
||||
Control "$CNTRLMNU_SPELL2" , "spell 2"
|
||||
Control "$CNTRLMNU_SPELL3" , "spell 3"
|
||||
Control "$CNTRLMNU_SPELL4" , "spell 4"
|
||||
Control "$CNTRLMNU_SPELL5" , "spell 5"
|
||||
Control "$CNTRLMNU_SPELL6" , "spell 6"
|
||||
Control "$CNTRLMNU_SPELL7" , "spell 7"
|
||||
StaticText ""
|
||||
Control "$CNTRLMNU_SPELL8" , "spell 8"
|
||||
Control "$CNTRLMNU_SPELL9" , "spell 9"
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
@ -766,6 +790,15 @@ OptionMenu "InventoryControlsMenu" protected
|
|||
Control "$TXT_EX_USEINV5" , "useitem 5"
|
||||
Control "$TXT_EX_USEINV6" , "useitem 6"
|
||||
}
|
||||
ifgame(Witchaven, Witchaven2)
|
||||
{
|
||||
StaticText ""
|
||||
Control "$TXT_WH_POTION1" , "useitem 1"
|
||||
Control "$TXT_WH_POTION2" , "useitem 2"
|
||||
Control "$TXT_WH_POTION3" , "useitem 3"
|
||||
Control "$TXT_WH_POTION4" , "useitem 4"
|
||||
Control "$TXT_WH_POTION5" , "useitem 5"
|
||||
}
|
||||
}
|
||||
|
||||
OptionMenu "OtherControlsMenu" protected
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue