Ejemplo n.º 1
0
        public static F3DEXTextureWrapper GetTextureWrapper(Texture texture, F3DEX_G_SetTile command, F3DEX_G_Texture textureCommand)
        {
            if (_textureWrappers.ContainsKey(texture))
                return _textureWrappers[texture];

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

            return wrapper;
        }
Ejemplo n.º 2
0
 public F3DEXTextureWrapper(Texture texture, F3DEX_G_SetTile command, F3DEX_G_Texture textureCommand)
 {
     F3DTexture = texture;
     SetTileCommand = command;
     TextureCommand = textureCommand;
 }
Ejemplo n.º 3
0
        public void TestF3DEX_G_Texture()
        {
            //BB001B01 12345678
            byte[] testVal = new byte[] { 0xBB, 0x00, 0x1B, 0x01, 0x12, 0x34, 0x56, 0x78 };

            F3DEX_G_Texture cmd = new F3DEX_G_Texture(0, testVal);

            byte[] outVal = cmd.RawData;

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

            //BBFF1B01 12345678
            testVal = new byte[] { 0xBB, 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);
        }