<commit_before>using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Linq;
using System.Text;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;
using Microsoft.Xna.Framework.Content;
using Delta.Input;
using Delta.Audio;
using Delta.Graphics;
using Delta.Graphics.Effects;
using Delta.Collision;

namespace Delta
{

    public struct DeltaTime
    {
        public float TotalSeconds { get; internal set; }
        public float ElapsedSeconds { get; internal set; }
        public bool IsRunningSlowly { get; internal set; }
    }

    public class G : Game
    {
        internal const bool LETTERBOX = false;
        internal const float ASPECT_RATIO_SD = 800f / 600f;
        internal const float ASPECT_RATIO_HD = 1920f / 1080f;

        internal static ResourceContentManager _embedded = null;
        internal static GraphicsDeviceManager _graphicsDeviceManager = null;
        internal static bool _lateInitialized = false;

        public new static ContentManager Content { get; private set; }
        public static InputManager Input { get; private set; }
        public static AudioManager Audio { get; private set; }
        public static World World { get; private set; }
        public static UI UI { get; private set; }

        public new static GraphicsDevice GraphicsDevice { get; private set; }
        public static SpriteBatch SpriteBatch { get; private set; }
        public static PrimitiveBatch PrimitiveBatch { get; private set; }
        public static CollisionEngine Collision { get; private set; }
        public static Texture2D PixelTexture { get; private set; }
        public static SpriteFont Font { get; private set; }
        public static Random Random { get; private set; }
        public static Rectangle ScreenArea { get; private set; }
        public static Vector2 ScreenCenter { get; private set; }

        public static DeltaEffect DeltaEffect { get; private set; }
        public static SimpleEffect SimpleEffect { get; private set; }

        public G(int screenWidth, int screenHeight)
            : base()
        {
            Content = base.Content;
            Content.RootDirectory = "Content";
            _graphicsDeviceManager = new GraphicsDeviceManager(this);
            _graphicsDeviceManager.PreferredBackBufferWidth = screenWidth;
            _graphicsDeviceManager.PreferredBackBufferHeight = screenHeight;
            _graphicsDeviceManager.DeviceReset += OnDeviceReset;
            _graphicsDeviceManager.PreparingDeviceSettings += OnPreparingDeviceSettings;
            _embedded = new ResourceContentManager(Services, EmbeddedContent.ResourceManager);
#if DEBUG
            IsMouseVisible = true;
            Window.AllowUserResizing = true;
#endif
            World = new World();
            UI = new UI();
            Random = new Random();
            Input = new InputManager();
            Audio = new AudioManager(@"Content\Audio\audio.xgs", @"Content\Audio\Sound Bank.xsb", @"Content\Audio\Wave Bank.xwb", @"Content\Audio\StreamingBank.xwb");
            Collision = new CollisionEngine();
        }

        protected override void LoadContent()
        {
            base.LoadContent();
            GraphicsDevice = _graphicsDeviceManager.GraphicsDevice;
            SpriteBatch = new SpriteBatch(GraphicsDevice);
            PrimitiveBatch = new PrimitiveBatch(GraphicsDevice);
            PixelTexture = new Texture2D(GraphicsDevice, 1, 1);
            PixelTexture.SetData<Color>(new Color[] { Color.White });
            Font = _embedded.Load<SpriteFont>("TinyFont");
            DeltaEffect = new DeltaEffect(_embedded.Load<Effect>("DeltaEffect"));
            SimpleEffect = new SimpleEffect(_embedded.Load<Effect>("SimpleEffect"));
            ScreenArea = GraphicsDevice.Viewport.Bounds;
            ScreenCenter = ScreenArea.Center.ToVector2();
            GC.Collect();
            ResetElapsedTime();<commit_msg>load content for world and ui.<commit_after>using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Linq;
using System.Text;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;
using Microsoft.Xna.Framework.Content;
using Delta.Input;
using Delta.Audio;
using Delta.Graphics;
using Delta.Graphics.Effects;
using Delta.Collision;

namespace Delta
{

    public struct DeltaTime
    {
        public float TotalSeconds { get; internal set; }
        public float ElapsedSeconds { get; internal set; }
        public bool IsRunningSlowly { get; internal set; }
    }

    public class G : Game
    {
        internal const bool LETTERBOX = false;
        internal const float ASPECT_RATIO_SD = 800f / 600f;
        internal const float ASPECT_RATIO_HD = 1920f / 1080f;

        internal static ResourceContentManager _embedded = null;
        internal static GraphicsDeviceManager _graphicsDeviceManager = null;
        internal static bool _lateInitialized = false;

        public new static ContentManager Content { get; private set; }
        public static InputManager Input { get; private set; }
        public static AudioManager Audio { get; private set; }
        public static World World { get; private set; }
        public static UI UI { get; private set; }

        public new static GraphicsDevice GraphicsDevice { get; private set; }
        public static SpriteBatch SpriteBatch { get; private set; }
        public static PrimitiveBatch PrimitiveBatch { get; private set; }
        public static CollisionEngine Collision { get; private set; }
        public static Texture2D PixelTexture { get; private set; }
        public static SpriteFont Font { get; private set; }
        public static Random Random { get; private set; }
        public static Rectangle ScreenArea { get; private set; }
        public static Vector2 ScreenCenter { get; private set; }

        public static DeltaEffect DeltaEffect { get; private set; }
        public static SimpleEffect SimpleEffect { get; private set; }

        public G(int screenWidth, int screenHeight)
            : base()
        {
            Content = base.Content;
            Content.RootDirectory = "Content";
            _graphicsDeviceManager = new GraphicsDeviceManager(this);
            _graphicsDeviceManager.PreferredBackBufferWidth = screenWidth;
            _graphicsDeviceManager.PreferredBackBufferHeight = screenHeight;
            _graphicsDeviceManager.DeviceReset += OnDeviceReset;
            _graphicsDeviceManager.PreparingDeviceSettings += OnPreparingDeviceSettings;
            _embedded = new ResourceContentManager(Services, EmbeddedContent.ResourceManager);
#if DEBUG
            IsMouseVisible = true;
            Window.AllowUserResizing = true;
#endif
            World = new World();
            UI = new UI();
            Random = new Random();
            Input = new InputManager();
            Audio = new AudioManager(@"Content\Audio\audio.xgs", @"Content\Audio\Sound Bank.xsb", @"Content\Audio\Wave Bank.xwb", @"Content\Audio\StreamingBank.xwb");
            Collision = new CollisionEngine();
        }

        protected override void LoadContent()
        {
            base.LoadContent();
            GraphicsDevice = _graphicsDeviceManager.GraphicsDevice;
            SpriteBatch = new SpriteBatch(GraphicsDevice);
            PrimitiveBatch = new PrimitiveBatch(GraphicsDevice);
            PixelTexture = new Texture2D(GraphicsDevice, 1, 1);
            PixelTexture.SetData<Color>(new Color[] { Color.White });
            Font = _embedded.Load<SpriteFont>("TinyFont");
            DeltaEffect = new DeltaEffect(_embedded.Load<Effect>("DeltaEffect"));
            SimpleEffect = new SimpleEffect(_embedded.Load<Effect>("SimpleEffect"));
            ScreenArea = GraphicsDevice.Viewport.Bounds;
            ScreenCenter = ScreenArea.Center.ToVector2();

            World.LoadContent();
            UI.LoadContent();

            GC.Collect();
            ResetElapsedTime();
{'fraction_non_alphanumeric': 0.0790064902646031, 'fraction_numerical': 0.004992511233150275, 'mean_word_length': 2.7391507232851144, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 11, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2432381', 'n_tokens_mistral': 2006, 'n_tokens_neox': 1919, 'n_words': 584}