Common Library changes.

This commit is contained in:
Marisa the Magician 2022-03-01 18:53:07 +01:00
parent 4c93fe70fc
commit 3d738dc45e
8 changed files with 12 additions and 173 deletions

View File

@ -1,33 +1,2 @@
// shared cvars
nosave float ash_flashstrength = 1.0;
user float ash_bumpstrength = 1.0;
nosave int ash_hudmargin = 10;
nosave bool ash_hudscale = false;
nosave int ash_maxshown = 4;
nosave int ash_maxshownbig = 10;
nosave int ash_maxpickup = 5;
nosave int ash_chatduration = 25;
nosave int ash_msgduration = 5;
nosave int ash_pickduration = 3;
nosave bool ash_shaders = true;
server bool ash_blood = true;
server int ash_maxblood = 400;
server int ash_maxgibs = 100;
server int ash_maxcasings = 200;
server int ash_maxdebris = 500;
nosave bool ash_fuzz = true;
server int ash_enemydrops = 0;
server bool ash_shadows = true;
nosave int ash_shadowdist = 2000;
nosave int ash_forcestats = 1;
server int ash_drlaskill = 3;
server int ash_ps_fullreset = 0;
server int ash_ps_resetammo = 0;
server int ash_ps_resetitems = 0;
server int ash_ps_resethealth = 0;
nosave bool ash_weapontooltips = true;
nosave string ash_tooltipshown = "";
nosave noarchive bool ash_tooltipnote = false;
nosave bool ash_mm_enable = true;
nosave int ash_playtime = 0;
// mod-specific cvars
nosave int ash_playtime = 0; // total playtime in seconds

View File

@ -1,3 +1,3 @@
[default]
ASH_MODVER="\cjCHILD OF ASH\c- \cw0.1a r12 \cu(Mon 28 Feb 17:30:52 CET 2022)\c-";
ASH_SHORTVER="\cw0.1a r12 \cu(2022-02-28 17:30:52)\c-";
ASH_MODVER="\cjCHILD OF ASH\c- \cw0.1a r13 \cu(Tue 1 Mar 18:53:07 CET 2022)\c-";
ASH_SHORTVER="\cw0.1a r13 \cu(2022-03-01 18:53:07)\c-";

View File

@ -1,100 +1,11 @@
OptionValue "SWWMEnemyDropType"
{
-1, "$SWWM_DROPS_NONE"
0, "$SWWM_DROPS_AMMO"
1, "$SWWM_DROPS_WEAPONS"
}
OptionValue "SWWMForceStats"
{
0, "$SWWM_STATS_DISABLED"
1, "$SWWM_STATS_ALWAYS"
2, "$SWWM_STATS_MAPNAME"
}
OptionValue "SWWMDRLASkill"
{
0, "$SWWM_DRLASKILL_BABY"
1, "$SWWM_DRLASKILL_EASY"
2, "$SWWM_DRLASKILL_NORMAL"
3, "$SWWM_DRLASKILL_HARD"
4, "$SWWM_DRLASKILL_NIGHTMARE"
5, "$SWWM_DRLASKILL_TECHNOPHOBIA"
6, "$SWWM_DRLASKILL_ARMAGEDDON"
7, "$SWWM_DRLASKILL_ADAPTIVE"
}
OptionValue "SWWMPistolStart"
{
0, "$TXT_NO"
1, "$SWWM_PISTOLSTART_MAP"
2, "$SWWM_PISTOLSTART_CLUSTER"
}
OptionValue "SWWMHUDScale"
{
0, "$SWWM_TFITSCALE"
1, "$SWWM_LFITSCALE"
}
OptionMenu "MarisaOptionMenu"
{
Class "SWWMOptionMenu"
Title "$ASH_MTITLE"
SafeCommand "$SWWM_CRESET", "event swwmresetcvars"
StaticText " "
StaticText "$SWWM_PTITLE", "Ice"
SWWMPlayTime "$SWWM_PLAYTIME", "ash_playtime"
StaticText " "
StaticText "$SWWM_OTITLE", "Ice"
Option "$SWWM_SHADERS", "ash_shaders", "YesNo"
Slider "$SWWM_FLASH", "ash_flashstrength", 0.0, 1.0, 0.1, 1
Slider "$SWWM_BUMP", "ash_bumpstrength", 0.0, 1.0, 0.1, 1
Option "$SWWM_MM_ENABLE", "ash_mm_enable", "YesNo"
Option "$SWWM_FORCESTATS", "ash_forcestats", "SWWMForceStats"
Slider "$SWWM_HUDMARGIN", "ash_hudmargin", 0, 40, 1, 0
Option "$SWWM_HUDSCALE", "ash_hudscale", "SWWMHudScale"
Slider "$SWWM_MAXMSG", "ash_maxshown", 1, 10, 1, 0
Slider "$SWWM_MAXMSGBIG", "ash_maxshownbig", 1, 20, 1, 0
Slider "$SWWM_MAXPICK", "ash_maxpickup", 1, 10, 1, 0
Slider "$SWWM_CHATLEN", "ash_chatduration", 1, 30, 1, 0
Slider "$SWWM_MSGLEN", "ash_msgduration", 1, 30, 1, 0
Slider "$SWWM_PICKLEN", "ash_pickduration", 1, 30, 1, 0
Option "$SWWM_FUZZ", "ash_fuzz", "YesNo"
StaticText " "
StaticText "$SWWM_ETITLE", "Ice"
Option "$SWWM_SHADOWS", "ash_shadows", "YesNo"
ScaleSlider "$SWWM_SHADOWDIST", "ash_shadowdist", -1, 4000, 1, "$SWWM_NONE", "$SWWM_UNLIMITED"
Option "$SWWM_BLOOD", "ash_blood", "YesNo"
ScaleSlider "$SWWM_MAXBLOOD", "ash_maxblood", -1, 1000, 1, "$SWWM_NONE", "$SWWM_UNLIMITED"
ScaleSlider "$SWWM_MAXGIBS", "ash_maxgibs", -1, 1000, 1, "$SWWM_NONE", "$SWWM_UNLIMITED"
ScaleSlider "$SWWM_MAXCASINGS", "ash_maxcasings", -1, 1000, 1, "$SWWM_NONE", "$SWWM_UNLIMITED"
ScaleSlider "$SWWM_MAXDEBRIS", "ash_maxdebris", -1, 1000, 1, "$SWWM_NONE", "$SWWM_UNLIMITED"
SafeCommand "$SWWM_CLEARFX", "netevent swwmcleareffects"
StaticText " "
StaticText "$SWWM_BTITLE", "Ice"
Option "$SWWM_PS_FULLRESET", "ash_ps_fullreset", "SWWMPistolStart"
Option "$SWWM_PS_RESETAMMO", "ash_ps_resetammo", "SWWMPistolStart"
Option "$SWWM_PS_RESETITEMS", "ash_ps_resetitems", "SWWMPistolStart"
Option "$SWWM_PS_RESETHEALTH", "ash_ps_resethealth", "SWWMPistolStart"
Option "$SWWM_ENEMYDROPS", "ash_enemydrops", "SWWMEnemyDropType"
StaticText " "
StaticText "$SWWM_ITITLE", "Ice"
Option "$SWWM_WEAPONTOOLTIPS", "ash_weapontooltips", "YesNo"
SafeCommand "$SWWM_RESETTOOLTIPS", "event swwmresettooltips"
IfGame(Doom)
{
StaticText " "
StaticText "$SWWM_MCTITLE", "Ice"
Option "$SWWM_DRLASKILL", "ash_drlaskill", "SWWMDRLASkill"
}
}
AddOptionMenu "OptionsMenu"
{
Submenu "$ASH_MTITLE", "MarisaOptionMenu"
Submenu "$ASH_MTITLE", "SWWMOptionMenu"
Submenu "$ASH_MCREDS", "MarisaCreditsMenu"
}
AddOptionMenu "OptionsMenuSimple"
{
Submenu "$ASH_MTITLE", "MarisaOptionMenu"
Submenu "$ASH_MTITLE", "SWWMOptionMenu"
Submenu "$ASH_MCREDS", "MarisaCreditsMenu"
}
ListMenu "MainMenu"

View File

@ -20,7 +20,7 @@ GameInfo
MenuFontColor_Label = "DarkGray"
MenuFontColor_Value = "Black"
MenuFontColor_Action = "DarkGray"
MenuFontColor_Header = "Black"
MenuFontColor_Header = "Ice"
MenuFontColor_Highlight = "White"
MenuFontColor_Selection = "White"
MenuSliderColor = "DarkGray"

View File

@ -39,6 +39,7 @@ const SWWMMAXVIPAMOUNT = 3;
#include "zscript/handler/swwm_handler_process.zsc"
#include "zscript/handler/swwm_handler_queues.zsc"
#include "zscript/handler/swwm_handler_replacements.zsc"
#include "zscript/handler/swwm_handler_shaders.zsc"
#include "zscript/handler/swwm_handler_worldload.zsc"
#include "zscript/handler/swwm_handler_worldthings.zsc"
// menu code

View File

@ -2,16 +2,8 @@
extend Class SWWMHandler
{
private ui void RenderShaders( RenderEvent e )
private ui bool RenderModShaders( RenderEvent e, PlayerInfo p, PlayerPawn mo )
{
PlayerInfo p = players[consoleplayer];
let mo = p.mo;
bool pc = (p.camera == mo);
if ( !mo || !ash_shaders || !pc )
{
if ( !ash_shaders ) ClearAllShaders(p,true);
return;
}
let deva = AngeryPower(mo.FindInventory("AngeryPower"));
if ( deva )
{
@ -28,45 +20,11 @@ extend Class SWWMHandler
Shader.SetUniform1f(p,"BarrierShader","timer",(gametic+e.FracTic)/GameTicRate);
}
else Shader.SetEnabled(p,"BarrierShader",false);
if ( !(mo is 'SWWMPlayer') )
{
Shader.SetEnabled(p,"WaterWarp",false);
Shader.SetEnabled(p,"LavaWarp",false);
Shader.SetEnabled(p,"SlimeWarp",false);
return;
}
let demo = SWWMPlayer(mo);
if ( demo.lastunder == SWWMPlayer.UNDER_WATER )
{
Shader.SetEnabled(p,"WaterWarp",true);
Shader.SetUniform1f(p,"WaterWarp","timer",(gametic+e.FracTic)/GameTicRate);
Shader.SetUniform1f(p,"WaterWarp","dfact",coat?.25:1.);
Shader.SetUniform3f(p,"WaterWarp","lightcol",(demo.undercol.r/255.,demo.undercol.g/255.,demo.undercol.b/255.));
}
else Shader.SetEnabled(p,"WaterWarp",false);
if ( demo.lastunder == SWWMPlayer.UNDER_LAVA )
{
Shader.SetEnabled(p,"LavaWarp",true);
Shader.SetUniform1f(p,"LavaWarp","timer",(gametic+e.FracTic)/GameTicRate);
Shader.SetUniform1f(p,"LavaWarp","dfact",coat?.25:1.);
Shader.SetUniform3f(p,"LavaWarp","lightcol",(demo.undercol.r/255.,demo.undercol.g/255.,demo.undercol.b/255.));
}
else Shader.SetEnabled(p,"LavaWarp",false);
if ( demo.lastunder == SWWMPlayer.UNDER_SLIME )
{
Shader.SetEnabled(p,"SlimeWarp",true);
Shader.SetUniform1f(p,"SlimeWarp","timer",(gametic+e.FracTic)/GameTicRate);
Shader.SetUniform1f(p,"SlimeWarp","dfact",coat?.25:1.);
Shader.SetUniform3f(p,"SlimeWarp","lightcol",(demo.undercol.r/255.,demo.undercol.g/255.,demo.undercol.b/255.));
}
else Shader.SetEnabled(p,"SlimeWarp",false);
return !!coat;
}
static clearscope void ClearAllShaders( PlayerInfo p, bool noscope = false )
static clearscope void ClearAllModShaders( PlayerInfo p, bool noscope = false )
{
Shader.SetEnabled(p,"WaterWarp",false);
Shader.SetEnabled(p,"LavaWarp",false);
Shader.SetEnabled(p,"SlimeWarp",false);
Shader.SetEnabled(p,"BarrierShader",false);
Shader.SetEnabled(p,"DevastationShader",false);
}

View File

@ -144,7 +144,7 @@ Class MarisaStatScreen : SWWMStatScreen
override void drawSWWMBg()
{
double GameSecs = (bcnt+FracTic)/GameTicRate;
if ( ash_fuzz )
if ( swwm_fuzz )
{
if ( !bgtex ) bgtex = TexMan.CheckForTexture("graphics/tempbg.png",TexMan.Type_Any);
Vector2 tsize = TexMan.GetScaledSize(bgtex);

View File

@ -155,7 +155,7 @@ Class MarisaTitleStuff : EventHandler
if ( !logotex ) logotex = TexMan.CheckForTexture("graphics/MarisaLogo.png",TexMan.Type_Any);
if ( !gradtex ) gradtex = TexMan.CheckForTexture("graphics/title_grad.png",TexMan.Type_Any);
double GameSecs = (titletimer+e.FracTic)/GameTicRate;
if ( ash_fuzz )
if ( swwm_fuzz )
{
if ( !bgtex ) bgtex = TexMan.CheckForTexture("graphics/tempbg.png",TexMan.Type_Any);
Vector2 tsize = TexMan.GetScaledSize(bgtex);