Switch to Barotrauma & too many misc changes to remember

This commit is contained in:
Regalis
2015-10-16 18:11:58 +03:00
parent 2bb5d41836
commit 838022fcd5
203 changed files with 540 additions and 419 deletions

View File

@@ -3,7 +3,7 @@ using Microsoft.Xna.Framework.Graphics;
using System.Collections.Generic;
using System.Linq;
namespace Subsurface.Lights
namespace Barotrauma.Lights
{
class CachedShadow
{

View File

@@ -3,7 +3,7 @@ using Microsoft.Xna.Framework.Graphics;
using System.Collections.Generic;
using System.Diagnostics;
namespace Subsurface.Lights
namespace Barotrauma.Lights
{
class LightManager
{
@@ -124,18 +124,18 @@ namespace Subsurface.Lights
spriteBatch.End();
}
//ClearAlphaToOne(graphics, spriteBatch);
//spriteBatch.Begin(SpriteSortMode.Immediate, CustomBlendStates.MultiplyWithAlpha, null, null, null, null, cam.Transform);
ClearAlphaToOne(graphics, spriteBatch);
spriteBatch.Begin(SpriteSortMode.Immediate, CustomBlendStates.MultiplyWithAlpha, null, null, null, null, cam.Transform);
//foreach (LightSource light in lights)
//{
// if (light.hullsInRange.Count > 0 || light.Color.A < 0.01f || light.Range < 1.0f) continue;
// if (!MathUtils.CircleIntersectsRectangle(light.Position, light.Range, viewRect)) continue;
foreach (LightSource light in lights)
{
if (light.hullsInRange.Count > 0 || light.Color.A < 0.01f || light.Range < 1.0f) continue;
if (!MathUtils.CircleIntersectsRectangle(light.Position, light.Range, viewRect)) continue;
// light.Draw(spriteBatch);
//}
light.Draw(spriteBatch);
}
//spriteBatch.End();
spriteBatch.End();
//clear alpha, to avoid messing stuff up later
ClearAlphaToOne(graphics, spriteBatch);

View File

@@ -5,7 +5,7 @@ using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace Subsurface.Lights
namespace Barotrauma.Lights
{
class LightSource
{