Exemplo n.º 1
0
        public static F3DZEXTextureWrapper GetTextureWrapper(Texture texture, F3DZEX_G_SetTile command, F3DZEX_G_Texture textureCommand)
        {
            if (_textureWrappers.ContainsKey(texture))
                return _textureWrappers[texture];

            F3DZEXTextureWrapper wrapper = new F3DZEXTextureWrapper(texture, command, textureCommand);
            _textureWrappers.Add(texture, wrapper);

            return wrapper;
        }
Exemplo n.º 2
0
 public F3DZEXTextureWrapper(Texture texture, F3DZEX_G_SetTile command, F3DZEX_G_Texture textureCommand)
 {
     F3DTexture = texture;
     SetTileCommand = command;
     TextureCommand = textureCommand;
 }
Exemplo n.º 3
0
        public void TestF3DZEX_G_Texture()
        {
            //D7001B01 12345678
            byte[] testVal = new byte[] { 0xD7, 0x00, 0x1B, 0x01, 0x12, 0x34, 0x56, 0x78 };

            F3DZEX_G_Texture cmd = new F3DZEX_G_Texture(0, testVal);

            byte[] outVal = cmd.RawData;

            Assert.AreEqual(testVal.Length, outVal.Length);
            Assert.IsTrue(Enumerable.SequenceEqual(testVal, outVal));
            Assert.IsTrue(cmd.IsValid);

            //D7FF1B01 12345678
            testVal = new byte[] { 0xD7, 0xFF, 0x1B, 0x01, 0x12, 0x34, 0x56, 0x78 };

            cmd.RawData = testVal;

            byte[] outVal2 = cmd.RawData;

            Assert.AreEqual(outVal.Length, outVal2.Length);
            Assert.IsTrue(Enumerable.SequenceEqual(outVal, outVal2));
            Assert.IsTrue(cmd.IsValid);
        }