Esempio n. 1
0
        public static N64Graphics.N64Codec GetTextureFormat(DisplayListCommand cmd)
        {
            cmd.Position = 1;
            byte type = cmd.ReadByte();

            cmd.Position = 0;
            switch (type)
            {
            case 0x10:
            {
                return(N64Graphics.N64Codec.RGBA16);
            }

            case 0x18:
            {
                return(N64Graphics.N64Codec.RGBA32);
            }

            case 0x40:
            {
                return(N64Graphics.N64Codec.CI4);
            }

            case 0x48:
            {
                return(N64Graphics.N64Codec.CI8);
            }

            case 0x60:
            {
                return(N64Graphics.N64Codec.IA4);
            }

            case 0x68:
            {
                return(N64Graphics.N64Codec.IA8);
            }

            case 0x70:
            {
                return(N64Graphics.N64Codec.IA16);
            }

            case 0x80:
            case 0x90:
            {
                return(N64Graphics.N64Codec.I4);
            }

            case 0x88:
            {
                return(N64Graphics.N64Codec.I8);
            }

            default:
            {
                return(default);
            }
            }
Esempio n. 2
0
        public static byte GetNumberOfVertices(DisplayListCommand cmd)
        {
            cmd.Position = 1;
            byte value = cmd.ReadByte();

            cmd.Position = 0;
            return((byte)(value >> 4));
        }
Esempio n. 3
0
        public static byte GetStartIndexInVertexBuffer(DisplayListCommand cmd)
        {
            cmd.Position = 1;
            byte value = cmd.ReadByte();

            cmd.Position = 0;
            return(Conversions.ToByte(value & 0xF));
        }
Esempio n. 4
0
        public static byte GetVertice(DisplayListCommand cmd, byte VerticeNumber)
        {
            cmd.Position = 5 + VerticeNumber - 1;
            byte value = cmd.ReadByte();

            cmd.Position = 0;
            if (value > 0)
            {
                value = (byte)(value / (double)0xA);
            }
            return(value);
        }