浏览代码

minor fixes

ncannasse 8 年之前
父节点
当前提交
8c02ec1726
共有 3 个文件被更改,包括 7 次插入4 次删除
  1. 1 2
      h2d/filter/DropShadow.hx
  2. 5 1
      h2d/filter/Glow.hx
  3. 1 1
      hxd/net/SteamHost.hx

+ 1 - 2
h2d/filter/DropShadow.hx

@@ -20,8 +20,7 @@ class DropShadow extends Glow {
 	}
 
 	override function draw( ctx : RenderContext, t : h2d.Tile ) {
-		pass.shader.fixedColor.setColor(color);
-		pass.shader.fixedColor.w = alpha;
+		setParams();
 		var save = ctx.textures.allocTarget("glowSave", ctx, t.width, t.height, false);
 		h3d.pass.Copy.run(t.getTexture(), save, None);
 		pass.apply(save, ctx.textures.allocTarget("glowTmp", ctx, t.width, t.height, false));

+ 5 - 1
h2d/filter/Glow.hx

@@ -15,10 +15,14 @@ class Glow extends Blur {
 		pass.shader.hasFixedColor = true;
 	}
 
-	override function draw( ctx : RenderContext, t : h2d.Tile ) {
+	function setParams() {
 		pass.shader.fixedColor.setColor(color);
 		pass.shader.fixedColor.w = alpha;
 		pass.shader.smoothFixedColor = smoothColor;
+	}
+
+	override function draw( ctx : RenderContext, t : h2d.Tile ) {
+		setParams();
 		var save = ctx.textures.allocTarget("glowSave", ctx, t.width, t.height, false);
 		h3d.pass.Copy.run(t.getTexture(), save, None);
 		pass.apply(t.getTexture(), ctx.textures.allocTarget("glowTmp", ctx, t.width, t.height, false));

+ 1 - 1
hxd/net/SteamHost.hx

@@ -24,7 +24,7 @@ package hxd.net;
 #if !hxbit
 #error	"Using SteamHost requires compiling with -lib hxbit"
 #end
-#if !steamwrap
+#if !hlsteam
 #error	"Using SteamHost requires compiling with -lib steamwrap"
 #end
 import hxbit.NetworkHost;