Ejemplo n.º 1
0
        public override void Core_Update()
        {
            try
            {
                byte[] data;
                if (Compressed < 0)
                {
                    data    = Core.ReadData(Address, Compressed * -1);
                    Current = new OAM_Array(data, 0);
                }
                else
                {
                    data    = Core.ReadData(Address, 0);
                    Current = new OAM_Array(data, (uint)Compressed);
                }

                Entry_NumBox.Maximum = (Current.Sprites.Count <= 0) ? 0 : Current.Sprites.Count - 1;
                Core_UpdateValues(Entry_NumBox.Value);

                Display = new SpriteSheet(240, 160);
                Display.AddSprite(Colors, Tiles, Current, OffsetX, OffsetY);
                Core_UpdateDisplay(Display);
            }
            catch (Exception ex)
            {
                Program.ShowError("There has been an error while trying to update the OAM Editor.", ex);
            }
        }
Ejemplo n.º 2
0
        public Background(Camera camera)
        {
            m_camera = camera;

            m_backgroundTexture_01  = Texture2D.Load(typeof(Background).Assembly.GetManifestResourceStream("Test.Game_01.Textures.Background_01.png"));
            m_backgroundSheet_01    = new SpriteSheet(m_backgroundTexture_01);
            m_backgroundSprite_01   = m_backgroundSheet_01.AddSprite("", new Box2i(Vector2i.Zero, m_backgroundTexture_01.Size));
            m_backgroundRenderer_01 = new SpriteRenderer(m_backgroundSheet_01);
            m_backgroundInstance_01 = m_backgroundRenderer_01.AddSprite(m_backgroundSprite_01);

            m_backgroundTexture_02         = Texture2D.Load(typeof(Background).Assembly.GetManifestResourceStream("Test.Game_01.Textures.Background_02.png"));
            m_backgroundSheet_02           = new SpriteSheet(m_backgroundTexture_02);
            m_backgroundSprite_02          = m_backgroundSheet_02.AddSprite("", new Box2i(Vector2i.Zero, m_backgroundTexture_02.Size));
            m_backgroundRenderer_02        = new SpriteRenderer(m_backgroundSheet_02);
            m_backgroundInstance_02_First  = m_backgroundRenderer_02.AddSprite(m_backgroundSprite_02);
            m_backgroundInstance_02_Second = m_backgroundRenderer_02.AddSprite(m_backgroundSprite_02);
        }
Ejemplo n.º 3
0
 public ParticleTexture()
 {
     m_texture = Texture2D.Load(typeof(Particle).Assembly.GetManifestResourceStream("Granite.Particle.Textures.fire.png"));
     m_sheet = new SpriteSheet(m_texture);
     m_sprite = m_sheet.AddSprite("", new Box2i(Vector2i.Zero, m_texture.Size));
 }
Ejemplo n.º 4
0
 public GrassTexture()
 {
     m_backgroundTexture = Texture2D.Load(typeof(Floor).Assembly.GetManifestResourceStream("Zombie.Game.Textures.grass.jpg"));
     m_backgroundSheet   = new SpriteSheet(m_backgroundTexture);
     m_backgroundSprite  = m_backgroundSheet.AddSprite("", new Box2i(Vector2i.Zero, m_backgroundTexture.Size));
 }