//--------------------------------------------------------------------------------------------------------------------------------------------------- // // Copyright (C)2007 DarkWynter Studios. All rights reserved. // //--------------------------------------------------------------------------------------------------------------------------------------------------- // {Contact : darkwynter.com for licensing information //--------------------------------------------------------------------------------------------------------------------------------------------------- namespace DarkWynter.Stream { #region Using Statements using System; using System.Collections.Generic; using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Audio; using Microsoft.Xna.Framework.Content; using Microsoft.Xna.Framework.Graphics; using Microsoft.Xna.Framework.Input; using Microsoft.Xna.Framework.Storage; using System.Xml; using System.Diagnostics; #endregion using Nuclex; using System.ComponentModel; using DarkWynter.Stream.UIInterfacing; /// /// Contains the Global Scoreboard where application-scope variables are posted and read. /// public class Statics_Stream { [EditorAttribute(typeof(ObjectPropertyEditor), typeof(System.Drawing.Design.UITypeEditor))] public RenderSettings _renderSettings { get { return renderSettings; } set { renderSettings = value; } } public RenderSettings renderSettings; [EditorAttribute(typeof(ObjectPropertyEditor), typeof(System.Drawing.Design.UITypeEditor))] public GPU_ProcessorSettings _gpu_ProcessorSettings { get { return gpu_ProcessorSettings; } set { gpu_ProcessorSettings = value; } } public GPU_ProcessorSettings gpu_ProcessorSettings; [EditorAttribute(typeof(ObjectPropertyEditor), typeof(System.Drawing.Design.UITypeEditor))] public Fonts _fonts { get { return fonts; } set { fonts = value; } } public Fonts fonts; public Statics_Stream() { renderSettings = new RenderSettings(); gpu_ProcessorSettings = new GPU_ProcessorSettings(); fonts = new Fonts(); } #region Render /// /// Render Settings /// public struct RenderSettings { /// /// Graphics Manager /// public Nuclex.GraphicsDeviceManager _graphics { get { return graphics; } set { graphics = value; } } public static Nuclex.GraphicsDeviceManager graphics; /// /// View matrix /// public Matrix _matrixView { get { return matrixView; } set { matrixView = value; } } public static Matrix matrixView; /// /// Projection matrix /// public Matrix _matrixProjection { get { return matrixProjection; } set { matrixProjection = value; } } public static Matrix matrixProjection; /// /// Position matrix /// public Matrix _matrixPosition { get { return matrixPosition; } set { matrixPosition = value; } } public static Matrix matrixPosition; /// /// Zoom enabled/disabled /// public bool _zoomEnabled { get { return zoomEnabled; } set { zoomEnabled = value; } } public static bool zoomEnabled = false; /// /// Zoom scaling factor /// public float _zoomFactor { get { return zoomFactor; } set { zoomFactor = value; } } public static float zoomFactor = 2.0f; /// /// Hack for drawing the bot's view in a separate viewport /// public bool _HIJACK_VIEWPORT { get { return HIJACK_VIEWPORT; } set { HIJACK_VIEWPORT = value; } } public static bool HIJACK_VIEWPORT = false; /// /// Window Width /// public int _clientWidth { get { return clientWidth; } set { clientWidth = value; } } public static int clientWidth; /// /// Window Height /// public int _clientHeight { get { return clientHeight; } set { clientHeight = value; } } public static int clientHeight; /// /// Window minimum depth /// public float _clientMinDepth { get { return clientMinDepth; } set { clientMinDepth = value; } } public static float clientMinDepth; /// /// Window maximum depth /// public float _clientMaxDepth { get { return clientMaxDepth; } set { clientMaxDepth = value; } } public static float clientMaxDepth; /// /// Default view Port /// public Viewport _defaultViewport { get { return defaultViewport; } set { defaultViewport = value; } } public static Viewport defaultViewport = new Viewport(); // Default viewport that takes up the whole screen /// /// List of view-ports /// public List _cameraList { get { return cameraList; } set { cameraList = value; } } public static List cameraList = new List(); // Window viewports (for multiplayer) /// /// Window Width /// public int _GAME_WINDOW_WIDTH { get { return GAME_WINDOW_WIDTH; } set { GAME_WINDOW_WIDTH = value; } } public static int GAME_WINDOW_WIDTH = 800; /// /// Window Height /// public int _GAME_WINDOW_HEIGHT { get { return GAME_WINDOW_HEIGHT; } set { GAME_WINDOW_HEIGHT = value; } } public static int GAME_WINDOW_HEIGHT = 800; /// /// Sets global FillMode to Solid, WireFrame, or Point mode. /// public FillMode _fillMode { get { return fillMode; } set { fillMode = value; } } public static FillMode fillMode = FillMode.Solid; } #endregion #region GPU Processor /// /// GPU Processor settings /// public struct GPU_ProcessorSettings { /// /// Indexed viewport target size /// public int _INDEXED_TARGET_SIZE { get { return INDEXED_TARGET_SIZE; } set { INDEXED_TARGET_SIZE = value; } } public static int INDEXED_TARGET_SIZE = 256; /// /// Spatial viewport target size /// public int _SPATIAL_TARGET_SIZE { get { return SPATIAL_TARGET_SIZE; } set { SPATIAL_TARGET_SIZE = value; } } public static int SPATIAL_TARGET_SIZE = 1024; } #endregion #region Fonts /// /// Fonts used for drawing text on-screen /// public struct Fonts { // Basic Fonts that are used /// /// Arial /// [EditorAttribute(typeof(ObjectPropertyEditor), typeof(System.Drawing.Design.UITypeEditor))] public SpriteFont _Arial { get { return Arial; } set { Arial = value; } } public static SpriteFont Arial; /// /// Comic Sans /// [EditorAttribute(typeof(ObjectPropertyEditor), typeof(System.Drawing.Design.UITypeEditor))] public SpriteFont _ComicSans { get { return ComicSans; } set { ComicSans = value; } } public static SpriteFont ComicSans; /// /// Comic Sans small /// [EditorAttribute(typeof(ObjectPropertyEditor), typeof(System.Drawing.Design.UITypeEditor))] public SpriteFont _ComicSansSmall { get { return ComicSansSmall; } set { ComicSansSmall = value; } } public static SpriteFont ComicSansSmall; } #endregion } }