AxiosEngine-old 

AxiosEngine-old Commit Details


Date:2012-05-13 22:20:00 (12 years 7 months ago)
Author:Natalie Adams
Branch:default
Commit:e88d15c149ab
Parents: 4ddbdd33fc18
Message:+ * - Fixing path placement in Farseer

* Fixing rectangle placement in Farseer
+ * - Moving base.draw to last in AxiosGameScreen to make sure Farseer debug information is visible
Changes:
Maxios/Axios_settings.cs (1 diff)
Maxios/Engine/AxiosGameScreen.cs (3 diffs)
Maxios/Engine/Gleed2D/PathItem.cs (1 diff)
Maxios/Engine/Gleed2D/RectangleItem.cs (1 diff)

File differences

axios/Axios_settings.cs
7676
7777
7878
79
80
7981
8082
8183
* - Adding support to load a Gleed2D level from a stream
* - Adjusting units for Gleed2D position for Farseer bodies
* - Modfying draw method in AxiosGameScreen to draw Gleed2D textures
* - Fixing path placement in Farseer
* - Moving base.draw to last in AxiosGameScreen to make sure Farseer debug information is visible
*
*/
axios/Engine/AxiosGameScreen.cs
183183
184184
185185
186
186
187187
188188
189189
......
191191
192192
193193
194
195
194
195
196196
197197
198198
......
206206
207207
208208
209
209
210210
211211
212212
public override void Draw(GameTime gameTime)
{
base.Draw(gameTime);
if (Level != null)
{
{
Vector2 oldcameraposition = camera.Position;
camera.Position *= layer.ScrollSpeed;
ScreenManager.SpriteBatch.Begin(0, null, null, null, null, null, camera.matrix);
ScreenManager.SpriteBatch.Begin(0, null, null, null, null, null, Camera.View);
layer.draw(ScreenManager.SpriteBatch);
ScreenManager.SpriteBatch.End();
foreach(AxiosUIObject g in (from x in _uiobjects orderby x.DrawOrder select x))
((IDrawableAxiosGameObject)g).Draw(this, gameTime);
//System.Diagnostics.Debugger.Break();
base.Draw(gameTime); //This is placed at the end so that Farseer debug information is visible
}
axios/Engine/Gleed2D/PathItem.cs
3030
3131
3232
33
34
33
34
3535
3636
3737
{
base.load(cm, world, ref cache);
Vertices v = new Vertices(WorldPoints.Length);
foreach (Vector2 vec in WorldPoints)
Vertices v = new Vertices(LocalPoints.Length);
foreach (Vector2 vec in LocalPoints)
v.Add(new Vector2(ConvertUnits.ToSimUnits(vec.X), ConvertUnits.ToSimUnits(vec.Y)));
_body = BodyFactory.CreateLoopShape(world, v);
axios/Engine/Gleed2D/RectangleItem.cs
2828
2929
3030
31
32
31
32
3333
3434
3535
{
base.load(cm, world, ref cache);
_body = BodyFactory.CreateRectangle(world, Width, Height, 1f);
_body.Position = ConvertUnits.ToSimUnits(Position);
_body = BodyFactory.CreateRectangle(world, ConvertUnits.ToSimUnits(Width), ConvertUnits.ToSimUnits(Height), 1f);
_body.Position = ConvertUnits.ToSimUnits(Position) + new Vector2(ConvertUnits.ToSimUnits(Width)/2, ConvertUnits.ToSimUnits(Height)/2);
_body.UserData = this;
}
}

Archive Download the corresponding diff file

Page rendered in 0.43486s using 14 queries.