Browse Source

FNA compat changes: SpriteBatch.Begin & DrawIndexedPrimitives.

main
Colin McMillen 3 years ago
parent
commit
f6dde30804
  1. 4
      Shared/LinesOfSight.cs
  2. 2
      Shared/SneakScene.cs

4
Shared/LinesOfSight.cs

@ -119,7 +119,7 @@ namespace SemiColinGames {
foreach (EffectPass pass in lightingEffect.CurrentTechnique.Passes) { foreach (EffectPass pass in lightingEffect.CurrentTechnique.Passes) {
pass.Apply(); pass.Apply();
graphics.DrawIndexedPrimitives(PrimitiveType.TriangleList, 0, 0, indices.Length / 3);
graphics.DrawIndexedPrimitives(PrimitiveType.TriangleList, 0, 0, indices.Length, 0, indices.Length / 3);
} }
} }
@ -141,7 +141,7 @@ namespace SemiColinGames {
foreach (EffectPass pass in lightingEffect.CurrentTechnique.Passes) { foreach (EffectPass pass in lightingEffect.CurrentTechnique.Passes) {
pass.Apply(); pass.Apply();
graphics.DrawIndexedPrimitives( graphics.DrawIndexedPrimitives(
PrimitiveType.LineStrip, 0, 0, NUM_EDGE_VERTICES + 1);
PrimitiveType.LineStrip, 0, 0, NUM_EDGE_VERTICES + 1, 0, NUM_EDGE_VERTICES + 1);
} }
} }
} }

2
Shared/SneakScene.cs

@ -109,7 +109,7 @@ namespace SemiColinGames {
// Draw in-world UI on top of everything. // Draw in-world UI on top of everything.
spriteBatch.Begin( spriteBatch.Begin(
SpriteSortMode.Deferred, null, SamplerState.PointClamp, null, null, null, null);
SpriteSortMode.Deferred, null, SamplerState.PointClamp, null, null, null, Matrix.Identity);
for (int i = 0; i < world.Player.MaxHealth; i++) { for (int i = 0; i < world.Player.MaxHealth; i++) {
Vector2 pos = new Vector2(16 + 15 * i, 8); Vector2 pos = new Vector2(16 + 15 * i, 8);
if (world.Player.Health > i) { if (world.Player.Health > i) {

Loading…
Cancel
Save