diff -r c81277a9e7caaef4bb4f7219697194aec27b6ecf -r b5444bca056e444fefebf4f252441c0ba7475037 axios/Axios_settings.cs --- a/axios/Axios_settings.cs Wed Jul 18 22:48:08 2012 -0500 +++ b/axios/Axios_settings.cs Fri Jul 20 22:11:10 2012 -0500 @@ -107,7 +107,10 @@ * - Adding DegreeToRadian/RadianToDegree double extensions * - Fixing UI detect bug * - Adding Width/Height/Position/RealPosition to DrawableAxiosGameObject - * + * - Starting work on AxiosCSV + * - Adding CustomProperties field to Glee2D Layer object (this is because Layers can have custom properties) + * - Passing Layer to Items in Glee2D library + * - Adding public virtual bool LoadTextureItem(TextureItem textureitem) to AxiosGameScreen * */ #endregion diff -r c81277a9e7caaef4bb4f7219697194aec27b6ecf -r b5444bca056e444fefebf4f252441c0ba7475037 axios/Engine/AxiosGameScreen.cs --- a/axios/Engine/AxiosGameScreen.cs Wed Jul 18 22:48:08 2012 -0500 +++ b/axios/Engine/AxiosGameScreen.cs Fri Jul 20 22:11:10 2012 -0500 @@ -464,6 +464,10 @@ return true; } + public virtual bool LoadTextureItem(TextureItem textureitem) + { + return true; + } } } diff -r c81277a9e7caaef4bb4f7219697194aec27b6ecf -r b5444bca056e444fefebf4f252441c0ba7475037 axios/Engine/Data/AxiosCSV.cs --- a/axios/Engine/Data/AxiosCSV.cs Wed Jul 18 22:48:08 2012 -0500 +++ b/axios/Engine/Data/AxiosCSV.cs Fri Jul 20 22:11:10 2012 -0500 @@ -1,4 +1,4 @@ - +using System.Collections.Generic; using Axios.Engine.File; namespace Axios.Engine.Data @@ -10,5 +10,12 @@ { _file = file; } + + public List> GetData() + { + List> ret = new List>(); + + return ret; + } } } diff -r c81277a9e7caaef4bb4f7219697194aec27b6ecf -r b5444bca056e444fefebf4f252441c0ba7475037 axios/Engine/Gleed2D/CircleItem.cs --- a/axios/Engine/Gleed2D/CircleItem.cs Wed Jul 18 22:48:08 2012 -0500 +++ b/axios/Engine/Gleed2D/CircleItem.cs Fri Jul 20 22:11:10 2012 -0500 @@ -23,9 +23,9 @@ { } - public override void load(AxiosGameScreen gameScreen, ref Dictionary cache) + public override void load(AxiosGameScreen gameScreen, ref Dictionary cache, Layer layer) { - base.load(gameScreen, ref cache); + base.load(gameScreen, ref cache, layer); if (gameScreen.LoadCircleItem(this)) { _body = BodyFactory.CreateCircle(gameScreen.World, Radius, 1f); diff -r c81277a9e7caaef4bb4f7219697194aec27b6ecf -r b5444bca056e444fefebf4f252441c0ba7475037 axios/Engine/Gleed2D/Item.cs --- a/axios/Engine/Gleed2D/Item.cs Wed Jul 18 22:48:08 2012 -0500 +++ b/axios/Engine/Gleed2D/Item.cs Fri Jul 20 22:11:10 2012 -0500 @@ -49,7 +49,7 @@ /// Called by Level.FromFile(filename) on each Item after the deserialization process. /// Should be overriden and can be used to load anything needed by the Item (e.g. a texture). /// - public virtual void load(AxiosGameScreen gameScreen, ref Dictionary cache) + public virtual void load(AxiosGameScreen gameScreen, ref Dictionary cache, Layer layer) { } diff -r c81277a9e7caaef4bb4f7219697194aec27b6ecf -r b5444bca056e444fefebf4f252441c0ba7475037 axios/Engine/Gleed2D/Layer.cs --- a/axios/Engine/Gleed2D/Layer.cs Wed Jul 18 22:48:08 2012 -0500 +++ b/axios/Engine/Gleed2D/Layer.cs Fri Jul 20 22:11:10 2012 -0500 @@ -35,6 +35,11 @@ /// public Vector2 ScrollSpeed; + /// + /// A Dictionary containing any user-defined Properties. + /// + public SerializableDictionary CustomProperties; + public Layer() { diff -r c81277a9e7caaef4bb4f7219697194aec27b6ecf -r b5444bca056e444fefebf4f252441c0ba7475037 axios/Engine/Gleed2D/Level.cs --- a/axios/Engine/Gleed2D/Level.cs Wed Jul 18 22:48:08 2012 -0500 +++ b/axios/Engine/Gleed2D/Level.cs Fri Jul 20 22:11:10 2012 -0500 @@ -67,7 +67,7 @@ foreach (Item item in layer.Items) { item.CustomProperties.RestoreItemAssociations(level); - item.load(gameScreen, ref cache); + item.load(gameScreen, ref cache, layer); } } @@ -86,7 +86,7 @@ foreach (Item item in layer.Items) { item.CustomProperties.RestoreItemAssociations(level); - item.load(gameScreen, ref cache); + item.load(gameScreen, ref cache, layer); } } diff -r c81277a9e7caaef4bb4f7219697194aec27b6ecf -r b5444bca056e444fefebf4f252441c0ba7475037 axios/Engine/Gleed2D/PathItem.cs --- a/axios/Engine/Gleed2D/PathItem.cs Wed Jul 18 22:48:08 2012 -0500 +++ b/axios/Engine/Gleed2D/PathItem.cs Fri Jul 20 22:11:10 2012 -0500 @@ -26,9 +26,9 @@ { } - public override void load(AxiosGameScreen gameScreen, ref Dictionary cache) + public override void load(AxiosGameScreen gameScreen, ref Dictionary cache, Layer layer) { - base.load(gameScreen, ref cache); + base.load(gameScreen, ref cache, layer); if (gameScreen.LoadPathItem(this)) { Vertices v = new Vertices(LocalPoints.Length); diff -r c81277a9e7caaef4bb4f7219697194aec27b6ecf -r b5444bca056e444fefebf4f252441c0ba7475037 axios/Engine/Gleed2D/RectangleItem.cs --- a/axios/Engine/Gleed2D/RectangleItem.cs Wed Jul 18 22:48:08 2012 -0500 +++ b/axios/Engine/Gleed2D/RectangleItem.cs Fri Jul 20 22:11:10 2012 -0500 @@ -22,11 +22,12 @@ public RectangleItem() { + } - public override void load(AxiosGameScreen gameScreen, ref Dictionary cache) + public override void load(AxiosGameScreen gameScreen, ref Dictionary cache, Layer layer) { - base.load(gameScreen, ref cache); + base.load(gameScreen, ref cache, layer); if (gameScreen.LoadRectangleItem(this)) { _body = BodyFactory.CreateRectangle(gameScreen.World, ConvertUnits.ToSimUnits(Width), ConvertUnits.ToSimUnits(Height), 1f); diff -r c81277a9e7caaef4bb4f7219697194aec27b6ecf -r b5444bca056e444fefebf4f252441c0ba7475037 axios/Engine/Gleed2D/TextureItem.cs --- a/axios/Engine/Gleed2D/TextureItem.cs Wed Jul 18 22:48:08 2012 -0500 +++ b/axios/Engine/Gleed2D/TextureItem.cs Fri Jul 20 22:11:10 2012 -0500 @@ -58,7 +58,7 @@ /// exists as an asset in your project. /// Loading is done in the Item's load() method. /// - Texture2D texture; + public Texture2D texture; /// /// The item's origin relative to the upper left corner of the texture. Usually the middle of the texture. @@ -66,6 +66,8 @@ /// public Vector2 Origin; + public Layer Layer; + public TextureItem() { @@ -77,8 +79,10 @@ /// You must provide your own implementation. However, you can rely on all public fields being /// filled by the level deserialization process. /// - public override void load(AxiosGameScreen gameScreen, ref Dictionary cache) + public override void load(AxiosGameScreen gameScreen, ref Dictionary cache, Layer layer) { + this.Layer = layer; + base.load(gameScreen, ref cache, layer); //throw new NotImplementedException(); //TODO: provide your own implementation of how a TextureItem loads its assets @@ -90,8 +94,10 @@ cache[asset_name] = gameScreen.ScreenManager.Game.Content.Load(asset_name); } this.texture = cache[asset_name]; + Visible = gameScreen.LoadTextureItem(this); + //this.texture = cm.Load(asset_name); - + } public override void draw(SpriteBatch sb) diff -r c81277a9e7caaef4bb4f7219697194aec27b6ecf -r b5444bca056e444fefebf4f252441c0ba7475037 axios/Engine/SimpleDrawableAxiosGameObject.cs --- a/axios/Engine/SimpleDrawableAxiosGameObject.cs Wed Jul 18 22:48:08 2012 -0500 +++ b/axios/Engine/SimpleDrawableAxiosGameObject.cs Fri Jul 20 22:11:10 2012 -0500 @@ -95,20 +95,20 @@ Vertices vertices = PolygonTools.CreatePolygon(data, this.Texture.Width, false); Vector2 vector = -vertices.GetCentroid(); vertices.Translate(ref vector); - base.Origin = -vector; + this.Origin = -vector; List list = BayazitDecomposer.ConvexPartition(SimplifyTools.ReduceByDistance(vertices, 4f)); - base._scale = 1f; - Vector2 vector2 = (Vector2)(new Vector2(ConvertUnits.ToSimUnits(1)) * base._scale); + this._scale = 1f; + Vector2 vector2 = (Vector2)(new Vector2(ConvertUnits.ToSimUnits(1)) * this._scale); foreach (Vertices vertices2 in list) { vertices2.Scale(ref vector2); } - base.BodyPart = BodyFactory.CreateCompoundPolygon(gameScreen.World, list, 1f, BodyType.Dynamic); - base.BodyPart.BodyType = BodyType.Dynamic; - base.BodyPart.Position = base.Position; - base.BodyPart.UserData = this; - base.BodyPart.CollidesWith = Category.All; - base.BodyPart.CollisionCategories = Category.All; + this.BodyPart = BodyFactory.CreateCompoundPolygon(gameScreen.World, list, 1f, BodyType.Dynamic); + this.BodyPart.BodyType = BodyType.Dynamic; + this.BodyPart.Position = this.Position; + this.BodyPart.UserData = this; + this.BodyPart.CollidesWith = Category.All; + this.BodyPart.CollisionCategories = Category.All; } }