diff --git a/Effects/transitions.fx b/Effects/transitions.fx index 0e846b7..77fccb9 100755 --- a/Effects/transitions.fx +++ b/Effects/transitions.fx @@ -351,6 +351,22 @@ float4 doors(float2 st : TEXCOORD0) : COLOR0 { return color; } +float4 doom(float2 st : TEXCOORD0) : COLOR0 { + float time=uProgress*0.02; + if(uProgress>50.){time=2.-uProgress*0.02;} + + float diff=sin(ceil(st.x*100.)*2.2 + ceil(st.x*st.x*100.)*3.)*0.2 -0.4+time*2.0; + + if(diff>0.){ + if(uProgress>50.){st.y+=diff;} + else{st.y-=diff;} + } + float4 color = tex2D(uImage0, st); + if(st.y>1. || st.y<0.)color = float4(0,0,0,0); + + return color; +} + technique Technique1 { pass Lines {PixelShader = compile ps_2_0 lines();} @@ -366,4 +382,5 @@ technique Technique1 pass Collapse {PixelShader = compile ps_2_0 columns_sudden_angled();} pass Circle {PixelShader = compile ps_2_0 circle();} pass Doors {PixelShader = compile ps_2_0 doors();} + pass Doom {PixelShader = compile ps_2_0 doom();} } \ No newline at end of file diff --git a/Effects/transitions.xnb b/Effects/transitions.xnb index 9c2a38d..8f41a93 100644 Binary files a/Effects/transitions.xnb and b/Effects/transitions.xnb differ diff --git a/TransitionPlayer.cs b/TransitionPlayer.cs index 31747dd..2605ea2 100644 --- a/TransitionPlayer.cs +++ b/TransitionPlayer.cs @@ -10,10 +10,10 @@ using Terraria.ModLoader; namespace smoothDeathTransitions { public class TransitionPlayer : ModPlayer { - /*public override void Kill(double damage, int hitDirection, bool pvp, PlayerDeathReason damageSource) + public override void Kill(double damage, int hitDirection, bool pvp, PlayerDeathReason damageSource) { Player.respawnTimer=150; // For testing - }*/ + } public string GetBiomeSpecificTransitions(){ // This code is going to suck. diff --git a/TransitionsConfig.cs b/TransitionsConfig.cs index 3529708..a206005 100644 --- a/TransitionsConfig.cs +++ b/TransitionsConfig.cs @@ -17,7 +17,7 @@ namespace smoothDeathTransitions [DefaultValue("Lines")] [TooltipKey("$DefaultTransitionTooltip")] [DrawTicks] - [OptionStrings(["Lines", "Loving", "Rising", "Falling", "Starry", "Winding", "Jaws", "Flooding", "Wonder", "Collapse", "Circle", "Doors", "Prideful"])] + [OptionStrings(["Lines", "Loving", "Rising", "Falling", "Starry", "Winding", "Jaws", "Flooding", "Wonder", "Collapse", "Circle", "Doors", "Doom", "Prideful"])] public string DefaultTransition; [DefaultValue(160)] diff --git a/description.txt b/description.txt index 8cae7fc..04a148b 100644 --- a/description.txt +++ b/description.txt @@ -12,6 +12,7 @@ Currently available transitions: - Collapse - jagged diagonal letterboxing. - Circle - simple closing-in circle. - Doors - two-sided shut and open. +- Doom - puts the screen through a paper shredder. - Prideful - trans flag sweep that optionally replaces the Hallow's ordinary transition. Explicitly supports Calamity and Confection Rebaked, but all content mods should be fine; it'll just use the default transition. diff --git a/description_workshop.txt b/description_workshop.txt index 9da7ea4..e57d353 100644 --- a/description_workshop.txt +++ b/description_workshop.txt @@ -1,5 +1,3 @@ -[h1]Smooth Death Transitions[/h1] - Updates the traditional death screen with smooth transition shaders when you respawn. Fully client-side (does not alter gameplay) and configurable. Explicitly supports Calamity and Confection Rebaked, but all content mods should be fine; it'll just use the default transition for your position. Currently available transitions: @@ -15,6 +13,7 @@ Currently available transitions: [*][b]Collapse[/b] - jagged diagonal letterboxing. [*][b]Circle[/b] - simple closing-in circle. [*][b]Doors[/b] - two-sided shut and open. + [*][b]Doom[/b] - puts the screen through a paper shredder. [*][b]Prideful[/b] - trans flag sweep that optionally replaces the Hallow's ordinary transition. [/list] diff --git a/smoothDeathTransitions.cs b/smoothDeathTransitions.cs index 286d3aa..ccfc2ab 100644 --- a/smoothDeathTransitions.cs +++ b/smoothDeathTransitions.cs @@ -10,7 +10,7 @@ namespace smoothDeathTransitions { public class SmoothDeathTransitions : Mod { - public string[] transitionsAvailable = ["Lines", "Loving", "Rising", "Falling", "Starry", "Winding", "Jaws", "Flooding", "Wonder", "Prideful", "Collapse", "Circle", "Doors"]; + public string[] transitionsAvailable = ["Lines", "Loving", "Rising", "Falling", "Starry", "Winding", "Jaws", "Flooding", "Wonder", "Prideful", "Collapse", "Circle", "Doors", "Doom"]; public override void Load(){ if(Main.netMode != NetmodeID.Server){ Asset screenRef = Assets.Request("Effects/transitions");