Skip to content

Commit 05b955b

Browse files
Removed unused shaders and made small code change
1 parent 40a3704 commit 05b955b

File tree

8 files changed

+5
-146
lines changed

8 files changed

+5
-146
lines changed

assets/shaders/vcrborder.frag

Lines changed: 0 additions & 29 deletions
This file was deleted.

assets/shaders/vcrmario85.frag

Lines changed: 0 additions & 35 deletions
This file was deleted.

source/InitState.hx

Lines changed: 1 addition & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -110,13 +110,6 @@ class InitState extends FlxState
110110
});
111111
#end
112112

113-
// Assign the shaders AFTER all assets have been loaded!
114-
#if ADVANCED_SHADERS_ALLOWED
115-
CacheUtil.vcrBorderShader = new VCRBorderShader();
116-
CacheUtil.vcrMario85Shader = new VCRMario85Shader();
117-
#end
118-
CacheUtil.grainShader = new GrainShader();
119-
120113
// Configure the event listener for detecting caps lock if the target is set to HTML5.
121114
#if web
122115
untyped __js__('
@@ -130,18 +123,7 @@ class InitState extends FlxState
130123
#end
131124
}
132125

133-
function addBackgroundProcesses():Void
134-
{
135-
LoggerUtil.log('Adding background processes');
136-
// Update the shaders that need to constantly be reset.
137-
FlxG.signals.postUpdate.add(() ->
138-
{
139-
#if ADVANCED_SHADERS_ALLOWED
140-
CacheUtil.vcrMario85Shader.update(FlxG.elapsed);
141-
#end
142-
CacheUtil.grainShader.update(FlxG.elapsed);
143-
});
144-
}
126+
function addBackgroundProcesses():Void {}
145127

146128
function addEventListeners():Void
147129
{

source/starcore/backend/util/CacheUtil.hx

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
package starcore.backend.util;
22

33
import starcore.entity.Entity;
4-
import starcore.shaders.*;
54

65
/**
76
* Class that holds general, temporary data for pretty much anything.
@@ -40,20 +39,5 @@ final class CacheUtil
4039
*/
4140
public static var registeredEntities:Array<Entity> = [];
4241

43-
/**
44-
* VCR border shader for Starcore.
45-
*/
46-
public static var vcrBorderShader:VCRBorderShader;
47-
48-
/**
49-
* VCR Mario 85 shader for Starcore.
50-
*/
51-
public static var vcrMario85Shader:VCRMario85Shader;
52-
53-
/**
54-
* Grain shader for Starcore.
55-
*/
56-
public static var grainShader:GrainShader;
57-
5842
function new() {}
5943
}

source/starcore/backend/util/FlixelUtil.hx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,7 @@ final class FlixelUtil
180180
case FAST:
181181
currentShadersApplied = [new GrainShader(), new Hq2xShader(), new TiltshiftShader(), new ScanlineShader()];
182182
case MINIMAL:
183-
FlxG.game.setFilters([new ShaderFilter(CacheUtil.grainShader), new ShaderFilter(new Hq2xShader())]);
183+
currentShadersApplied = [new GrainShader(), new Hq2xShader()];
184184
case NONE:
185185
currentShadersApplied = [];
186186
default:

source/starcore/shaders/VCRBorderShader.hx

Lines changed: 0 additions & 19 deletions
This file was deleted.

source/starcore/shaders/VCRLinesShader.hx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,9 @@ import openfl.Assets;
55
import starcore.backend.util.PathUtil;
66
import starcore.shaders.bases.UpdatedShader;
77

8+
/**
9+
* Adds a bending scanline effect to the screen, simulating old VCR playback.
10+
*/
811
class VCRLinesShader extends UpdatedShader
912
{
1013
public function new()

source/starcore/shaders/VCRMario85Shader.hx

Lines changed: 0 additions & 27 deletions
This file was deleted.

0 commit comments

Comments
 (0)