cinvoke-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[cinvoke-svn] r115 - trunk


From: will
Subject: [cinvoke-svn] r115 - trunk
Date: 7 Nov 2006 16:29:42 -0500

Author: will
Date: 2006-11-07 16:29:42 -0500 (Tue, 07 Nov 2006)
New Revision: 115

Removed:
   trunk/App.ico
   trunk/AssemblyInfo.cs
   trunk/Assets.cs
   trunk/Chat.cs
   trunk/Client.cs
   trunk/Console.cs
   trunk/Controller.cs
   trunk/Form1.cs
   trunk/Form1.resx
   trunk/PlayerList.cs
   trunk/assets/
   trunk/dedicated/
   trunk/server/
   trunk/skorpion.cs
   trunk/skorpion.csproj
   trunk/skorpion.sln
Log:
oops


Deleted: trunk/App.ico
===================================================================
(Binary files differ)

Deleted: trunk/AssemblyInfo.cs
===================================================================
--- trunk/AssemblyInfo.cs       2006-11-07 21:27:46 UTC (rev 114)
+++ trunk/AssemblyInfo.cs       2006-11-07 21:29:42 UTC (rev 115)
@@ -1,58 +0,0 @@
-using System.Reflection;
-using System.Runtime.CompilerServices;
-
-//
-// General Information about an assembly is controlled through the following 
-// set of attributes. Change these attribute values to modify the information
-// associated with an assembly.
-//
-[assembly: AssemblyTitle("")]
-[assembly: AssemblyDescription("")]
-[assembly: AssemblyConfiguration("")]
-[assembly: AssemblyCompany("")]
-[assembly: AssemblyProduct("")]
-[assembly: AssemblyCopyright("")]
-[assembly: AssemblyTrademark("")]
-[assembly: AssemblyCulture("")]                
-
-//
-// Version information for an assembly consists of the following four values:
-//
-//      Major Version
-//      Minor Version 
-//      Build Number
-//      Revision
-//
-// You can specify all the values or you can default the Revision and Build 
Numbers 
-// by using the '*' as shown below:
-
-[assembly: AssemblyVersion("1.0.*")]
-
-//
-// In order to sign your assembly you must specify a key to use. Refer to the 
-// Microsoft .NET Framework documentation for more information on assembly 
signing.
-//
-// Use the attributes below to control which key is used for signing. 
-//
-// Notes: 
-//   (*) If no key is specified, the assembly is not signed.
-//   (*) KeyName refers to a key that has been installed in the Crypto Service
-//       Provider (CSP) on your machine. KeyFile refers to a file which 
contains
-//       a key.
-//   (*) If the KeyFile and the KeyName values are both specified, the 
-//       following processing occurs:
-//       (1) If the KeyName can be found in the CSP, that key is used.
-//       (2) If the KeyName does not exist and the KeyFile does exist, the key 
-//           in the KeyFile is installed into the CSP and used.
-//   (*) In order to create a KeyFile, you can use the sn.exe (Strong Name) 
utility.
-//       When specifying the KeyFile, the location of the KeyFile should be
-//       relative to the project output directory which is
-//       %Project Directory%\obj\<configuration>. For example, if your KeyFile 
is
-//       located in the project directory, you would specify the 
AssemblyKeyFile 
-//       attribute as [assembly: AssemblyKeyFile("..\\..\\mykey.snk")]
-//   (*) Delay Signing is an advanced option - see the Microsoft .NET Framework
-//       documentation for more information on this.
-//
-[assembly: AssemblyDelaySign(false)]
-[assembly: AssemblyKeyFile("")]
-[assembly: AssemblyKeyName("")]

Deleted: trunk/Assets.cs
===================================================================
--- trunk/Assets.cs     2006-11-07 21:27:46 UTC (rev 114)
+++ trunk/Assets.cs     2006-11-07 21:29:42 UTC (rev 115)
@@ -1,170 +0,0 @@
-using System;
-using System.IO;
-using System.Text;
-using System.Text.RegularExpressions;
-using System.Collections;
-using Microsoft.DirectX;
-using Microsoft.DirectX.Direct3D;
-
-namespace skorpion 
-{
-       public class Assets 
-       {
-               private class DefinedAsset 
-               {
-                       public DefinedAsset() {}
-
-                       public VertexBuffer Vertex = null;
-               }
-               private class LoadedAsset 
-               {
-                       public LoadedAsset() {}
-
-                       public CustomVertex.PositionNormalTextured[] 
LoadedVertex = null;
-                       public int NumTriangles = -1;
-               }
-
-               private static Hashtable _definedassets = new Hashtable();
-               private static Hashtable _definedtextures = new Hashtable();
-               private static Hashtable _loadedassets = new Hashtable();
-               private static Hashtable _loadedtextures = new Hashtable();
-
-               public static void RenderAsset(Device iDevice, string 
assetname, string texturename) 
-               {
-                       DefinedAsset a = 
(DefinedAsset)_definedassets[assetname];
-                       if (a == null)
-                               throw new Exception("Asset " + assetname + " 
not found");
-                       LoadedAsset l = (LoadedAsset)_loadedassets[assetname];
-
-                       iDevice.SetTexture(0, 
(Texture)_definedtextures[texturename]);
-                       iDevice.SetStreamSource(0, a.Vertex, 0, 
CustomVertex.PositionNormalTextured.StrideSize);
-                       iDevice.DrawPrimitives(PrimitiveType.TriangleList, 0, 
l.NumTriangles);
-               }
-
-               public static void Reset() {
-                       _definedassets.Clear();
-                       _definedtextures.Clear();
-               }
-
-               public static void AddAsset(Device iDevice, string assetname, 
string texturename) 
-               {
-                       if (!_loadedassets.Contains(assetname))
-                               LoadAsset(assetname);
-                       if (!_loadedtextures.Contains(texturename))
-                               LoadTexture(assetname, texturename);
-                       DefineAsset(iDevice, assetname, 
(LoadedAsset)_loadedassets[assetname], texturename, 
(string)_loadedtextures[texturename]);
-               }
-
-               private static void DefineAsset(Device iDevice, string 
assetname, LoadedAsset loaded, string texturename, string texturefile) 
-               {
-                       if (!_definedtextures.Contains(texturename))
-                               _definedtextures[texturename] = 
TextureLoader.FromFile(iDevice, texturefile);
-                       if (!_definedassets.Contains(assetname)) {
-                               DefinedAsset ret = new DefinedAsset();
-
-                               VertexBuffer vert = new 
VertexBuffer(typeof(CustomVertex.PositionNormalTextured), 
loaded.LoadedVertex.Length, iDevice, Usage.WriteOnly, 
CustomVertex.PositionNormalTextured.Format, Pool.Default);
-                               CustomVertex.PositionNormalTextured[] v = 
(CustomVertex.PositionNormalTextured[])vert.Lock(0, 0);
-
-                               for (int i = 0; i < loaded.LoadedVertex.Length; 
i++)
-                                       v[i] = loaded.LoadedVertex[i];
-
-                               vert.Unlock();
-                               ret.Vertex = vert;
-
-                               _definedassets[assetname] = ret;
-                       }
-               }
-
-               private static void LoadAsset(string assetname) {
-                       LoadedAsset ret = new LoadedAsset();
-
-                       string dirname = @"assets\" + assetname;
-                       if (!Directory.Exists(dirname))
-                               throw new Exception("Directory " + dirname + " 
not found");
-
-                       LoadGeometry(dirname, assetname, ret);
-
-                       _loadedassets[assetname] = ret;
-               }
-
-               private static void LoadTexture(string assetname, string 
texturename) 
-               {
-                       string dirname = @"assets\" + assetname;
-                       if (!Directory.Exists(dirname))
-                               throw new Exception("Directory " + dirname + " 
not found");
-
-                       _loadedtextures[texturename] = FindTexture(dirname, 
texturename);
-               }
-
-               private static string FindTexture(string dirname, string 
texturename) {
-                       string wildcard = dirname + @"\" + texturename + ".";
-                       if (File.Exists(wildcard + "gif"))
-                               return wildcard + "gif";
-                       else if (File.Exists(wildcard + "tga"))
-                               return wildcard + "tga";
-                       else if (File.Exists(wildcard + "jpg"))
-                               return wildcard + "jpg";
-                       else if (File.Exists(wildcard + "png"))
-                               return wildcard + "png";
-                       else
-                               throw new Exception("Texture " + texturename + 
" not found in " + dirname);
-               }
-
-               private static void LoadGeometry(string dirname, string 
assetname, LoadedAsset ret) 
-               {
-                       string filename = dirname + @"\" + assetname + ".obj";
-                       if (!File.Exists(filename))
-                               throw new Exception("Geometry file " + filename 
+ " not found");
-
-                       ArrayList tempverts = new ArrayList();
-                       ArrayList temptex = new ArrayList();
-                       ArrayList tempnorms = new ArrayList();
-
-                       ArrayList all = new ArrayList();
-                       int numtriangles = 0;
-
-                       using (StreamReader reader = new StreamReader(filename, 
Encoding.ASCII)) 
-                       {
-                               string line;
-                               while ((line = reader.ReadLine()) != null) 
-                               {
-                                       if (line == string.Empty) continue;
-                                       if (line[0] == '#') continue;
-
-                                       string[] words = line.Split(' ');
-
-                                       if (words[0] == "v") {
-                                               tempverts.Add(new 
Vector3(Convert.ToSingle(words[1]), Convert.ToSingle(words[2]), 
Convert.ToSingle(words[3])));
-                                       } 
-                                       else if (words[0] == "vt") {
-                                               float f1 = 
Convert.ToSingle(words[1]);
-                                               float f2 = 
Convert.ToSingle(words[2]);
-                                               f2 = (1.0f - f2);
-                                               temptex.Add(new Vector2(f1, 
f2));
-                                       } else if (words[0] == "vn") {
-                                               tempnorms.Add(new 
Vector3(Convert.ToSingle(words[1]), Convert.ToSingle(words[2]), 
Convert.ToSingle(words[3])));
-                                       }
-                                       else if (words[0] == "f") {
-                                               for (int i = 1; i < 4; i++) {
-                                                       string[] comps = 
words[i].Split('/');
-                                                       int vertindex = 
Convert.ToInt16(comps[0]) - 1;
-                                                       int texindex = 
Convert.ToInt16(comps[1]) - 1;
-                                                       int normindex = 
Convert.ToInt16(comps[2]) - 1;
-
-                                                       
CustomVertex.PositionNormalTextured vert = new 
CustomVertex.PositionNormalTextured();
-                                                       
vert.SetPosition(ClientUtils.Vec((Vector3)tempverts[vertindex]));
-                                                       
vert.SetNormal(ClientUtils.Vec((Vector3)tempnorms[normindex]));
-                                                       vert.Tu = 
((Vector2)temptex[texindex]).X;
-                                                       vert.Tv = 
((Vector2)temptex[texindex]).Y;
-                                                       all.Add(vert);
-                                               }
-                                               numtriangles++;
-                                       }
-                               }
-                       }
-
-                       ret.NumTriangles = numtriangles;
-                       ret.LoadedVertex = 
(CustomVertex.PositionNormalTextured[])all.ToArray(typeof(CustomVertex.PositionNormalTextured));
-               }
-       }
-}

Deleted: trunk/Chat.cs
===================================================================
--- trunk/Chat.cs       2006-11-07 21:27:46 UTC (rev 114)
+++ trunk/Chat.cs       2006-11-07 21:29:42 UTC (rev 115)
@@ -1,140 +0,0 @@
-using System;
-using System.Collections;
-using System.Text;
-using System.Drawing;
-using System.Threading;
-using Microsoft.DirectX;
-using Microsoft.DirectX.Direct3D;
-
-namespace skorpion
-{
-       public class Chat
-       {
-               private enum ChatState
-               {
-                       Typing,
-                       NotTyping
-               }
-
-               public  bool                PassCommands              = false;
-
-               private bool                _debug                    = false;
-               private Mutex               _lock                     = null;
-               private static string       _prefix                   = ">";
-               private ChatState           _state                    = 
ChatState.NotTyping;
-               private DateTime            _stateChange;
-               private ArrayList           _entries                  = new 
ArrayList();
-               private StringBuilder       _entryLine                = new 
StringBuilder(_prefix);
-               private System.Drawing.Font _windowsFont              = new 
System.Drawing.Font("Arial", 8.0f);
-               private Device              _device;
-
-               private Microsoft.DirectX.Direct3D.Font _font;
-               private int                             _alpha        = 159;
-
-               public bool IsActive  { get { return _state == 
ChatState.Typing; } }
-               public int  LineHeight { get { return (int)_windowsFont.Size * 
2; } }
-
-               public Chat(bool debug)
-               {
-                       _debug = debug;
-                       if (_debug)
-                               _lock = new Mutex();
-               }
-
-               public void RestoreDeviceObjects(Device device)
-               {
-                       _device = device;
-                       _font   = new Microsoft.DirectX.Direct3D.Font(_device, 
_windowsFont);
-               }
-
-               public void Print(string text)
-               {
-                       if (_debug)
-                               _lock.WaitOne();
-
-                       _entries.Insert(0, text);
-                       while(_entries.Count > 50)
-                       {
-                               _entries.RemoveAt(49);
-                       }
-
-                       if (_debug)
-                               _lock.ReleaseMutex();
-               }
-
-               public void PrintFormat(string text, params object[] args)
-               {
-                       Print(string.Format(text, args));
-               }
-
-               public void PrintCharacterToEntryLine(char character)
-               {
-                       _entryLine.Append(character);
-               }
-
-               public void PrintStringToEntryLine(string text)
-               {
-                       _entryLine.Append(text);
-               }
-
-               public void Backspace()
-               {
-                       if (_entryLine.Length > 1)
-                               _entryLine.Remove(_entryLine.Length - 1, 1);
-               }
-
-               public void ProcessEntryLine()
-               {
-                       string text = _entryLine.ToString().Trim().Remove(0, 1);
-                       if(text.Length > 0)
-                               GlobalState.Command.Execute("rcon say " + text);
-       
-                       _entryLine = new StringBuilder(_prefix);
-               }
-
-               public void ToggleState()
-               {
-                       if (_state == ChatState.Typing)
-                               _state  = ChatState.NotTyping;
-                       else
-                       {
-                               _state = ChatState.Typing;
-                       }
-
-                       _stateChange = DateTime.Now;
-               }
-
-               public void Render()
-               {
-                       int   line    = GlobalState.Form.Height;
-                             line   -= 3 * this.LineHeight;
-
-                       // draw entry line
-                       Color r = Color.Red;
-                       int red = Color.FromArgb(_alpha, r.R, r.G, 
r.B).ToArgb();
-                       if(_state == ChatState.Typing)
-                       {
-                               _font.DrawText(_entryLine.ToString(), new 
System.Drawing.Rectangle(2, line, 0, 0), DrawTextFormat.None, red);
-                               line -= this.LineHeight;
-                       }
-                       if (_debug)
-                               _lock.WaitOne();
-
-                       // draw stored entries
-                       foreach(string entry in _entries)
-                       {
-                               if (line > GlobalState.Form.Height - 150)
-                               {
-                                       _font.DrawText(entry, new 
System.Drawing.Rectangle(2, line, 0, 0), DrawTextFormat.None, red);
-                                       line -= this.LineHeight;
-                               }
-                       }
-
-                       if (_debug)
-                               _lock.ReleaseMutex();
-
-                       _device.RenderState.Lighting = true;
-                       _device.RenderState.AlphaBlendEnable = false;
-               }
-       }
-}
\ No newline at end of file

Deleted: trunk/Client.cs
===================================================================
--- trunk/Client.cs     2006-11-07 21:27:46 UTC (rev 114)
+++ trunk/Client.cs     2006-11-07 21:29:42 UTC (rev 115)
@@ -1,449 +0,0 @@
-using System;
-using System.Collections;
-using Microsoft.DirectX;
-
-namespace skorpion
-{
-       public class ClientUtils {
-               public static Microsoft.DirectX.Vector3 Vec(Vector3 vec) {
-                       return new Microsoft.DirectX.Vector3(vec.X, vec.Y, 
vec.Z);
-               }
-               public static Vector3 Vec(Microsoft.DirectX.Vector3 vec) {
-                       return new Vector3(vec.X, vec.Y, vec.Z);
-               }
-       }
-
-       public class GameClient {
-               public Universe       Universe;
-               public NetClient      Net;
-               public bool           Ready;
-
-               public ushort         MyID;
-               public Ship           Me;
-               public TokenVelocity  MyVelocity;
-               public TokenVelocity  MyLastVelocity;
-               public DateTime       BurstBegin;
-
-               public DateTime       LastSent;
-               public DateTime       LastReceived;
-
-               public Pinger         Pinger;
-               public ushort         Ping;
-               public ushort         RefreshInterval;
-
-               public Hashtable      LastFrame  = new Hashtable();
-               public Hashtable      ThisFrame  = new Hashtable();
-               public Hashtable      NextFrame  = new Hashtable();
-
-               public PlayerInfo     LastPlayerInfo;
-
-               public class Collision
-               {
-                       public ushort   ID1;
-                       public ushort   ID2;
-                       public DateTime time;
-                       public Vector3  nd1; // new destination
-                       public Vector3  nd2;
-                       public Collision(ushort id1, ushort id2, DateTime t, 
Vector3 n1, Vector3 n2)
-                       { ID1=id1; ID2=id2; time=t; nd1=n1;nd2=n2; }
-               }
-               public ArrayList      Collisions = new ArrayList();
-               
-               public bool           HoldCamera;
-               public Vector3        LastOrientation;
-               public Vector3        LastUpDirection;
-
-               public GameClient(Universe u, NetClient n) {
-                       Universe     = u;
-                       Net          = n;
-                       Ready        = false;
-                       Me           = new Ship(0);
-                       LastSent     = DateTime.Now;
-                       LastReceived = DateTime.Now;
-                       Pinger       = new Pinger();
-               }
-
-               public void Run() {
-                       ArrayList msg = Net.communicate();
-
-                       if (Ready == false && msg.Count > 0) {
-                               // we just connected or got unlagged
-                               Ready = true;
-                               GlobalState.Console.Print("*** connected to " + 
Net.remote.Address.ToString());
-                       }
-                       else if (Ready == true && Net.Connected == false) {
-                               // net broke
-                               Ready = false;
-                               GlobalState.Console.Print("*** connection 
error");
-                       }
-                       else if (Ready == true && LastReceived < 
DateTime.Now.Subtract(ClientConfig.ClientGameTimeout)) {
-                               // timeout
-                               Ready = false;
-                               GlobalState.Console.Print("*** connection timed 
out");
-                       }
-
-                       for(int i=0; i<msg.Count; i++) {
-                               if (JoinAck.TYPE == ((GameMsg)msg[i]).Type) 
-                               {
-                                       JoinAck m = (JoinAck)msg[i];
-                                       Net.ACKQueue.ACK(m.ACK);
-
-                                       MyID = m.YouAreID;
-                                       if (!Universe.Entities.Contains(MyID))
-                                               Universe.Entities[MyID] = new 
Ship(MyID);
-
-                                       Ship universeMe = 
(Ship)Universe.Entities[MyID];
-                                       universeMe.Position    = 
m.ShipPos.GetVector();
-                                       universeMe.Orientation = 
m.ShipOrt.GetVector();
-                                       universeMe.UpDirection = 
m.ShipUp.GetVector();
-
-                                       Me.ID          = universeMe.ID;
-                                       Me.Position    = universeMe.Position;
-                                       Me.Orientation = universeMe.Orientation;
-                                       Me.UpDirection = universeMe.UpDirection;
-                               }
-                               else if (WorldRefresh.TYPE == 
((GameMsg)msg[i]).Type) 
-                               {
-                                       WorldRefresh m = (WorldRefresh)msg[i];
-                                       Universe.Entities.Clear();
-
-                                       for (int j=0; j<m.BallID.Length; j++) 
-                                       {
-                                               ushort id = m.BallID[j];
-                                               Universe.Entities[id] = new 
Ball(id);
-
-                                               Ball b     = 
(Ball)Universe.Entities[id];
-                                               b.Position = 
m.BallPos[j].GetVector();
-                                               b.Velocity = 
m.BallVel[j].GetVector();
-                                       }
-
-                                       for (ushort j=0; j<m.ShipID.Length; 
j++) 
-                                       {
-                                               ushort id = m.ShipID[j];
-                                               Universe.Entities[id] = new 
Ship(id);
-
-                                               Ship s        = 
(Ship)Universe.Entities[id];
-                                               s.Position    = 
m.ShipPos[j].GetVector();
-                                               s.Orientation = 
m.ShipOrt[j].GetVector();
-                                               s.UpDirection = 
m.ShipUp[j].GetVector();
-                                               s.Velocity    = 
m.ShipVel[j].GetVector();
-                                       }
-
-                                       Ship universeMe = 
(Ship)Universe.Entities[MyID];
-                                       if (universeMe != null) 
-                                       {
-                                               Me.Position = 
universeMe.Position;
-                                       }
-
-                                       Pinger.Receive(m.Ping, ref Ping);
-                                       RefreshInterval = 
(ushort)(DateTime.Now.Subtract(LastReceived)).TotalMilliseconds;
-                                       LastReceived = DateTime.Now;
-
-                                       if (ClientConfig.ClientPrediction) 
-                                       {
-                                               LastFrame = ThisFrame;
-                                               //                      
Universe.LastTime = LastReceived.Subtract(new TimeSpan(0,0,0,0,Ping));
-                                               //                      
Universe.Run();
-                                               NextFrame = Universe.Entities;
-
-                                               ThisFrame = new Hashtable();
-                                               // copy relevant rendering 
fields
-                                               foreach(DictionaryEntry de in 
NextFrame) 
-                                               {
-                                                       Entity e = null;
-                                                       if 
(((Entity)de.Value).Type == Ship.TYPE) 
-                                                       {
-                                                               Ship s = new 
Ship((ushort)de.Key);
-                                                               s.Orientation = 
((Ship)de.Value).Orientation;
-                                                               s.UpDirection = 
((Ship)de.Value).UpDirection;
-                                                               e = (Entity)s;
-                                                       }
-                                                       else // this could 
break stuff with objects other than ships
-                                                               e = new 
Entity((ushort)de.Key, ((Entity)de.Value).Type, ((Entity)de.Value).Radius, "", 
"");
-
-                                                       e.Position = 
((Entity)de.Value).Position;
-                                                       e.Active   = 
((Entity)de.Value).Active;
-
-                                                       ThisFrame[e.ID] = e;
-                                               }
-
-                                               Collisions.Clear();
-                                               // traverse in reverse time 
converting collision point to next destination
-                                               for (int 
j=m.CollidedTime.Length-1; j>=0; j--)
-                                               {
-                                                       Entity e1 = 
(Entity)NextFrame[m.Collided1[j]];
-                                                       Entity e2 = 
(Entity)NextFrame[m.Collided2[j]];
-                                                       if (e1 == null || e2 == 
null)
-                                                               continue;
-
-                                                       Collisions.Add(new 
Collision(e1.ID, e2.ID,
-                                                               
LastReceived.Add(new TimeSpan(0,0,0,0,m.CollidedTime[j]*10)),
-                                                               e1.Position, 
e2.Position));
-
-                                                       e1.Position = 
m.CollisionPoint1[i].GetVector();
-                                                       e2.Position = 
m.CollisionPoint2[i].GetVector();
-                                               }
-                                               Collisions.Reverse();
-                                       }
-                                       else 
-                                       {
-                                               ThisFrame = Universe.Entities;
-                                       }
-                               }
-                               else if (RconAck.TYPE == ((GameMsg)msg[i]).Type)
-                               {
-                                       RconAck m = (RconAck)msg[i];
-                                       Net.ACKQueue.ACK(m.ACK);
-                               }
-                               else if (DisplayReq.TYPE == 
((GameMsg)msg[i]).Type)
-                               {
-                                       DisplayReq m = (DisplayReq)msg[i];
-                                       Net.ACKQueue.ACK(m.Seq);
-
-                                       GlobalState.Console.Print(m.Message);
-                                       GlobalState.Chat.Print(m.Message);
-
-                                       DisplayAck r = new DisplayAck();
-                                       r.ACK = m.Seq;
-                                       r.Response = "Message Sent: " + m.Seq;
-                                       Net.send(r);
-                               }
-                               else if (PlayerInfo.TYPE == 
((GameMsg)msg[i]).Type)
-                               {
-                                       LastPlayerInfo = (PlayerInfo)msg[i];
-                                       
-                                       for(int playerIndex = 0; playerIndex < 
LastPlayerInfo.Name.Length; playerIndex++)
-                                       {
-                                               ushort id = 
LastPlayerInfo.ID[playerIndex];
-                                               Ship ship = 
(Ship)Universe.Players[id];
-                                               if(ship == null)
-                                               {
-                                                       ship = new Ship(id);
-                                                       Universe.Players[id] = 
ship;
-                                               }
-
-                                               ship.Name = 
LastPlayerInfo.Name[playerIndex];
-                                               ship.Ping = 
LastPlayerInfo.Ping[playerIndex];
-                                               ship.Team = 
LastPlayerInfo.Team[playerIndex];
-                                       }
-                               }
-                               else if (TeamAck.TYPE == ((GameMsg)msg[i]).Type)
-                               {
-                                       TeamAck teamAck = (TeamAck)msg[i];
-                                       System.Console.Out.WriteLine("DEBUG: 
team assignment to " + teamAck.Team + " received by client");
-                                       Net.ACKQueue.ACK(teamAck.ACK);
-                               }
-                       }
-
-                       // interpolate
-                       if (ClientConfig.ClientPrediction && Ready) {
-                               ushort t = 
(ushort)(DateTime.Now.Subtract(LastReceived)).TotalMilliseconds;
-                               
-                               // make this use iterators if its kept
-                               foreach(DictionaryEntry de in ThisFrame) {
-                                       if (!LastFrame.Contains(de.Key))
-                                               continue;
-
-                                       ((Entity)de.Value).Position  = 
((Entity)LastFrame[de.Key]).Position;
-                                       ((Entity)de.Value).Position +=
-                                               
(((Entity)NextFrame[de.Key]).Position - ((Entity)LastFrame[de.Key]).Position)
-                                               * ((float)t / 
(float)RefreshInterval);
-
-                                       if ((ushort)de.Key == MyID)
-                                       {
-                                               Me.Position = 
((Entity)de.Value).Position;
-                                               //if (Me.Position.X == 
float.NaN)
-                                               //      
System.Windows.Forms.MessageBox.Show("went nan");
-                                       }
-                               }
-
-                               while (Collisions.Count > 0 && 
((Collision)Collisions[0]).time <= DateTime.Now)
-                               {
-                                       Collision c = (Collision)Collisions[0];
-
-                                       Vector3 cd1 = 
((Entity)NextFrame[c.ID1]).Position;
-                                       Vector3 cd2 = 
((Entity)NextFrame[c.ID2]).Position;
-
-                                       ((Entity)LastFrame[c.ID1]).Position = 
cd1;
-                                       ((Entity)LastFrame[c.ID2]).Position = 
cd2;
-
-                                       ((Entity)NextFrame[c.ID1]).Position = 
c.nd1;
-                                       ((Entity)NextFrame[c.ID2]).Position = 
c.nd2;
-
-                                       Collisions.RemoveAt(0);
-                               }
-                       }
-               }
-
-               public void UpdateServer() {
-                       // this may eventually be sent to server, if not then, 
move this hack
-                       if (MyVelocity.rollLeft)
-                               this.rollLeft(GlobalState.KeyboardSensitivity);
-                       if (MyVelocity.rollRight)
-                               this.rollRight(GlobalState.KeyboardSensitivity);
-
-                       // continue with normal logic =)
-                       if (!Ready)
-                               return;
-
-                       // update whenver a button is pressed
-                       // but only do orientation updates perodically
-                       bool update = false;
-
-                       if (MyLastVelocity.NotEqual(MyVelocity)) {
-                               update = true;
-                               MyLastVelocity = MyVelocity;
-                       }
-                       else {
-                               DateTime refreshtime = 
DateTime.Now.Subtract(ClientConfig.ClientRefresh);
-                               if (LastSent < refreshtime)
-                                       update = true;
-                       }
- 
-                       if (update) {
-                               PlayerRefresh m = new PlayerRefresh();
-                               m.ShipOrt.SetVector(Me.Orientation);
-                               m.ShipUp.SetVector(Me.UpDirection);
-                               
m.Velocity.SetVector(MyVelocity.Total(Me.Orientation, Me.UpDirection));
-                               m.Ping = Pinger.Send();
-
-                               Net.send(m);
-
-                               LastSent = DateTime.Now;
-                       }
-               }
-
-               public void burstStart(string s)
-               {
-                       BurstBegin = DateTime.Now;
-                       // LOG.debug("burstStart");
-               }
-
-               public void burstStop(string s)
-               {                       
-                       PlayerRefresh m = new PlayerRefresh();
-                       m.ShipOrt.SetVector(Me.Orientation);
-                       m.ShipUp.SetVector(Me.UpDirection);
-                       m.Velocity.SetVector(MyVelocity.Total(Me.Orientation, 
Me.UpDirection));
-                       m.Ping = Pinger.Send();
-
-                       int b = 
(int)(DateTime.Now.Subtract(BurstBegin)).TotalMilliseconds;
-                       if (b > 65535) b = 65535;
-                       m.Burst = (ushort)b;
-                       // LOG.debug("sent burst " + m.Burst + " " + b);
-
-                       Net.send(m);
-
-                       LastSent = DateTime.Now;
-               }
-
-               public struct TokenVelocity {
-                       public bool forward;
-                       public bool back;
-                       public bool left;
-                       public bool right;
-                       public bool up;
-                       public bool down;
-
-                       public bool rollLeft;  // not compared
-                       public bool rollRight; // not compared
-
-                       public bool NotEqual(TokenVelocity t) {
-                               if (forward != t.forward) return true;
-                               if (back    != t.back)    return true;
-                               if (left    != t.left)    return true;
-                               if (right   != t.right)   return true;
-                               if (up      != t.up)      return true;
-                               if (down    != t.down)    return true;
-                               return false;
-                       }
-
-                       public Vector3 Total(Vector3 ort, Vector3 u) {
-                               Vector3 ret = new Vector3(0,0,0);
-
-                               Vector3 r = Vector3.Cross(ort, u);
-                               r.Normalize();
-
-                               if (forward && !back)
-                                       ret += ort;
-                               if (back && !forward)
-                                       ret += ort * -1f;
-                               if (left && !right)
-                                       ret += r;
-                               if (right && !left)
-                                       ret += r   * -1f;
-                               if (up && !down)
-                                       ret += u;
-                               if (down && !up)
-                                       ret += u   * -1f;
-                               
-                               ret.Normalize();
-                               return ret;
-                       }
-               }
-
-               public void rollLeft(int delta) {
-                       Matrix rotation = 
Matrix.RotationAxis(ClientUtils.Vec(Me.Orientation), .001f * 
GlobalState.KeyboardSensitivity);
-                       Me.UpDirection = 
ClientUtils.Vec(Microsoft.DirectX.Vector3.TransformCoordinate(ClientUtils.Vec(Me.UpDirection),
 rotation));
-               }
-               
-               public void rollRight(int delta) {
-                       Matrix rotation = 
Matrix.RotationAxis(ClientUtils.Vec(Me.Orientation), -.001f * 
GlobalState.KeyboardSensitivity);
-                       Me.UpDirection = 
ClientUtils.Vec(Microsoft.DirectX.Vector3.TransformCoordinate(ClientUtils.Vec(Me.UpDirection),
 rotation));
-               }
-
-               public void pitchUp(int delta) {
-                       Vector3 right = Vector3.Cross(Me.Orientation, 
Me.UpDirection);
-                       right.Normalize();
-
-                       Matrix rotation = 
Matrix.RotationAxis(ClientUtils.Vec(right), (float)delta * 
-GlobalState.MouseSensitivity);
-                       Me.Orientation = 
ClientUtils.Vec(Microsoft.DirectX.Vector3.TransformCoordinate(ClientUtils.Vec(Me.Orientation),
 rotation));
-                       Me.UpDirection = 
ClientUtils.Vec(Microsoft.DirectX.Vector3.TransformCoordinate(ClientUtils.Vec(Me.UpDirection),
 rotation));
-               }
-               
-               public void pitchDown(int delta) {
-                       Vector3 right = Vector3.Cross(Me.Orientation, 
Me.UpDirection);
-                       right.Normalize();
-
-                       Matrix rotation = 
Matrix.RotationAxis(ClientUtils.Vec(right), (float)delta * 
GlobalState.MouseSensitivity);
-                       Me.Orientation = 
ClientUtils.Vec(Microsoft.DirectX.Vector3.TransformCoordinate(ClientUtils.Vec(Me.Orientation),
 rotation));
-                       Me.UpDirection = 
ClientUtils.Vec(Microsoft.DirectX.Vector3.TransformCoordinate(ClientUtils.Vec(Me.UpDirection),
 rotation));
-               }
-
-               public void yawLeft(int delta) {
-                       Matrix rotation = 
Matrix.RotationAxis(ClientUtils.Vec(Me.UpDirection), (float)delta * 
GlobalState.MouseSensitivity);
-                       Me.Orientation = 
ClientUtils.Vec(Microsoft.DirectX.Vector3.TransformCoordinate(ClientUtils.Vec(Me.Orientation),
 rotation));
-               }
-
-               public void yawRight(int delta) {
-                       Matrix rotation = 
Matrix.RotationAxis(ClientUtils.Vec(Me.UpDirection), (float)delta * 
-GlobalState.MouseSensitivity);
-                       Me.Orientation = 
ClientUtils.Vec(Microsoft.DirectX.Vector3.TransformCoordinate(ClientUtils.Vec(Me.Orientation),
 rotation));
-               }
-
-               public void moveForwardStart (string s) { MyVelocity.forward   
= true;  }
-               public void moveForwardStop  (string s) { MyVelocity.forward   
= false; }
-               public void moveBackwardStart(string s) { MyVelocity.back      
= true;  }
-               public void moveBackwardStop (string s) { MyVelocity.back      
= false; }
-               public void moveLeftStart    (string s) { MyVelocity.left      
= true;  }
-               public void moveLeftStop     (string s) { MyVelocity.left      
= false; }
-               public void moveRightStart   (string s) { MyVelocity.right     
= true;  }
-               public void moveRightStop    (string s) { MyVelocity.right     
= false; }
-               public void moveUpStart      (string s) { MyVelocity.up        
= true;  }
-               public void moveUpStop       (string s) { MyVelocity.up        
= false; }
-               public void moveDownStart    (string s) { MyVelocity.down      
= true;  }
-               public void moveDownStop     (string s) { MyVelocity.down      
= false; }
-               public void rollLeftStart    (string s) { MyVelocity.rollLeft  
= true;  }
-               public void rollLeftStop     (string s) { MyVelocity.rollLeft  
= false; }
-               public void rollRightStart   (string s) { MyVelocity.rollRight 
= true;  }
-               public void rollRightStop    (string s) { MyVelocity.rollRight 
= false; }
-
-               public void holdCameraStart  (string s)
-               {
-                       HoldCamera = true;
-                       LastOrientation = Me.Orientation;
-                       LastUpDirection = Me.UpDirection;
-               }
-               
-               public void holdCameraStop   (string s) { HoldCamera         = 
false; }
-       }
-}

Deleted: trunk/Console.cs
===================================================================
--- trunk/Console.cs    2006-11-07 21:27:46 UTC (rev 114)
+++ trunk/Console.cs    2006-11-07 21:29:42 UTC (rev 115)
@@ -1,202 +0,0 @@
-using System;
-using System.Collections;
-using System.Text;
-using System.Drawing;
-using System.Threading;
-using Microsoft.DirectX;
-using Microsoft.DirectX.Direct3D;
-
-namespace skorpion
-{
-       public class Console
-       {
-               private enum ConsoleState
-               {
-                       Closed,
-                       Closing,
-                       Opening,
-                       Open
-               }
-
-               public  bool                PassCommands              = false;
-
-               private bool                _debug                    = false;
-               private Mutex               _lock                     = null;
-               private static string       _prefix                   = ">";
-               private ConsoleState        _state                    = 
ConsoleState.Closed;
-               private DateTime            _stateChange;
-               private int                 _currentConsolePercentage = 0;
-               private int                 _maxConsolePercentage     = 30;
-               private ArrayList           _entries                  = new 
ArrayList();
-               private StringBuilder       _entryLine                = new 
StringBuilder(_prefix);
-               private System.Drawing.Font _windowsFont              = new 
System.Drawing.Font("Arial", 8.0f);
-               private Device              _device;
-
-               private Microsoft.DirectX.Direct3D.Font _font;
-               private VertexBuffer                    _rect;
-               private int                             _alpha        = 159;
-
-               public bool IsVisible  { get { return _state != 
ConsoleState.Closed; } }
-               public int  LineHeight { get { return (int)_windowsFont.Size * 
2; } }
-
-               public Console(bool debug)
-               {
-                       _debug = debug;
-                       if (_debug)
-                               _lock = new Mutex();
-               }
-
-               public void RestoreDeviceObjects(Device device)
-               {
-                       _device = device;
-                       _font   = new Microsoft.DirectX.Direct3D.Font(_device, 
_windowsFont);
-                       _rect   = new VertexBuffer(typeof(Skorpion.PCVertex), 
6, _device, Usage.WriteOnly, Skorpion.PCVertex.Format, Pool.Default);
-
-                       Skorpion.PCVertex[] v = 
(Skorpion.PCVertex[])_rect.Lock(0, 0);
-                       v[0].p = new Vector3(-1, 1,  0);
-                       v[1].p = new Vector3(-1, -1, 0);
-                       v[2].p = new Vector3( 1, -1, 0);
-                       v[3].p = new Vector3( 1, -1, 0);
-                       v[4].p = new Vector3( 1,  1, 0);
-                       v[5].p = new Vector3( -1, 1, 0);
-
-                       Color w = Color.White;
-                       int white = Color.FromArgb(_alpha, w.R, w.G, 
w.B).ToArgb();
-                       for (int i=0; i<6; i++)
-                               v[i].color = white;
-
-                       _rect.Unlock();
-               }
-
-               public void Print(string text)
-               {
-                       if (_debug)
-                               _lock.WaitOne();
-
-                       _entries.Insert(0, text);
-                       while(_entries.Count > 50)
-                       {
-                               _entries.RemoveAt(49);
-                       }
-
-                       if (_debug)
-                               _lock.ReleaseMutex();
-               }
-
-               public void PrintFormat(string text, params object[] args)
-               {
-                       Print(string.Format(text, args));
-               }
-
-               public void PrintCharacterToEntryLine(char character)
-               {
-                       _entryLine.Append(character);
-               }
-
-               public void PrintStringToEntryLine(string text)
-               {
-                       _entryLine.Append(text);
-               }
-
-               public void Backspace()
-               {
-                       if (_entryLine.Length > 1)
-                               _entryLine.Remove(_entryLine.Length - 1, 1);
-               }
-
-               public void ProcessEntryLine()
-               {
-                       string text = _entryLine.ToString().Trim().Remove(0, 1);
-                       GlobalState.Command.Execute(text);
-                       
-                       _entryLine = new StringBuilder(_prefix);
-               }
-
-               public void ToggleState()
-               {
-                       if (_state == ConsoleState.Closed || _state == 
ConsoleState.Closing)
-                               _state  = ConsoleState.Opening;
-                       else
-                       {
-                               PassCommands = false;
-                               _state = ConsoleState.Closing;
-                       }
-
-                       _stateChange = DateTime.Now;
-               }
-
-               public void Render()
-               {
-                       if (!IsVisible)
-                               return;
-
-                       // update console state
-                       if (_state == ConsoleState.Opening && 
_currentConsolePercentage <= _maxConsolePercentage)
-                       {
-                               _currentConsolePercentage = (int)(100.0 * 
(DateTime.Now.Subtract(_stateChange)).TotalMilliseconds / 
ClientConfig.ConsoleOpen.TotalMilliseconds);
-
-                               if (_currentConsolePercentage >= 
_maxConsolePercentage)
-                               {
-                                       _currentConsolePercentage = 
_maxConsolePercentage;
-                                       _state = ConsoleState.Open;
-                               }
-                       }
-                       else if (_state == ConsoleState.Closing && 
_currentConsolePercentage >= 0)
-                       {
-                               _currentConsolePercentage = 
_maxConsolePercentage - (int)(100.0 * 
(DateTime.Now.Subtract(_stateChange)).TotalMilliseconds / 
ClientConfig.ConsoleOpen.TotalMilliseconds);
-
-                               if (_currentConsolePercentage <= 0 )
-                               {
-                                       _currentConsolePercentage = 0;
-                                       _state = ConsoleState.Closed;
-                               }
-                       }
-               
-                       float visible = (float)_currentConsolePercentage / 
100.0f;
-                       int   line    = 
(int)(visible*(float)GlobalState.Form.Height);
-                             line   -= this.LineHeight + 
(int)((float)this.LineHeight / 2.0f);
-
-                       // draw background
-                       _device.RenderState.Lighting = false;
-                       _device.RenderState.AlphaBlendEnable = true;
-                       _device.RenderState.CullMode = Cull.Clockwise;
-                       _device.Transform.World      = Matrix.Identity;
-                       _device.Transform.View       = Matrix.Identity;
-                       _device.Transform.Projection = 
Matrix.Translation(0.0f,2.0f-2.0f*visible, 0.0f);
-                       _device.TextureState[0].ColorOperation = 
TextureOperation.SelectArg1;
-                       _device.TextureState[0].ColorArgument1 = 
TextureArgument.Diffuse;
-                       _device.TextureState[0].ColorArgument2 = 
TextureArgument.TextureColor;
-                       _device.TextureState[0].AlphaOperation = 
TextureOperation.SelectArg1;
-                       _device.TextureState[0].AlphaArgument1 = 
TextureArgument.Diffuse;
-                       _device.TextureState[0].AlphaArgument2 = 
TextureArgument.TextureColor;
-                       _device.VertexFormat = Skorpion.PCVertex.Format;
-                       _device.SetStreamSource(0, _rect, 0, 
Skorpion.PCVertex.StrideSize);
-                       _device.DrawPrimitives(PrimitiveType.TriangleList, 0, 
2);
-
-                       // draw entry line
-                       Color b = Color.Black;
-                       int black = Color.FromArgb(_alpha, b.R, b.G, 
b.B).ToArgb();
-                       _font.DrawText(_entryLine.ToString(), new 
System.Drawing.Rectangle(2, line, 0, 0), DrawTextFormat.None, black);
-                       line -= this.LineHeight;
-
-                       if (_debug)
-                               _lock.WaitOne();
-
-                       // draw stored entries
-                       foreach(string entry in _entries)
-                       {
-                               if (line > 5)
-                               {
-                                       _font.DrawText(entry, new 
System.Drawing.Rectangle(2, line, 0, 0), DrawTextFormat.ExpandTabs, black);
-                                       line -= this.LineHeight;
-                               }
-                       }
-
-                       if (_debug)
-                               _lock.ReleaseMutex();
-
-                       _device.RenderState.Lighting = true;
-                       _device.RenderState.AlphaBlendEnable = false;
-               }
-       }
-}
\ No newline at end of file

Deleted: trunk/Controller.cs
===================================================================
--- trunk/Controller.cs 2006-11-07 21:27:46 UTC (rev 114)
+++ trunk/Controller.cs 2006-11-07 21:29:42 UTC (rev 115)
@@ -1,583 +0,0 @@
-using System;
-using System.Windows.Forms;
-using System.Threading;
-using System.Collections;
-using Microsoft.DirectX;
-using Microsoft.DirectX.DirectInput;
-
-namespace skorpion
-{
-       public class Command
-       {
-               public Hashtable List = new Hashtable();
-
-               public delegate void CallBack(string s);
-
-               public Command(GameClient c)
-               {
-                       List["+forward"]    = new CallBack(c.moveForwardStart);
-                       List["-forward"]    = new CallBack(c.moveForwardStop);
-                       List["+back"]       = new CallBack(c.moveBackwardStart);
-                       List["-back"]       = new CallBack(c.moveBackwardStop);
-                       List["+left"]       = new CallBack(c.moveLeftStart);
-                       List["-left"]       = new CallBack(c.moveLeftStop);
-                       List["+right"]      = new CallBack(c.moveRightStart);
-                       List["-right"]      = new CallBack(c.moveRightStop);
-                       List["+up"]         = new CallBack(c.moveUpStart);
-                       List["-up"]         = new CallBack(c.moveUpStop);
-                       List["+down"]       = new CallBack(c.moveDownStart);
-                       List["-down"]       = new CallBack(c.moveDownStop);
-                       List["+holdcam"]    = new CallBack(c.holdCameraStart);
-                       List["-holdcam"]    = new CallBack(c.holdCameraStop);
-                       List["+rollLeft"]   = new CallBack(c.rollLeftStart);
-                       List["-rollLeft"]   = new CallBack(c.rollLeftStop);
-                       List["+rollRight"]  = new CallBack(c.rollRightStart);
-                       List["-rollRight"]  = new CallBack(c.rollRightStop);
-                       List["+burst"]      = new CallBack(c.burstStart);
-                       List["-burst"]      = new CallBack(c.burstStop);
-                       List["camera"]      = new CallBack(this.Camera);
-                       List["quit"]        = new CallBack(this.Quit);
-                       List["echo"]        = new CallBack(this.Echo);
-                       List["rcon"]        = new CallBack(this.Rcon);
-                       List["passcmds"]    = new CallBack(this.Passcmds);
-                       List["say"]         = new CallBack(this.Say);
-                       List["name"]        = new CallBack(this.Name);
-                       List["bind"]        = new CallBack(this.Bind);
-                       List["invert"]      = new CallBack(this.MouseInvert);
-                       List["sensitivity"] = new 
CallBack(this.MouseSensitivity);
-                       List["connect"]     = new CallBack(this.Connect);
-               }
-
-               public void Execute(string cmd)
-               {
-                       string args = "";
-
-                       int space = cmd.IndexOf(" ");
-                       if (space != -1)
-                       {
-                               args = cmd.Substring(space + 1);
-                               cmd  = cmd.Remove(space, cmd.Length - space);
-                       }
-
-                       CallBack c = (CallBack)List[cmd];
-                       if (c != null)
-                               c(args);
-               }
-
-               public void Camera(string s)
-               {
-                       int n = 0;
-                       try { n = int.Parse(s); } 
-                       catch { return; }
-                       if (n > 0 && n < 5)
-                               GlobalState.CamNum = n;
-               }
-
-               public void Quit(string s)
-               {
-                       ServerState.Live = false;
-               }
-
-               public void Echo(string s)
-               {
-                       GlobalState.Console.Print(s);
-               }
-
-               public void Rcon(string s)
-               {
-                       RconReq m = new RconReq();
-                       m.Cmd = s;
-
-                       GlobalState.Client.Net.ACKQueue.Add(m);
-               }
-
-               public void Passcmds(string s)
-               {
-                       if (GlobalState.Console.IsVisible)
-                       {
-                               GlobalState.Console.PassCommands = true;
-                               GlobalState.Console.Print("now passing 
commands");
-                       }
-               }
-
-               public void Say(string s)
-               {
-                       Rcon("say " + s);
-               }
-
-               public void Name(string s)
-               {
-                       Rcon("name " + s);
-               }
-
-               public void Bind(string s)
-               {
-                       if (s.Length > 0)
-                       {
-                               string key = "";
-                               string cmd = "";
-
-                               int space = s.IndexOf(" ");
-                               if (space != -1)
-                               {
-                                       cmd = s.Substring(space + 1);
-                                       key = s.Remove(space, s.Length - space);
-
-                                       if (GlobalState.Bind.Add(key, cmd))
-                                               GlobalState.Console.Print("*** 
bound " + key + " to " + cmd);
-                                       else
-                                               GlobalState.Console.Print("*** 
unknown control '" + key + "'");
-                               }
-                               else
-                               {
-                                       GlobalState.Console.Print("*** bind 
[control] [command]");
-                               }
-                       }
-                       else
-                       {
-                               foreach(DictionaryEntry de in 
GlobalState.Bind.List)
-                               {
-                                       string tabs = "              ";
-                                       tabs = tabs.Remove(0, 
((string)de.Key).Length);
-                                       
GlobalState.Console.Print((string)de.Key + tabs + "\t" + (string)de.Value);
-                               }
-                       }
-               }
-
-               public void MouseInvert(string s)
-               {
-                       GlobalState.Controller.InvertMouse *= -1;
-                       GlobalState.Console.Print("*** mouse invert is " + 
(GlobalState.Controller.InvertMouse < 0 ? "on" : "off"));
-               }
-
-               public void MouseSensitivity(string s)
-               {
-                       bool print = true;
-                       if (s.Length > 0)
-                       {
-                               try { GlobalState.MouseSensitivity = 
float.Parse(s); }
-                               catch
-                               {
-                                       GlobalState.Console.Print("*** 
sensitivity [float");
-                                       print = false;
-                               }
-                       }
-                       if (print)
-                               GlobalState.Console.Print("*** mouse 
sensitivity " + GlobalState.MouseSensitivity.ToString());
-               }
-
-               public void Connect(string s)
-               {
-                       if (s.Length > 0)
-                       {
-                               GlobalState.Client.Ready = false;
-                               if (GlobalState.Client.Net.connect(s, 
ServerConfig.DEFAULTPORT, ClientConfig.PlayerName, ClientConfig.Team))
-                                       GlobalState.Console.Print("*** 
connecting to " + s);
-                               else
-                                       GlobalState.Console.Print("*** connect 
to " + s + " failed");
-                       }
-                       else
-                               GlobalState.Console.Print("*** connect 
[server]");
-               }
-       }
-
-       public class Bind
-       {
-               public Hashtable List = new Hashtable();
-
-               public bool Add(string key, string bind)
-               {
-                       bool ret = true;
-                       try
-                       {
-                               List[Enum.Parse(typeof(Key), key, 
true).ToString()] = bind;
-                       }
-                       catch
-                       {
-                               if (key == "mouse1" || key == "mouse2" || key 
== "mouse3" || key == "mouse4" || key == "mouse5")
-                                       List[key] = bind;
-                               else
-                                       ret = false;
-                       }
-                       return ret;
-               }
-
-               public string Get(string k) { return (string)List[k]; }
-
-               public Bind()
-               {
-                       Add("w",           "+forward");
-                       Add("s",           "+back");
-                       Add("a",           "+left");
-                       Add("d",           "+right");
-                       Add("q",           "+down");
-                       Add("e",           "+up");
-                       Add("leftcontrol", "+holdcam");
-                       Add("leftshift",   "+rollLeft");
-                       Add("space",       "+rollRight");
-                       Add("f1",          "camera 1");
-                       Add("f2",          "camera 2");
-                       Add("f3",          "camera 3");
-                       Add("f4",          "camera 4");
-                       Add("mouse1",      "+burst");
-               }
-       }
-
-       public class Controller
-       {
-               public  int            InvertMouse = 1;
-
-               private Form           iControl;
-               private Device         iMouseDevice;
-               private Device         iKeyboardDevice;
-               private GameClient     iControllee;
-               private Hashtable      iKeys;
-               private ArrayList      iKeysPrune;
-               private byte[]         iButtons;
-               
-               public class KeyInfo
-               {
-                       public enum     State { DOWN, UP, DOWNSINCE };
-                       public State    state;
-                       public DateTime since; 
-
-                       public KeyInfo() { state=State.DOWN; 
since=DateTime.Now; }
-               }
-
-               public Controller(Form control, GameClient controllee)
-               {
-                       iKeys = new Hashtable();
-                       iKeysPrune = new ArrayList();
-                       iButtons = new byte[128];
-
-                       iControl = control;
-                       iControllee = controllee;
-                       
-                       iMouseDevice = new Device(SystemGuid.Mouse);
-                       this.releaseMouseFocus();
-
-                       iKeyboardDevice = new Device(SystemGuid.Keyboard);
-                       this.acquireKeyboard();
-               }
-
-               public void mouseInput()
-               {
-                       try
-                       {
-                               iMouseDevice.Poll();
-                       }
-                       catch(InputException)
-                       {
-                               return;
-                       }
-                       MouseState state = iMouseDevice.CurrentMouseState;
-
-                       byte[] b = state.GetMouseButtons();
-                       for (int i=0; i<b.Length; i++)
-                       {
-                               string s = GlobalState.Bind.Get("mouse" + 
(i+1).ToString());
-
-                               if (s == null)
-                                       continue;
-                               if (s[0] == '+')
-                               {
-                                       if (b[i] != 0 && iButtons[i] == 0)
-                                               GlobalState.Command.Execute(s);
-                                       else if (b[i] == 0 && iButtons[i] != 0)
-                                       {
-                                               s = s.Remove(0, 1).Insert(0, 
"-");
-                                               GlobalState.Command.Execute(s);
-                                       }
-                               }
-                               else
-                                       GlobalState.Command.Execute(s);
-                       }
-                       iButtons = b;
-
-                       if (state.X > 0)
-                               iControllee.yawLeft(state.X);
-                       else if (state.X < 0)
-                               iControllee.yawRight(-state.X);
-
-                       if (state.Y > 0)
-                               iControllee.pitchDown(state.Y*InvertMouse);
-                       else if (state.Y < 0)
-                               iControllee.pitchUp(-state.Y*InvertMouse);
-               }
-
-               public void keyboardInput()
-               {
-                       try
-                       {
-                               iKeyboardDevice.Poll();
-                       }
-                       catch(InputException)
-                       {
-                               return;
-                       }
-                       
-                       bool caps = false;
-                       Key[] keys = iKeyboardDevice.GetPressedKeys();
-                       foreach(Key key in keys)
-                       {
-                               KeyInfo k = (KeyInfo)iKeys[key];
-                               if (k != null)
-                                       k.state = KeyInfo.State.DOWNSINCE;
-                               else
-                                       iKeys[key]= new KeyInfo();
-
-                               if (key == Key.LeftShift || key == 
Key.RightShift || key == Key.CapsLock)
-                                       caps = !caps;
-                       }
-
-                       bool console = GlobalState.Console.IsVisible;
-                       bool passcmd = GlobalState.Console.PassCommands;
-                       bool chat = GlobalState.Chat.IsActive;
-                       bool playerlist = GlobalState.PlayerList.IsVisible;
-                       foreach(DictionaryEntry de in iKeys)
-                       {
-                               Key     key     = (Key    )de.Key;
-                               KeyInfo k       = (KeyInfo)de.Value;
-
-                               if (key == Key.Grave && k.state == 
KeyInfo.State.DOWN)
-                               {
-                                       GlobalState.Console.ToggleState();
-                               }
-                               else if (console && !passcmd && k.state != 
KeyInfo.State.UP)
-                               {
-                                       DateTime refresh = 
DateTime.Now.Subtract(ClientConfig.ClientKeyRepeat);
-                                       if (k.state == KeyInfo.State.DOWN || 
-                                               (k.state == 
KeyInfo.State.DOWNSINCE && k.since < refresh))
-                                       {
-                                               k.since = DateTime.Now;
-
-                                               if (key == Key.BackSpace)
-                                                       
GlobalState.Console.Backspace();
-                                               else if (key == Key.Return)
-                                                       
GlobalState.Console.ProcessEntryLine();
-                                               else
-                                               {
-                                                       char c = 
GetASCIIKey(key, caps);
-                                                       if (c != (char)0)
-                                                               
GlobalState.Console.PrintCharacterToEntryLine(c);
-                                               }
-                                       }
-                               }
-                               else if (key == Key.Tab)
-                               {
-                                       if((k.state == KeyInfo.State.DOWN && 
!playerlist)
-                                               || (k.state == KeyInfo.State.UP 
&& playerlist))
-                                               
GlobalState.PlayerList.ToggleState();
-                               }
-                               /*else if (playerlist && && k.state != 
KeyInfo.State.UP)
-                               {
-                                       DateTime refresh = 
DateTime.Now.Subtract(ClientConfig.ClientKeyRepeat);
-                                       if (k.state == KeyInfo.State.DOWN || 
-                                               (k.state == 
KeyInfo.State.DOWNSINCE && k.since < refresh))
-                                       {
-                                               k.since = DateTime.Now;
-
-                                               if (key == Key.BackSpace)
-                                                       
GlobalState.Console.Backspace();
-                                               else if (key == Key.Return)
-                                                       
GlobalState.Console.ProcessEntryLine();
-                                               else
-                                               {
-                                                       char c = 
GetASCIIKey(key, caps);
-                                                       if (c != (char)0)
-                                                               
GlobalState.Console.PrintCharacterToEntryLine(c);
-                                               }
-                                       }
-                               }*/
-                               else if (key == Key.Period && k.state == 
KeyInfo.State.DOWN && !chat)
-                               {
-                                       GlobalState.Chat.ToggleState();
-                               }
-                               else if (chat && k.state != KeyInfo.State.UP)
-                               {
-                                       // add this to chat input
-                                       DateTime refresh = 
DateTime.Now.Subtract(ClientConfig.ClientKeyRepeat);
-                                       if (k.state == KeyInfo.State.DOWN || 
-                                               (k.state == 
KeyInfo.State.DOWNSINCE && k.since < refresh))
-                                       {
-                                               k.since = DateTime.Now;
-
-                                               if (key == Key.BackSpace)
-                                                       
GlobalState.Chat.Backspace();
-                                               else if(key == Key.Return)
-                                               {
-                                                       
GlobalState.Chat.ProcessEntryLine();
-                                                       
GlobalState.Chat.ToggleState();
-                                               }
-                                               else
-                                               {
-                                                       char c = 
GetASCIIKey(key, caps);
-                                                       if (c != (char)0)
-                                                               
GlobalState.Chat.PrintCharacterToEntryLine(c);
-                                               }
-                                       }
-                               }
-                               else if (k.state != KeyInfo.State.DOWNSINCE)
-                               {
-                                       string s = 
GlobalState.Bind.Get(key.ToString());
-                                       if (s != null)
-                                       {
-                                               if (KeyInfo.State.UP == k.state 
&& s[0] == '+')
-                                               {
-                                                       s = s.Remove(0, 
1).Insert(0, "-");
-                                                       
GlobalState.Command.Execute(s);
-                                               }
-                                               else
-                                               {
-                                                       
GlobalState.Command.Execute(s);
-                                               }
-                                       }
-                               }
-                               if (k.state == KeyInfo.State.UP)
-                                       iKeysPrune.Add(key);
-                               else
-                                       k.state = KeyInfo.State.UP;
-                       }
-
-                       foreach (Key key in iKeysPrune)
-                               iKeys.Remove(key);
-
-                       iKeysPrune.Clear();
-               }
-
-               public void acquireControls()
-               {
-                       this.acquireMouse();
-                       this.acquireKeyboard();
-               }
-
-               public void acquireMouse()
-               {
-                       if (null != iMouseDevice)
-                       {
-                               try{iMouseDevice.Acquire();}
-                               catch{}
-                       }
-               }
-
-               public void acquireKeyboard()
-               {
-                       if (null != iKeyboardDevice)
-                       {
-                               try{iKeyboardDevice.Acquire();}
-                               catch{}
-                       }
-               }
-
-               public void takeMouseFocus()
-               {
-                       iMouseDevice.Unacquire();
-                       iMouseDevice.SetCooperativeLevel(iControl,
-                               CooperativeLevelFlags.Exclusive | 
CooperativeLevelFlags.Foreground);
-
-                       this.acquireMouse();
-               }
-
-               public void releaseMouseFocus()
-               {
-                       iMouseDevice.Unacquire();
-                       iMouseDevice.SetCooperativeLevel(iControl,
-                               CooperativeLevelFlags.NonExclusive | 
CooperativeLevelFlags.Foreground);
-
-                       this.acquireMouse();
-               }
-
-               public static char GetASCIIKey(Key key, bool caps)
-               {
-                       switch(key)
-                       {
-                               case Key.A:
-                                       return caps ? 'A' : 'a';
-                               case Key.B:
-                                       return caps ? 'B' : 'b';
-                               case Key.C:
-                                       return caps ? 'C' : 'c';
-                               case Key.D:
-                                       return caps ? 'D' : 'd';
-                               case Key.E:
-                                       return caps ? 'E' : 'e';
-                               case Key.F:
-                                       return caps ? 'F' : 'f';
-                               case Key.G:
-                                       return caps ? 'G' : 'g';
-                               case Key.H:
-                                       return caps ? 'H' : 'h';
-                               case Key.I:
-                                       return caps ? 'I' : 'i';
-                               case Key.J:
-                                       return caps ? 'J' : 'j';
-                               case Key.K:
-                                       return caps ? 'K' : 'k';
-                               case Key.L:
-                                       return caps ? 'L' : 'l';
-                               case Key.M:
-                                       return caps ? 'M' : 'm';
-                               case Key.N:
-                                       return caps ? 'N' : 'n';
-                               case Key.O:
-                                       return caps ? 'O' : 'o';
-                               case Key.P:
-                                       return caps ? 'P' : 'p';
-                               case Key.Q:
-                                       return caps ? 'Q' : 'q';
-                               case Key.R:
-                                       return caps ? 'R' : 'r';
-                               case Key.S:
-                                       return caps ? 'S' : 's';
-                               case Key.T:
-                                       return caps ? 'T' : 't';
-                               case Key.U:
-                                       return caps ? 'U' : 'u';
-                               case Key.V:
-                                       return caps ? 'V' : 'v';
-                               case Key.W:
-                                       return caps ? 'W' : 'w';
-                               case Key.X:
-                                       return caps ? 'X' : 'x';
-                               case Key.Y:
-                                       return caps ? 'Y' : 'y';
-                               case Key.Z:
-                                       return caps ? 'Z' : 'z';
-                               case Key.D0:
-                                       return caps ? '(' : '0';
-                               case Key.D1:
-                                       return caps ? '!' : '1';
-                               case Key.D2:
-                                       return caps ? '@' : '2';
-                               case Key.D3:
-                                       return caps ? '#' : '3';
-                               case Key.D4:
-                                       return caps ? '$' : '4';
-                               case Key.D5:
-                                       return caps ? '%' : '5';
-                               case Key.D6:
-                                       return caps ? '^' : '6';
-                               case Key.D7:
-                                       return caps ? '&' : '7';
-                               case Key.D8:
-                                       return caps ? '*' : '8';
-                               case Key.D9:
-                                       return caps ? '(' : '9';
-                               case Key.Space:
-                                       return ' ';
-                               case Key.Period:
-                                       return caps ? '>' : '.';
-                               case Key.Comma:
-                                       return caps ? '<' : ',';
-                               case Key.Slash:
-                                       return caps ? '?' : '/';
-                               case Key.Minus:
-                                       return caps ? '_' : '-';
-                               case Key.Equals:
-                                       return caps ? '+' : '=';
-                               default:
-                                       return (char)0;
-                       }
-               }
-       }
-}
\ No newline at end of file

Deleted: trunk/Form1.cs
===================================================================
--- trunk/Form1.cs      2006-11-07 21:27:46 UTC (rev 114)
+++ trunk/Form1.cs      2006-11-07 21:29:42 UTC (rev 115)
@@ -1,181 +0,0 @@
-using System;
-using System.Drawing;
-using System.Collections;
-using System.ComponentModel;
-using System.Windows.Forms;
-using System.Data;
-using System.IO;
-using System.Threading;
-
-namespace skorpion
-{
-       public class Form1 : System.Windows.Forms.Form
-       {
-               /// <summary>
-               /// Required designer variable.
-               /// </summary>
-               private System.ComponentModel.Container components = null;
-
-               public Form1()
-               {
-                       InitializeComponent();
-               }
-
-               protected override void Dispose( bool disposing )
-               {
-                       if( disposing )
-                       {
-                               if (components != null) 
-                               {
-                                       components.Dispose();
-                               }
-                       }
-                       base.Dispose( disposing );
-               }
-
-               #region Windows Form Designer generated code
-               /// <summary>
-               /// Required method for Designer support - do not modify
-               /// the contents of this method with the code editor.
-               /// </summary>
-               private void InitializeComponent()
-               {
-                       // 
-                       // Form1
-                       // 
-                       this.AutoScaleBaseSize = new System.Drawing.Size(5, 13);
-                       this.ClientSize = new System.Drawing.Size(720, 509);
-                       this.Name = "Form1";
-                       this.Text = "Form1";
-
-               }
-               #endregion
-
-               private void OnClosing(object sender, CancelEventArgs cea)
-               {
-                       ServerState.Live = false;
-                       cea.Cancel = true;
-               }
-
-               void OnResize(object sender, System.EventArgs e)
-               {
-                       GlobalState.Pause = ((this.WindowState == 
FormWindowState.Minimized) || !this.Visible);
-               }
-
-               void OnKeyPress(object sender, 
System.Windows.Forms.KeyPressEventArgs e)
-               {
-                       switch ((int)(byte)e.KeyChar)
-                       {
-                               case (int)System.Windows.Forms.Keys.Escape: 
-                                       ServerState.Live = false;
-                                       break;
-                       }
-               }
-
-               private void OnKeyDown(object sender, 
System.Windows.Forms.KeyEventArgs e)
-               {
-                       if (GlobalState.Controller == null)
-                               return;
-
-                       switch ((int)(byte)e.KeyCode)
-                       {
-                               case (int)System.Windows.Forms.Keys.Enter:
-                                       
GlobalState.Controller.releaseMouseFocus();
-                                       break;
-                       }                       
-               }
-
-               private void OnClick(object sender, System.EventArgs e)
-               {
-                       if (GlobalState.Controller == null)
-                               return;
-
-                       GlobalState.Controller.takeMouseFocus();                
-               }
-
-               [STAThread]
-               static void Main() 
-               {
-                       new Form1().go();
-                       Application.Exit();
-               }
-
-               bool TestDX()
-               {
-                       bool ret = true;
-                       try
-                       {
-                               Microsoft.DirectX.Vector3 TEST_DX = new 
Microsoft.DirectX.Vector3(0,0,0);
-                               TEST_DX.Normalize();
-                       }
-                       catch(Exception e)
-                       {
-                               ret = false;
-                               System.Windows.Forms.MessageBox.Show("DX 
runtime not found: " + e.ToString());
-                       }
-                       return ret;
-               }
-
-               void go()
-               {
-                       if (!TestDX())
-                               return;
-
-                       GlobalState.Form = this;
-
-                       // skorpion expects ./assets
-                       string dirname = 
Path.GetFileName(Directory.GetCurrentDirectory());
-                       if (dirname == "Debug" || dirname == "Release")
-                               Environment.CurrentDirectory = 
Environment.CurrentDirectory + @"\..\..";
-
-                       // bind the log callback before starting server if 
we're gonna start client
-                       if (ClientConfig.ClientStart)
-                       {
-                               // in debug case we create a mutex and
-                               // display messages from server thread in 
console
-                               GlobalState.Console = new 
Console(ClientConfig.Debug);
-                               if (ClientConfig.Debug)
-                               {
-                                       LOG.Callback = new 
LOG.CallBack(GlobalState.Console.Print);
-                                       LOG.level    = LOG.Level.DEBUG;
-                               }
-                               GlobalState.Chat = new Chat(ClientConfig.Debug);
-                               GlobalState.PlayerList = new 
PlayerList(ClientConfig.Debug);
-                       }
-
-                       if (ClientConfig.ServerStart)
-                       {
-                               ServerState.NetServer = new 
NetServer(ClientConfig.ClientPort, new GameServer(new Universe()));
-                               Thread t = new Thread(new 
ThreadStart(ServerState.NetServer.Start));
-                               t.Start();
-                       }
-                       
-                       this.Text       = "Sk0rpion";
-                       this.ClientSize = new 
System.Drawing.Size(ClientConfig.FormWidth, ClientConfig.FormHeight);
-                       this.Closing   += new 
CancelEventHandler(this.OnClosing);
-                       this.Resize    += new EventHandler(this.OnResize);
-                       this.KeyPress  += new 
KeyPressEventHandler(this.OnKeyPress);
-                       this.KeyDown   += new KeyEventHandler(this.OnKeyDown);
-                       this.Click     += new System.EventHandler(this.OnClick);
-                       this.Show();
-
-                       if (ClientConfig.ClientStart)
-                       {
-                               GlobalState.Bind = new Bind();
-                               GlobalState.Client = new GameClient(new 
Universe(), new NetClient(ClientConfig.ClientNetTimeout, 
ClientConfig.ClientACKRetry));
-                               GlobalState.Command = new 
Command(GlobalState.Client);
-                               GlobalState.Controller = new Controller(this, 
GlobalState.Client);
-                               GlobalState.Skorpion = new Skorpion();
-                               GlobalState.Skorpion.go();
-                       }
-                       else
-                       {
-                               while(ServerState.Live)
-                               {
-                                       Application.DoEvents();
-                                       System.Threading.Thread.Sleep(10);
-                               }
-                       }
-               }
-       }
-}

Deleted: trunk/Form1.resx
===================================================================
--- trunk/Form1.resx    2006-11-07 21:27:46 UTC (rev 114)
+++ trunk/Form1.resx    2006-11-07 21:29:42 UTC (rev 115)
@@ -1,130 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<root>
-  <!-- 
-    Microsoft ResX Schema 
-    
-    Version 1.3
-    
-    The primary goals of this format is to allow a simple XML format 
-    that is mostly human readable. The generation and parsing of the 
-    various data types are done through the TypeConverter classes 
-    associated with the data types.
-    
-    Example:
-    
-    ... ado.net/XML headers & schema ...
-    <resheader name="resmimetype">text/microsoft-resx</resheader>
-    <resheader name="version">1.3</resheader>
-    <resheader name="reader">System.Resources.ResXResourceReader, 
System.Windows.Forms, ...</resheader>
-    <resheader name="writer">System.Resources.ResXResourceWriter, 
System.Windows.Forms, ...</resheader>
-    <data name="Name1">this is my long string</data>
-    <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
-    <data name="Bitmap1" 
mimetype="application/x-microsoft.net.object.binary.base64">
-        [base64 mime encoded serialized .NET Framework object]
-    </data>
-    <data name="Icon1" type="System.Drawing.Icon, System.Drawing" 
mimetype="application/x-microsoft.net.object.bytearray.base64">
-        [base64 mime encoded string representing a byte array form of the .NET 
Framework object]
-    </data>
-                
-    There are any number of "resheader" rows that contain simple 
-    name/value pairs.
-    
-    Each data row contains a name, and value. The row also contains a 
-    type or mimetype. Type corresponds to a .NET class that support 
-    text/value conversion through the TypeConverter architecture. 
-    Classes that don't support this are serialized and stored with the 
-    mimetype set.
-    
-    The mimetype is used forserialized objects, and tells the 
-    ResXResourceReader how to depersist the object. This is currently not 
-    extensible. For a given mimetype the value must be set accordingly:
-    
-    Note - application/x-microsoft.net.object.binary.base64 is the format 
-    that the ResXResourceWriter will generate, however the reader can 
-    read any of the formats listed below.
-    
-    mimetype: application/x-microsoft.net.object.binary.base64
-    value   : The object must be serialized with 
-            : System.Serialization.Formatters.Binary.BinaryFormatter
-            : and then encoded with base64 encoding.
-    
-    mimetype: application/x-microsoft.net.object.soap.base64
-    value   : The object must be serialized with 
-            : System.Runtime.Serialization.Formatters.Soap.SoapFormatter
-            : and then encoded with base64 encoding.
-
-    mimetype: application/x-microsoft.net.object.bytearray.base64
-    value   : The object must be serialized into a byte array 
-            : using a System.ComponentModel.TypeConverter
-            : and then encoded with base64 encoding.
-    -->
-  <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema"; 
xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
-    <xsd:element name="root" msdata:IsDataSet="true">
-      <xsd:complexType>
-        <xsd:choice maxOccurs="unbounded">
-          <xsd:element name="data">
-            <xsd:complexType>
-              <xsd:sequence>
-                <xsd:element name="value" type="xsd:string" minOccurs="0" 
msdata:Ordinal="1" />
-                <xsd:element name="comment" type="xsd:string" minOccurs="0" 
msdata:Ordinal="2" />
-              </xsd:sequence>
-              <xsd:attribute name="name" type="xsd:string" msdata:Ordinal="1" 
/>
-              <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" 
/>
-              <xsd:attribute name="mimetype" type="xsd:string" 
msdata:Ordinal="4" />
-            </xsd:complexType>
-          </xsd:element>
-          <xsd:element name="resheader">
-            <xsd:complexType>
-              <xsd:sequence>
-                <xsd:element name="value" type="xsd:string" minOccurs="0" 
msdata:Ordinal="1" />
-              </xsd:sequence>
-              <xsd:attribute name="name" type="xsd:string" use="required" />
-            </xsd:complexType>
-          </xsd:element>
-        </xsd:choice>
-      </xsd:complexType>
-    </xsd:element>
-  </xsd:schema>
-  <resheader name="resmimetype">
-    <value>text/microsoft-resx</value>
-  </resheader>
-  <resheader name="version">
-    <value>1.3</value>
-  </resheader>
-  <resheader name="reader">
-    <value>System.Resources.ResXResourceReader, System.Windows.Forms, 
Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
-  </resheader>
-  <resheader name="writer">
-    <value>System.Resources.ResXResourceWriter, System.Windows.Forms, 
Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
-  </resheader>
-  <data name="$this.Locked" type="System.Boolean, mscorlib, 
Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
-    <value>False</value>
-  </data>
-  <data name="$this.Language" type="System.Globalization.CultureInfo, 
mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
-    <value>(Default)</value>
-  </data>
-  <data name="$this.TrayLargeIcon" type="System.Boolean, mscorlib, 
Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
-    <value>False</value>
-  </data>
-  <data name="$this.Localizable" type="System.Boolean, mscorlib, 
Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
-    <value>False</value>
-  </data>
-  <data name="$this.GridSize" type="System.Drawing.Size, System.Drawing, 
Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
-    <value>8, 8</value>
-  </data>
-  <data name="$this.DrawGrid" type="System.Boolean, mscorlib, 
Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
-    <value>True</value>
-  </data>
-  <data name="$this.TrayHeight" type="System.Int32, mscorlib, 
Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
-    <value>80</value>
-  </data>
-  <data name="$this.Name">
-    <value>Form1</value>
-  </data>
-  <data name="$this.SnapToGrid" type="System.Boolean, mscorlib, 
Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
-    <value>True</value>
-  </data>
-  <data name="$this.DefaultModifiers" type="System.CodeDom.MemberAttributes, 
System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
-    <value>Private</value>
-  </data>
-</root>
\ No newline at end of file

Deleted: trunk/PlayerList.cs
===================================================================
--- trunk/PlayerList.cs 2006-11-07 21:27:46 UTC (rev 114)
+++ trunk/PlayerList.cs 2006-11-07 21:29:42 UTC (rev 115)
@@ -1,162 +0,0 @@
-using System;
-using System.Collections;
-using System.Text;
-using System.Drawing;
-using System.Threading;
-using Microsoft.DirectX;
-using Microsoft.DirectX.Direct3D;
-
-namespace skorpion
-{
-       public class PlayerList
-       {
-               private enum PlayerListState
-               {
-                       Closed,
-                       Open
-               }
-
-               public  bool                PassCommands              = false;
-
-               private bool                _debug                    = false;
-               private Mutex               _lock                     = null;
-               private static string       _prefix                   = ">";
-               private PlayerListState        _state                    = 
PlayerListState.Closed;
-               private DateTime            _stateChange;
-               private StringBuilder       _entryLine                = new 
StringBuilder(_prefix);
-               private System.Drawing.Font _windowsFont              = new 
System.Drawing.Font("Arial", 14.0f);
-               private Device              _device;
-               private int                 _topMargin                = 150;
-               private int                 _leftMargin               = 200;
-
-               private Microsoft.DirectX.Direct3D.Font _font;
-               private VertexBuffer                    _rect;
-               private int                             _alpha        = 159;
-
-               public bool IsVisible  { get { return _state != 
PlayerListState.Closed; } }
-               public int  LineHeight { get { return (int)_windowsFont.Size * 
2; } }
-
-               public PlayerList(bool debug)
-               {
-                       _debug = debug;
-                       if (_debug)
-                               _lock = new Mutex();
-               }
-
-               public void RestoreDeviceObjects(Device device)
-               {
-                       _device = device;
-                       _font   = new Microsoft.DirectX.Direct3D.Font(_device, 
_windowsFont);
-                       _rect   = new VertexBuffer(typeof(Skorpion.PCVertex), 
6, _device, Usage.WriteOnly, Skorpion.PCVertex.Format, Pool.Default);
-
-                       Skorpion.PCVertex[] v = 
(Skorpion.PCVertex[])_rect.Lock(0, 0);
-                       v[0].p = new Vector3(-.5f, .5f,  0);
-                       v[1].p = new Vector3(-.5f, -.5f, 0);
-                       v[2].p = new Vector3( .5f, -.5f, 0);
-                       v[3].p = new Vector3( .5f, -.5f, 0);
-                       v[4].p = new Vector3( .5f,  .5f, 0);
-                       v[5].p = new Vector3( -.5f, .5f, 0);
-
-                       Color w = Color.Gray;
-                       int white = Color.FromArgb(_alpha, w.R, w.G, 
w.B).ToArgb();
-                       for (int i=0; i<6; i++)
-                               v[i].color = white;
-
-                       _rect.Unlock();
-               }
-
-               public void ToggleState()
-               {
-                       if (_state == PlayerListState.Closed)
-                               _state  = PlayerListState.Open;
-                       else
-                       {
-                               PassCommands = false;
-                               _state = PlayerListState.Closed;
-                       }
-
-                       _stateChange = DateTime.Now;
-               }
-
-               public void Render()
-               {
-                       if (!IsVisible)
-                               return;
-               
-                       int   line    = _topMargin;
-
-                       // draw background
-                       _device.RenderState.Lighting = false;
-                       _device.RenderState.AlphaBlendEnable = true;
-                       _device.RenderState.CullMode = Cull.Clockwise;
-                       _device.Transform.World      = Matrix.Identity;
-                       _device.Transform.View       = Matrix.Identity;
-                       _device.Transform.Projection = Matrix.Identity;
-                       _device.TextureState[0].ColorOperation = 
TextureOperation.SelectArg1;
-                       _device.TextureState[0].ColorArgument1 = 
TextureArgument.Diffuse;
-                       _device.TextureState[0].ColorArgument2 = 
TextureArgument.TextureColor;
-                       _device.TextureState[0].AlphaOperation = 
TextureOperation.SelectArg1;
-                       _device.TextureState[0].AlphaArgument1 = 
TextureArgument.Diffuse;
-                       _device.TextureState[0].AlphaArgument2 = 
TextureArgument.TextureColor;
-                       _device.VertexFormat = Skorpion.PCVertex.Format;
-                       _device.SetStreamSource(0, _rect, 0, 
Skorpion.PCVertex.StrideSize);
-                       _device.DrawPrimitives(PrimitiveType.TriangleList, 0, 
2);
-
-                       Color b = Color.Black;
-                       int black = Color.FromArgb(_alpha, b.R, b.G, 
b.B).ToArgb();
-
-                       if (_debug)
-                               _lock.WaitOne();
-
-                       _font.DrawText(":SupeR Sk0rp1on B4LL 6oo6:", new 
System.Drawing.Rectangle(_leftMargin+60, line, 0, 0), 
DrawTextFormat.ExpandTabs, black);
-                       line += this.LineHeight;
-
-                       _font.DrawText("Team 1: silver", new 
System.Drawing.Rectangle(_leftMargin+140, line, 0, 0), 
DrawTextFormat.ExpandTabs, black);
-                       line += this.LineHeight;
-                       _font.DrawText("name     ping", new 
System.Drawing.Rectangle(_leftMargin+10, line, 0, 0), 
DrawTextFormat.ExpandTabs, black);
-                       line += this.LineHeight;
-
-                       // draw team 1 entries
-                       foreach(Entity e in 
GlobalState.Client.Universe.Players.Values)
-                       {
-                               if (e.Type == Ship.TYPE)
-                               {
-                                       Ship ship = (Ship)e;
-                                       if(ship.Team == 1)
-                                       {
-                                               string playerLine = ship.Name + 
"     " + ship.Ping;
-                                               _font.DrawText(playerLine, new 
System.Drawing.Rectangle(_leftMargin+10, line, 0, 0), 
DrawTextFormat.ExpandTabs, black);
-                                               line += this.LineHeight;
-                                       }
-                               }
-                       }
-
-                       line += this.LineHeight;
-                       _font.DrawText("Team 2: ontario", new 
System.Drawing.Rectangle(_leftMargin+135, line, 0, 0), 
DrawTextFormat.ExpandTabs, black);
-                       line += this.LineHeight;
-                       _font.DrawText("name     ping", new 
System.Drawing.Rectangle(_leftMargin+10, line, 0, 0), 
DrawTextFormat.ExpandTabs, black);
-                       line += this.LineHeight;
-
-                       // draw team 2 entries
-                       foreach(Entity e in 
GlobalState.Client.Universe.Players.Values)
-                       {
-                               if (e.Type == Ship.TYPE)
-                               {
-                                       Ship ship = (Ship)e;
-                                       if(ship.Team == 2)
-                                       {
-                                               string playerLine = ship.Name + 
"     " + ship.Ping;
-                                               _font.DrawText(playerLine, new 
System.Drawing.Rectangle(_leftMargin+10, line, 0, 0), 
DrawTextFormat.ExpandTabs, black);
-                                               line += this.LineHeight;
-                                       }
-                               }
-                       }
-
-                       if (_debug)
-                               _lock.ReleaseMutex();
-
-                       _device.RenderState.Lighting = true;
-                       _device.RenderState.AlphaBlendEnable = false;
-               }
-       }
-}
\ No newline at end of file

Deleted: trunk/skorpion.cs
===================================================================
--- trunk/skorpion.cs   2006-11-07 21:27:46 UTC (rev 114)
+++ trunk/skorpion.cs   2006-11-07 21:29:42 UTC (rev 115)
@@ -1,473 +0,0 @@
-using System;
-using System.Drawing;
-using System.Windows.Forms;
-using System.Threading;
-using System.Collections;
-using System.Reflection;
-using Microsoft.DirectX;
-using Microsoft.DirectX.Direct3D;
-
-namespace skorpion
-{
-       public class ClientConfig
-       {
-               public static bool          Debug               = false;
-
-               public static int           DevIndex            = 0;
-               public static DeviceType    DevType             = 
DeviceType.Hardware;
-               public static CreateFlags   DevFlags            = 
CreateFlags.HardwareVertexProcessing;
-
-               public static int           FormWidth           = 800;
-               public static int           FormHeight          = 600;
-
-               public static string        PlayerName          = "player";
-               public static ushort        Team                = 2;
-
-               public static bool          ClientStart         = true;
-               public static string        ClientConnect       = "pleep.com";
-               public static ushort        ClientPort          = 
ServerConfig.DEFAULTPORT;
-                       
-               public static bool          ServerStart         = true;
-
-               public static TimeSpan      ConsoleOpen         = new 
TimeSpan(0,0,0,0,500);
-               public static TimeSpan      ClientKeyRepeat     = new 
TimeSpan(0,0,0,0,200);
-               public static TimeSpan      ClientACKRetry      = new 
TimeSpan(0,0,0,1,0);
-               public static TimeSpan      ClientNetTimeout    = new 
TimeSpan(0,0,0,20,0);
-               public static TimeSpan      ClientGameTimeout   = new 
TimeSpan(0,0,0,5,0);
-               public static TimeSpan      ClientRefresh       = new 
TimeSpan(0,0,0,0,100);
-               public static bool          ClientPrediction    = true;
-               public static TimeSpan      PlayerInfoInterval  = new 
TimeSpan(0,0,0,5,0);
-       }
-
-       public struct GlobalState
-       {
-               public static bool                Pause               = false;
-               public static Skorpion            Skorpion            = null;
-               public static Form1               Form                = null;
-               public static int                 CamNum              = 1;
-               public static float               MouseSensitivity    = 0.002f;
-               public static int                 KeyboardSensitivity = 50;
-               public static Controller          Controller          = null;
-
-               //     [renderer] -.      .- [controller]
-               //                  |    |
-               // [universe] -- [gameclient] -- [netclient] -- ||server||
-               //
-               public static GameClient          Client              = null;
-               public static Console             Console             = null;
-               public static PlayerList          PlayerList          = null;
-               public static Chat                Chat                = null;
-               public static Command             Command             = null;
-               public static Bind                Bind                = null;
-       }
-
-       public class Skorpion
-       {
-               PresentParameters iPresentParams  = null;
-               Device            iDevice         = null;
-               bool              iDeviceReady    = false;
-
-               public struct PCVertex
-               {
-                       public Vector3 p;
-                       public int     color;
-                       public static readonly VertexFormats Format = 
VertexFormats.Position | VertexFormats.Diffuse;
-                       public static int StrideSize = 16;
-               }
-
-               Material          iShipMaterial;
-
-               VertexBuffer      iFieldVerts       = null;
-               IndexBuffer       iFieldIndex       = null;
-               IndexBuffer       iFieldBorderIndex = null;
-               Material          iFieldMaterial;
-               
-               Mesh              iBall             = null;
-               Material          iBallMaterial;
-
-               Mesh              iStars            = null;
-               Texture           iStarTexture      = null;
-
-               Hashtable         iAssets           = null;
-
-               DateTime          iLastPlayerInfoRequest = new DateTime(0);
-
-               public Skorpion()
-               {
-                       iAssets = new Hashtable();
-                       Type[] types = typeof(Entity).Assembly.GetTypes();
-                       foreach (Type t in types)
-                       {
-                               if (t.BaseType == typeof(Entity))
-                               {
-                                       ushort TYPE   = 
(ushort)t.InvokeMember("TYPE",  BindingFlags.Default | BindingFlags.GetField, 
null, null, null);
-                                       string ASSET  = 
(string)t.InvokeMember("ASSET", BindingFlags.Default | BindingFlags.GetField, 
null, null, null);
-                                       string TEXTURE = 
(string)t.InvokeMember("TEXTURE", BindingFlags.Default | BindingFlags.GetField, 
null, null, null);
-
-                                       if (ASSET.Length > 0)
-                                               iAssets[TYPE] = new string[] { 
ASSET, TEXTURE };
-                               }
-                       }
-               }
-
-               public void go()
-               {
-                       iPresentParams = new PresentParameters();
-                       iPresentParams.Windowed = true;
-                       iPresentParams.SwapEffect = SwapEffect.Discard;
-                       iPresentParams.EnableAutoDepthStencil = true;
-                       iPresentParams.AutoDepthStencilFormat = DepthFormat.D16;
-
-                       CreateDevice();
-
-                       
GlobalState.Client.Net.connect(ClientConfig.ClientConnect, 
ClientConfig.ClientPort, ClientConfig.PlayerName, ClientConfig.Team);
-
-                       while(ServerState.Live)
-                       {
-                               Application.DoEvents();
-
-                               // dont take 99% cpu
-                               System.Threading.Thread.Sleep(1);
-                               
-                               GlobalState.Client.Run();
-
-                               if (!GlobalState.Pause) 
-                               {
-                                       if (iDeviceReady)
-                                       {
-                                               Render();
-                                               try { iDevice.Present(); }
-                                               catch { iDeviceReady = false; }
-                                       }
-                                       else
-                                       {
-                                               
System.Threading.Thread.Sleep(10);
-
-                                               int deviceStatus;
-                                               
iDevice.CheckCooperativeLevel(out deviceStatus);
-                                               if ((int)ResultCode.Success == 
deviceStatus)
-                                               {
-                                                       iDeviceReady = true;
-                                               }
-                                               else if 
((int)ResultCode.DeviceNotReset == deviceStatus)
-                                               {
-                                                       iDeviceReady = true;
-                                                       
iDevice.Reset(iPresentParams);
-                                               }
-                                       }
-                               }
-
-                               if (!GlobalState.Pause && 
GlobalState.Form.Focused) 
-                               {
-                                       GlobalState.Controller.mouseInput();
-                                       GlobalState.Controller.keyboardInput();
-                               }
-
-                               GlobalState.Client.UpdateServer();
-
-                               if(GlobalState.PlayerList.IsVisible)
-                               {
-                                       DateTime refresh = 
DateTime.Now.Subtract(ClientConfig.PlayerInfoInterval);
-                                       if(iLastPlayerInfoRequest.Ticks == 0 || 
iLastPlayerInfoRequest < refresh)
-                                       {
-                                               PlayerInfoReq m = new 
PlayerInfoReq();
-                                               GlobalState.Client.Net.send(m);
-
-                                               iLastPlayerInfoRequest = 
DateTime.Now;
-                                       }
-                               }
-                       }
-               }
-
-               public static void SV(out Vector3 s, double x, double y, double 
z)
-               {
-                       s.X = (float)x;
-                       s.Y = (float)y;
-                       s.Z = (float)z;
-               }
-
-               public IndexBuffer ConstructIndexBuffer(Int16[] input)
-               {
-                       IndexBuffer ret = new IndexBuffer(typeof(Int16), 
input.Length, iDevice, 0, Pool.Default);
-                       Int16[] index = (Int16[])ret.Lock(0,0);
-                       for (int i = 0; i < input.Length; i++)
-                               index[i] = input[i];
-                       ret.Unlock();
-                       return ret;
-               }
-               
-               public void CreateDevice()
-               {
-                       iDevice = new Device(ClientConfig.DevIndex, 
ClientConfig.DevType, GlobalState.Form, ClientConfig.DevFlags, iPresentParams);
-                       iDevice.DeviceReset += new 
System.EventHandler(this.RestoreDeviceObjects);
-
-                       iDeviceReady = true;
-                       RestoreDeviceObjects(null, null);
-               }
-
-               public void RestoreDeviceObjects(object sender, EventArgs e)
-               {
-                       iDevice.RenderState.Lighting = true;
-                       iDevice.RenderState.ZBufferEnable = true;
-                       iDevice.RenderState.DitherEnable = false;
-                       iDevice.RenderState.SpecularEnable = false;
-                       iDevice.RenderState.AntiAliasedLineEnable = false;
-                       iDevice.RenderState.AlphaBlendOperation = 
BlendOperation.Add;
-                       iDevice.RenderState.SourceBlend = Blend.SourceAlpha;
-                       iDevice.RenderState.DestinationBlend = 
Blend.InvSourceAlpha;
-
-                       iDevice.Lights[0].Type = LightType.Directional;
-                       iDevice.Lights[0].Direction = new 
Microsoft.DirectX.Vector3(-0.2f, -1f, -0.4f);
-                       iDevice.Lights[0].Diffuse = Color.White;
-                       iDevice.Lights[0].Enabled = true;
-                       iDevice.Lights[0].Commit();
-
-                       iDevice.Lights[1].Type = LightType.Directional;
-                       iDevice.Lights[1].Direction = new 
Microsoft.DirectX.Vector3(0.2f, -1f, 0.4f);
-                       iDevice.Lights[1].Diffuse = Color.White;
-                       iDevice.Lights[1].Enabled = true;
-                       iDevice.Lights[1].Commit();
-
-                       iDevice.RenderState.Ambient = 
System.Drawing.Color.FromArgb(0x404040);
-
-                       iFieldMaterial = new Material();
-                       Color fc = Color.MediumAquamarine;
-                       iFieldMaterial.Emissive = fc;
-                       iFieldMaterial.Diffuse  = Color.White;
-
-                       // field
-                       iFieldVerts = new VertexBuffer(typeof(PCVertex), 8, 
iDevice, Usage.WriteOnly, PCVertex.Format, Pool.Default);
-                       PCVertex[] v = (PCVertex[])iFieldVerts.Lock(0, 0);
-                       v[0].p = Universe.FieldDefintion.A;
-                       v[1].p = Universe.FieldDefintion.B;
-                       v[2].p = Universe.FieldDefintion.C;
-                       v[3].p = Universe.FieldDefintion.D;
-                       v[4].p = Universe.FieldDefintion.E;
-                       v[5].p = Universe.FieldDefintion.F;
-                       v[6].p = Universe.FieldDefintion.G;
-                       v[7].p = Universe.FieldDefintion.H;
-                       for (int i=0; i<8; i++)
-                               v[i].color = Color.FromArgb(10+i*6, fc.R, fc.G, 
fc.B).ToArgb();
-                       iFieldVerts.Unlock();
-
-               //      Int16[] fieldIndex = { 0,1,2, 3,0,2, 3,2,6, 7,3,6, 
2,1,5, 2,5,6,
-               //              1,0,4, 1,4,5, 5,4,6, 4,7,6, 0,7,4, 7,0,3 };
-
-                       Int16[] fieldIndex = { 6,2,1, 5,6,1 };
-                       iFieldIndex = ConstructIndexBuffer(fieldIndex);
-
-               //      Int16[] fieldBorderIndex = { 0,1, 1,2, 2,3, 3,0, 
-               //                                                              
   4,5, 5,6, 6,7, 7,4,
-               //                                                              
   0,4, 1,5, 2,6, 3,7
-               //                                                         };
-
-                       Int16[] fieldBorderIndex = { 1,2, 2,6, 6,5, 5,1 };
-                       iFieldBorderIndex = 
ConstructIndexBuffer(fieldBorderIndex);
-
-                       // ball
-                       iBall = Mesh.Sphere(iDevice, 
Universe.BallDefinition.radius, 9, 9);
-
-                       iBallMaterial = new Material();
-                       iBallMaterial.Diffuse = Color.White;
-                       iBallMaterial.Emissive = Color.OrangeRed;
-                               
-
-                       // ship
-                       iShipMaterial = new Material();
-                       iShipMaterial.Diffuse = Color.White;
-
-                       // stars
-                       iStars = Mesh.Sphere(iDevice, 1000.0f, 20, 20);
-                       iStars = iStars.Clone(MeshFlags.WriteOnly, 
CustomVertex.PositionTextured.Format, iDevice);
-                       
-                       CustomVertex.PositionTextured[] starVerts = 
(CustomVertex.PositionTextured[])
-                               
iStars.LockVertexBuffer(typeof(CustomVertex.PositionTextured),
-                               LockFlags.None, iStars.NumberVertices);
-
-                       for (int i=0; i<iStars.NumberVertices; i++)
-                       {
-                               starVerts[i].Tu = 
(float)Math.Asin(starVerts[i].X/1000.0f)/(float)Math.PI+0.5f;
-                               starVerts[i].Tv = 
(float)Math.Asin(starVerts[i].Y/1000.0f)/(float)Math.PI+0.5f;
-                       }
-
-                       iStars.UnlockVertexBuffer();
-                       iStarTexture = TextureLoader.FromFile(iDevice, 
".\\assets\\starmap.dds");
-
-                       // assets
-                       Assets.Reset();
-                       foreach (DictionaryEntry de in iAssets)
-                       {
-                               string[] pair = (string[])de.Value;
-                               Assets.AddAsset(iDevice, pair[0], pair[1]);
-                       }
-
-                       GlobalState.Console.RestoreDeviceObjects(iDevice);
-                       GlobalState.Chat.RestoreDeviceObjects(iDevice);
-                       GlobalState.PlayerList.RestoreDeviceObjects(iDevice);
-               }
-
-               public void DrawShip(Ship s)
-               {       
-                       Vector3 ort = s.Orientation;
-                       ort.Normalize();
-
-                       Vector3 up = s.UpDirection;
-                       up.Normalize();
-
-                       Vector3 right = Vector3.Cross(ort, up);
-                       right.Normalize();
-
-                       Matrix m = new Matrix();                
-                       m.M11 = right.X;
-                       m.M12 = right.Y;
-                       m.M13 = right.Z;
-                       m.M14 = 0;
-
-                       m.M21 = up.X;
-                       m.M22 = up.Y;
-                       m.M23 = up.Z;
-                       m.M24 = 0;
-
-                       m.M31 = ort.X;
-                       m.M32 = ort.Y;
-                       m.M33 = ort.Z;
-                       m.M34 = 0;
-
-                       m.M41 = 0;
-                       m.M42 = 0;
-                       m.M43 = 0;
-                       m.M44 = 1;
-
-                       iDevice.Transform.World = m * 
Matrix.Translation(ClientUtils.Vec(s.Position));
-
-                       Assets.RenderAsset(iDevice, s.Asset, s.Texture);
-               }
-
-               public void Render()
-               {
-                       Ship Me = GlobalState.Client.Me;
-                       // LOG.debug(Me.Position.ToString());
-
-                       Vector3 ort     = GlobalState.Client.HoldCamera ? 
GlobalState.Client.LastOrientation : Me.Orientation;
-                       Vector3 camPos  = Me.Position;
-                       Vector3 camTarg = Me.Position + ort; 
-                       Vector3 camUp   = GlobalState.Client.HoldCamera ? 
GlobalState.Client.LastUpDirection : Me.UpDirection;
-
-                       if (GlobalState.CamNum == 1)
-                       {
-                               camPos -= ort * 40;
-                       }
-                       else if (GlobalState.CamNum == 2)
-                       {
-                               camPos -= ort   * 40;
-                               camPos += camUp * 2;
-                       }
-                       else if (GlobalState.CamNum == 3)
-                       {
-                       }
-                       else if (GlobalState.CamNum == 4)
-                       {
-                               camPos  = new Vector3(0,76,0);
-                               camTarg = new Vector3(0,0,0);
-                               camUp   = new Vector3(0,0,-1);
-                       }
-
-                       iDevice.Clear(ClearFlags.Target|ClearFlags.ZBuffer, 
System.Drawing.Color.Black, 1.0f, 0);
-                       iDevice.BeginScene();
-                       iDevice.Transform.World = Matrix.Identity;
-                       iDevice.Transform.View = 
Matrix.LookAtLH(ClientUtils.Vec(camPos), ClientUtils.Vec(camTarg), 
ClientUtils.Vec(camUp));
-                       float aspect = 
((float)iDevice.PresentationParameters.BackBufferWidth) / 
iDevice.PresentationParameters.BackBufferHeight;
-                       iDevice.Transform.Projection = 
Matrix.PerspectiveFovLH((float)Math.PI/2.0f, aspect, 1.0f, 2000.0f);
-
-                       // draw stars
-                       iDevice.RenderState.Lighting = false;
-                       iDevice.RenderState.ZBufferEnable = false;
-                       iDevice.RenderState.CullMode = Cull.Clockwise;
-                       iDevice.TextureState[0].ColorOperation = 
TextureOperation.SelectArg1;
-                       iDevice.TextureState[0].ColorArgument1 = 
TextureArgument.TextureColor;
-                       iDevice.SetTexture(0, iStarTexture);
-                       iStars.DrawSubset(0);
-                       iDevice.RenderState.Lighting = true;
-                       iDevice.RenderState.ZBufferEnable = true;
-
-                       // draw ball(s) ?
-                       // should sort entitys by type
-                       iDevice.TextureState[0].ColorOperation = 
TextureOperation.SelectArg1;
-                       iDevice.TextureState[0].ColorArgument1 = 
TextureArgument.Diffuse;
-                       iDevice.Material = iBallMaterial;
-
-                       foreach(Entity e in GlobalState.Client.ThisFrame.Values)
-                       {
-                               if (e.Type == Ball.TYPE)
-                               {
-                                       iDevice.Transform.World = 
Matrix.Translation(ClientUtils.Vec(e.Position));
-                                       iBall.DrawSubset(0);
-                               }
-                       }
-
-                       // draw field
-                       iDevice.Transform.World = Matrix.Identity;
-                       iDevice.Material = iFieldMaterial;
-                       iDevice.Indices = iFieldBorderIndex;
-                       iDevice.VertexFormat = PCVertex.Format;
-                       iDevice.RenderState.Lighting = false;
-                       iDevice.RenderState.AlphaBlendEnable = true;
-                       iDevice.RenderState.ZBufferWriteEnable = false;
-                       iDevice.TextureState[0].ColorOperation = 
TextureOperation.SelectArg1;
-                       iDevice.TextureState[0].ColorArgument1 = 
TextureArgument.Diffuse;
-                       iDevice.TextureState[0].ColorArgument2 = 
TextureArgument.TextureColor;
-                       iDevice.TextureState[0].AlphaOperation = 
TextureOperation.SelectArg1;
-                       iDevice.TextureState[0].AlphaArgument1 = 
TextureArgument.Diffuse;
-                       iDevice.TextureState[0].AlphaArgument2 = 
TextureArgument.TextureColor;
-                       iDevice.SetStreamSource(0, iFieldVerts, 0, 
PCVertex.StrideSize);
-                       iDevice.DrawIndexedPrimitives(PrimitiveType.LineList, 
0, 0, 8, 0, 4);
-
-                       iDevice.RenderState.CullMode = Cull.None;               
        
-                       iDevice.TextureState[0].ColorOperation = 
TextureOperation.SelectArg1;
-                       iDevice.TextureState[0].ColorArgument1 = 
TextureArgument.Diffuse;
-                       iDevice.TextureState[0].ColorArgument2 = 
TextureArgument.TextureColor;
-                       iDevice.TextureState[0].AlphaOperation = 
TextureOperation.SelectArg1;
-                       iDevice.TextureState[0].AlphaArgument1 = 
TextureArgument.Diffuse;
-                   iDevice.TextureState[0].AlphaArgument2 = 
TextureArgument.TextureColor;
-                       iDevice.Indices = iFieldIndex;
-                       
iDevice.DrawIndexedPrimitives(PrimitiveType.TriangleList, 0, 0, 8, 0, 2);
-                       iDevice.RenderState.ZBufferWriteEnable = true;
-                       iDevice.RenderState.AlphaBlendEnable = false;
-                       iDevice.RenderState.Lighting = true;
-
-                       // draw ships
-                       iDevice.RenderState.AlphaBlendEnable = true;
-                       iDevice.TextureState[0].ColorOperation = 
TextureOperation.Modulate;
-                       iDevice.TextureState[0].ColorArgument1 = 
TextureArgument.TextureColor;
-                       iDevice.TextureState[0].ColorArgument2 = 
TextureArgument.Diffuse;
-                       iDevice.TextureState[0].AlphaOperation = 
TextureOperation.SelectArg1;
-                       iDevice.TextureState[0].AlphaArgument1 = 
TextureArgument.TextureColor;
-
-                       // the material should be related to asset & texture
-                       iDevice.Material = iShipMaterial;
-                       iDevice.RenderState.FillMode = FillMode.Solid;
-                       iDevice.VertexFormat = 
CustomVertex.PositionNormalTextured.Format;
-                       iDevice.RenderState.CullMode = Cull.Clockwise;
-
-                       bool drawme = false;
-                       foreach(Entity e in 
GlobalState.Client.ThisFrame.Values) {
-                               if (e.ID == Me.ID) {
-                                       drawme = true;
-                               }
-                               else if (e.Type == Ship.TYPE) {
-                                       DrawShip((Ship)e);
-                               }
-                       }
-                       // allows local orientation to vary freely
-                       if (drawme)
-                               DrawShip(Me);
-                       iDevice.RenderState.AlphaBlendEnable = false;
-
-                       GlobalState.Console.Render();
-                       GlobalState.Chat.Render();
-                       GlobalState.PlayerList.Render();
-
-                       iDevice.EndScene();
-               }       
-       }
-}

Deleted: trunk/skorpion.csproj
===================================================================
--- trunk/skorpion.csproj       2006-11-07 21:27:46 UTC (rev 114)
+++ trunk/skorpion.csproj       2006-11-07 21:29:42 UTC (rev 115)
@@ -1,179 +0,0 @@
-<VisualStudioProject>
-    <CSHARP
-        ProjectType = "Local"
-        ProductVersion = "7.10.3077"
-        SchemaVersion = "2.0"
-        ProjectGuid = "{5745EA9D-6F0E-43E5-9904-42C13BA38731}"
-    >
-        <Build>
-            <Settings
-                ApplicationIcon = "App.ico"
-                AssemblyKeyContainerName = ""
-                AssemblyName = "skorpion"
-                AssemblyOriginatorKeyFile = ""
-                DefaultClientScript = "JScript"
-                DefaultHTMLPageLayout = "Grid"
-                DefaultTargetSchema = "IE50"
-                DelaySign = "false"
-                OutputType = "WinExe"
-                PreBuildEvent = ""
-                PostBuildEvent = ""
-                RootNamespace = "skorpion"
-                RunPostBuildEvent = "OnBuildSuccess"
-                StartupObject = ""
-            >
-                <Config
-                    Name = "Debug"
-                    AllowUnsafeBlocks = "false"
-                    BaseAddress = "285212672"
-                    CheckForOverflowUnderflow = "false"
-                    ConfigurationOverrideFile = ""
-                    DefineConstants = "DEBUG;TRACE"
-                    DocumentationFile = ""
-                    DebugSymbols = "true"
-                    FileAlignment = "4096"
-                    IncrementalBuild = "false"
-                    NoStdLib = "false"
-                    NoWarn = ""
-                    Optimize = "false"
-                    OutputPath = "bin\Debug\"
-                    RegisterForComInterop = "false"
-                    RemoveIntegerChecks = "false"
-                    TreatWarningsAsErrors = "false"
-                    WarningLevel = "4"
-                />
-                <Config
-                    Name = "Release"
-                    AllowUnsafeBlocks = "false"
-                    BaseAddress = "285212672"
-                    CheckForOverflowUnderflow = "false"
-                    ConfigurationOverrideFile = ""
-                    DefineConstants = "TRACE"
-                    DocumentationFile = ""
-                    DebugSymbols = "false"
-                    FileAlignment = "4096"
-                    IncrementalBuild = "false"
-                    NoStdLib = "false"
-                    NoWarn = ""
-                    Optimize = "true"
-                    OutputPath = "bin\Release\"
-                    RegisterForComInterop = "false"
-                    RemoveIntegerChecks = "false"
-                    TreatWarningsAsErrors = "false"
-                    WarningLevel = "4"
-                />
-            </Settings>
-            <References>
-                <Reference
-                    Name = "System"
-                    AssemblyName = "System"
-                    HintPath = 
"..\..\..\..\..\WINNT\Microsoft.NET\Framework\v1.1.4322\System.dll"
-                />
-                <Reference
-                    Name = "System.Data"
-                    AssemblyName = "System.Data"
-                    HintPath = 
"..\..\..\..\..\WINNT\Microsoft.NET\Framework\v1.1.4322\System.Data.dll"
-                />
-                <Reference
-                    Name = "System.Drawing"
-                    AssemblyName = "System.Drawing"
-                    HintPath = 
"..\..\..\..\..\WINNT\Microsoft.NET\Framework\v1.1.4322\System.Drawing.dll"
-                />
-                <Reference
-                    Name = "System.Windows.Forms"
-                    AssemblyName = "System.Windows.Forms"
-                    HintPath = 
"..\..\..\..\..\WINNT\Microsoft.NET\Framework\v1.1.4322\System.Windows.Forms.dll"
-                />
-                <Reference
-                    Name = "System.XML"
-                    AssemblyName = "System.Xml"
-                    HintPath = 
"..\..\..\..\..\WINNT\Microsoft.NET\Framework\v1.1.4322\System.XML.dll"
-                />
-                <Reference
-                    Name = "server"
-                    Project = "{62CECD29-0D9B-4D68-9D4B-F9BBAA225758}"
-                    Package = "{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}"
-                />
-                <Reference
-                    Name = "Microsoft.DirectX.Direct3D"
-                    AssemblyName = "Microsoft.DirectX.Direct3D"
-                    HintPath = "..\DXLINK\Microsoft.DirectX.Direct3D.dll"
-                />
-                <Reference
-                    Name = "Microsoft.DirectX.Direct3DX"
-                    AssemblyName = "Microsoft.DirectX.Direct3DX"
-                    HintPath = "..\DXLINK\Microsoft.DirectX.Direct3DX.dll"
-                />
-                <Reference
-                    Name = "Microsoft.DirectX.DirectInput"
-                    AssemblyName = "Microsoft.DirectX.DirectInput"
-                    HintPath = "..\DXLINK\Microsoft.DirectX.DirectInput.dll"
-                />
-                <Reference
-                    Name = "Microsoft.DirectX"
-                    AssemblyName = "Microsoft.DirectX"
-                    HintPath = "..\DXLINK\Microsoft.DirectX.dll"
-                />
-            </References>
-        </Build>
-        <Files>
-            <Include>
-                <File
-                    RelPath = "App.ico"
-                    BuildAction = "Content"
-                />
-                <File
-                    RelPath = "AssemblyInfo.cs"
-                    SubType = "Code"
-                    BuildAction = "Compile"
-                />
-                <File
-                    RelPath = "Assets.cs"
-                    SubType = "Code"
-                    BuildAction = "Compile"
-                />
-                <File
-                    RelPath = "Chat.cs"
-                    SubType = "Code"
-                    BuildAction = "Compile"
-                />
-                <File
-                    RelPath = "Client.cs"
-                    SubType = "Code"
-                    BuildAction = "Compile"
-                />
-                <File
-                    RelPath = "Console.cs"
-                    SubType = "Code"
-                    BuildAction = "Compile"
-                />
-                <File
-                    RelPath = "Controller.cs"
-                    SubType = "Code"
-                    BuildAction = "Compile"
-                />
-                <File
-                    RelPath = "Form1.cs"
-                    SubType = "Form"
-                    BuildAction = "Compile"
-                />
-                <File
-                    RelPath = "Form1.resx"
-                    DependentUpon = "Form1.cs"
-                    BuildAction = "EmbeddedResource"
-                />
-                <File
-                    RelPath = "PlayerList.cs"
-                    SubType = "Code"
-                    BuildAction = "Compile"
-                />
-                <File
-                    RelPath = "skorpion.cs"
-                    SubType = "Code"
-                    BuildAction = "Compile"
-                />
-            </Include>
-        </Files>
-    </CSHARP>
-</VisualStudioProject>
-

Deleted: trunk/skorpion.sln
===================================================================
--- trunk/skorpion.sln  2006-11-07 21:27:46 UTC (rev 114)
+++ trunk/skorpion.sln  2006-11-07 21:29:42 UTC (rev 115)
@@ -1,37 +0,0 @@
-Microsoft Visual Studio Solution File, Format Version 8.00
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "server", 
"server\server.csproj", "{62CECD29-0D9B-4D68-9D4B-F9BBAA225758}"
-       ProjectSection(ProjectDependencies) = postProject
-       EndProjectSection
-EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "dedicated", 
"dedicated\dedicated.csproj", "{4902F9DD-5E54-4634-84D1-D2FB9440E3C2}"
-       ProjectSection(ProjectDependencies) = postProject
-       EndProjectSection
-EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "skorpion", 
"skorpion.csproj", "{5745EA9D-6F0E-43E5-9904-42C13BA38731}"
-       ProjectSection(ProjectDependencies) = postProject
-       EndProjectSection
-EndProject
-Global
-       GlobalSection(SolutionConfiguration) = preSolution
-               Debug = Debug
-               Release = Release
-       EndGlobalSection
-       GlobalSection(ProjectConfiguration) = postSolution
-               {62CECD29-0D9B-4D68-9D4B-F9BBAA225758}.Debug.ActiveCfg = 
Debug|.NET
-               {62CECD29-0D9B-4D68-9D4B-F9BBAA225758}.Debug.Build.0 = 
Debug|.NET
-               {62CECD29-0D9B-4D68-9D4B-F9BBAA225758}.Release.ActiveCfg = 
Release|.NET
-               {62CECD29-0D9B-4D68-9D4B-F9BBAA225758}.Release.Build.0 = 
Release|.NET
-               {4902F9DD-5E54-4634-84D1-D2FB9440E3C2}.Debug.ActiveCfg = 
Debug|.NET
-               {4902F9DD-5E54-4634-84D1-D2FB9440E3C2}.Debug.Build.0 = 
Debug|.NET
-               {4902F9DD-5E54-4634-84D1-D2FB9440E3C2}.Release.ActiveCfg = 
Release|.NET
-               {4902F9DD-5E54-4634-84D1-D2FB9440E3C2}.Release.Build.0 = 
Release|.NET
-               {5745EA9D-6F0E-43E5-9904-42C13BA38731}.Debug.ActiveCfg = 
Debug|.NET
-               {5745EA9D-6F0E-43E5-9904-42C13BA38731}.Debug.Build.0 = 
Debug|.NET
-               {5745EA9D-6F0E-43E5-9904-42C13BA38731}.Release.ActiveCfg = 
Release|.NET
-               {5745EA9D-6F0E-43E5-9904-42C13BA38731}.Release.Build.0 = 
Release|.NET
-       EndGlobalSection
-       GlobalSection(ExtensibilityGlobals) = postSolution
-       EndGlobalSection
-       GlobalSection(ExtensibilityAddIns) = postSolution
-       EndGlobalSection
-EndGlobal





reply via email to

[Prev in Thread] Current Thread [Next in Thread]