diff --git a/.gitignore b/.gitignore
new file mode 100644
index 000000000..0d09c34e4
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,11 @@
+# Build results
+[Dd]ebug/
+[Dd]ebugPublic/
+[Rr]elease/
+[Rr]eleases/
+x64/
+x86/
+build/
+bld/
+[Bb]in/
+[Oo]bj/
\ No newline at end of file
diff --git a/Performance1.psess b/Performance1.psess
new file mode 100644
index 000000000..7dc9d392d
--- /dev/null
+++ b/Performance1.psess
@@ -0,0 +1,21 @@
+
+
+ Sampling
+ None
+ true
+ Timestamp
+ Cycles
+ 10000000
+ 10
+ 10
+
+ false
+
+
+
+ false
+
+
+ false
+
+
diff --git a/Subsurface.psess b/Subsurface.psess
new file mode 100644
index 000000000..84dfb636d
--- /dev/null
+++ b/Subsurface.psess
@@ -0,0 +1,80 @@
+
+
+
+ Subsurface_Solution.sln
+ Sampling
+ None
+ true
+ true
+ Timestamp
+ Cycles
+ 10000000
+ 10
+ 10
+
+ false
+
+
+
+ false
+ 500
+
+ \Fyysinen levy(_Total)\Levyjonon keskiarvo
+ \Muisti\Sivua/s
+ \Suoritin(_Total)\Suoritinaika prosentteina
+
+
+
+ true
+ false
+ false
+
+ false
+
+
+ false
+
+
+
+ Subsurface\obj\x86\Debug\Subsurface.exe
+ 01/01/0001 00:00:00
+ true
+ true
+ false
+ false
+ false
+ false
+ false
+ true
+ false
+ Executable
+ Subsurface\bin\Windows\Debug\Subsurface.exe
+ Subsurface\bin\Windows\Debug\
+
+
+ IIS
+ InternetExplorer
+ true
+ false
+
+ false
+
+
+ false
+
+ {008C0F83-E914-4966-9135-EA885059EDD8}|Subsurface\Subsurface.csproj
+ Subsurface\Subsurface.csproj
+ Subsurface
+
+
+
+
+ Subsurface150526.vsp
+
+
+
+
+ :PB:{008C0F83-E914-4966-9135-EA885059EDD8}|Subsurface\Subsurface.csproj
+
+
+
\ No newline at end of file
diff --git a/Subsurface/Camera.cs b/Subsurface/Camera.cs
index 0bdcdea9b..30f5842d8 100644
--- a/Subsurface/Camera.cs
+++ b/Subsurface/Camera.cs
@@ -198,8 +198,9 @@ namespace Subsurface
public Vector2 WorldToScreen(Vector2 coords)
{
- Vector2 screenCoords = Vector2.Transform(coords, transform);
- return new Vector2(screenCoords.X, screenCoords.Y);
+ coords.Y = -coords.Y;
+ //Vector2 screenCoords = Vector2.Transform(coords, transform);
+ return Vector2.Transform(coords, transform);
}
}
}
diff --git a/Subsurface/Characters/Character.cs b/Subsurface/Characters/Character.cs
index c76555f74..f5dc11ff7 100644
--- a/Subsurface/Characters/Character.cs
+++ b/Subsurface/Characters/Character.cs
@@ -587,6 +587,51 @@ namespace Subsurface
// ConvertUnits.ToDisplayUnits(animController.targetMovement.X, animController.targetMovement.Y), Color.Green);
}
+
+ private static GUIProgressBar drowningBar;
+ public void DrawHud(SpriteBatch spriteBatch, Camera cam)
+ {
+ if (drowningBar==null)
+ {
+ int width = 200, height = 20;
+ drowningBar = new GUIProgressBar(new Rectangle(Game1.GraphicsWidth / 2 - width / 2, 20, width, height), Color.Blue, 1.0f);
+ }
+
+ drowningBar.BarSize = Character.Controlled.Oxygen / 100.0f;
+ if (drowningBar.BarSize < 1.0f)
+ drowningBar.Draw(spriteBatch);
+
+ if (Character.Controlled.Inventory != null)
+ Character.Controlled.Inventory.Draw(spriteBatch);
+
+ if (closestItem!=null)
+ {
+ Color color = Color.Orange;
+
+ Vector2 startPos = Position + (closestItem.Position - Position) * 0.7f;
+ startPos = cam.WorldToScreen(startPos);
+
+ Vector2 textPos = startPos;
+
+ float stringWidth = GUI.font.MeasureString(closestItem.Prefab.Name).X;
+ textPos -= new Vector2(stringWidth / 2, 20);
+ spriteBatch.DrawString(GUI.font, closestItem.Prefab.Name, textPos, Color.Black);
+ spriteBatch.DrawString(GUI.font, closestItem.Prefab.Name, textPos + new Vector2(1, -1), Color.Orange);
+
+ textPos.Y += 50.0f;
+ foreach (string text in closestItem.HighlightText)
+ {
+ textPos.X = startPos.X - GUI.font.MeasureString(text).X / 2;
+
+ spriteBatch.DrawString(GUI.font, text, textPos, Color.Black);
+ spriteBatch.DrawString(GUI.font, text, textPos + new Vector2(1, -1), Color.Orange);
+
+ textPos.Y += 25;
+ }
+ }
+
+ }
+
public void PlaySound(AIController.AiState state)
{
if (sounds == null || sounds.Count()==0) return;
diff --git a/Subsurface/Characters/Ragdoll.cs b/Subsurface/Characters/Ragdoll.cs
index 22c98658b..98f28e7d2 100644
--- a/Subsurface/Characters/Ragdoll.cs
+++ b/Subsurface/Characters/Ragdoll.cs
@@ -265,7 +265,6 @@ namespace Subsurface
Limb limb = f1.Body.UserData as Limb;
if (limb != null && (limb.type == LimbType.LeftFoot || limb.type == LimbType.RightFoot))
{
- Debug.WriteLine(contact.Manifold.LocalNormal.Y);
if (contact.Manifold.LocalNormal.Y >= 0.0f)
{
stairs = structure;
diff --git a/Subsurface/Content/Items/Weapons/spear.png b/Subsurface/Content/Items/Weapons/spear.png
new file mode 100644
index 000000000..9ae136cb8
Binary files /dev/null and b/Subsurface/Content/Items/Weapons/spear.png differ
diff --git a/Subsurface/Content/Items/Weapons/weapons.xml b/Subsurface/Content/Items/Weapons/weapons.xml
index 3d6c71d00..a801f4b9b 100644
--- a/Subsurface/Content/Items/Weapons/weapons.xml
+++ b/Subsurface/Content/Items/Weapons/weapons.xml
@@ -2,12 +2,12 @@
-
-
+
-
+
@@ -21,7 +21,7 @@
-
+