示例#1
0
            public bool Equals(PSO2String c)
            {
                var cArr = c.GetBytes();

                // Optimization for a common success case.
                if (Object.ReferenceEquals(this, c))
                {
                    return(true);
                }

                // If run-time types are not exactly the same, return false.
                if (this.GetType() != c.GetType())
                {
                    return(false);
                }

                for (int i = 0; i < 0x20; i++)
                {
                    if (stringArray[i] != cArr[i])
                    {
                        return(false);
                    }
                }

                return(true);
            }
示例#2
0
            public static PSO2String GeneratePSO2String(byte[] bytes)
            {
                var str = new PSO2String();

                str.SetBytes(bytes);

                return(str);
            }
示例#3
0
            public static PSO2String GeneratePSO2String(string newString)
            {
                var str = new PSO2String();

                str.SetString(newString);

                return(str);
            }
            public override SHAD Clone()
            {
                NGSSHAD newShad = new NGSSHAD();

                newShad.unk0             = unk0;
                newShad.pixelShader      = PSO2String.GeneratePSO2String(pixelShader.GetBytes());
                newShad.vertexShader     = PSO2String.GeneratePSO2String(vertexShader.GetBytes());
                newShad.shadDetailOffset = shadDetailOffset;
                newShad.shadExtraOffset  = shadExtraOffset;
                newShad.shadDetail       = shadDetail;
                newShad.shadExtra        = new List <SHADExtraEntry>(shadExtra);

                return(newShad);
            }