axiosengine 

axiosengine Commit Details


Date:2012-05-26 19:08:33 (12 years 4 months ago)
Author:Natalie Adams
Branch:master
Commit:56f2b95e72af514cdf9435fcd2b4e822a0ca5028
Parents: 11ab45d9ee41252dc5c7d2ba0f3609b7a2f68f63
Message:Adding empty AxiosCommandConsole to not require #if WINDOWS/#endif precompiler statments on WP7/Xbox 360 Adjusting code in AxiosGameScreen to accept it on WP7/Xbox 360 but just store it

--HG--
branch : xnacc-integration
Changes:

File differences

axios/Engine/AxiosCommandConsole.cs
55
66
77
8
9
10
11
12
13
14
15
16
17
18
19
820
921
1022
......
2133
2234
2335
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
2467
2568
2669
using System.Text;
using XNACC.Console;
using Microsoft.Xna.Framework.Graphics;
using Microsoft.Xna.Framework.Content;
using Microsoft.Xna.Framework;
/*
* The empty AxiosCommandConsole is so that when you use the comamnd console
* in your game you don't need #if WINDOWS/#endif precompiler - when you attempt
* to use it on WP7/Xbox 360 it just won't do anything.
*
* Perhaps one day we should develop a customized console that doesn't require keyboard input
* to still allow debugging on WP7/Xbox 360
* -- Nathan Adams [adamsna@datanethost.net] - 5/26/2012
*/
namespace Axios.Engine
{
{
Keyboard = gameScreen.ScreenManager.InputState;
}
protected override void LoadContent()
{
FadeColor = Color.White * 0.5f;
Texture2D tmp = new Texture2D(GraphicsDevice, 1, 1);
tmp.SetData<Color>(new Color[] { Color.Black });
FadeImage = tmp;
base.LoadContent();
}
}
}
#else
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.Xna.Framework.Graphics;
namespace Axios.Engine
{
class AxiosCommandConsole
{
public AxiosCommandConsole(AxiosGameScreen gameScreen)
{
}
public AxiosCommandConsole(AxiosGameScreen gameScreen, SpriteFont font)
{
}
}
}
#endif
axios/Engine/AxiosGameScreen.cs
4141
4242
4343
44
4544
46
4745
4846
4947
......
9896
9997
10098
101
102
10399
104100
105101
106102
107103
104
108105
109106
107
110108
111109
112110
111
113112
114
115113
114
116115
117116
118117
private Camera camera;
#if WINDOWS
AxiosCommandConsole _console = null;
#endif
public AxiosGameScreen()
: base()
public void AddGameObject(object obj)
{
#if WINDOWS
if (obj is AxiosCommandConsole)
{
if (_console != null)
{
//remove the current one first
#if WINDOWS
ScreenManager.Game.Components.Remove(_console);
_console.Dispose();
#endif
_console = null;
}
_console = (AxiosCommandConsole)obj;
#if WINDOWS
ScreenManager.Game.Components.Add(_console);
}
#endif
}
if (obj is AxiosGameObject || obj is AxiosUIObject || obj is AxiosTimer)
{
AxiosGameObject tmp = obj as AxiosGameObject;

Archive Download the corresponding diff file

Branches

Number of commits:
Page rendered in 0.06610s using 14 queries.