Exemple #1
0
        // Token: 0x06001FB5 RID: 8117 RVA: 0x0013D040 File Offset: 0x0013B240
        public static AppMain.NNS_TEXFILE Read(BinaryReader reader, long data0Pos)
        {
            AppMain.NNS_TEXFILE nns_TEXFILE = new AppMain.NNS_TEXFILE();
            nns_TEXFILE.fType = reader.ReadUInt32();
            uint num = reader.ReadUInt32();

            nns_TEXFILE.MinFilter   = reader.ReadUInt16();
            nns_TEXFILE.MagFilter   = reader.ReadUInt16();
            nns_TEXFILE.GlobalIndex = reader.ReadUInt32();
            nns_TEXFILE.Bank        = reader.ReadUInt32();
            if (num != 0U)
            {
                long position = reader.BaseStream.Position;
                reader.BaseStream.Seek(data0Pos + ( long )(( ulong )num), 0);
                StringBuilder stringBuilder = new StringBuilder();
                byte          b;
                while ((b = reader.ReadByte()) != 0)
                {
                    stringBuilder.Append(( char )b);
                }
                nns_TEXFILE.Filename = stringBuilder.ToString().ToUpper();
                reader.BaseStream.Seek(position, 0);
            }
            return(nns_TEXFILE);
        }
Exemple #2
0
 public static void _amTextureSetupLoadParam(
     ref AppMain.AMS_PARAM_LOAD_TEXTURE param,
     ref AppMain.NNS_TEXFILE texfile,
     Texture2D texload)
 {
     if (((int)texfile.fType & 512) != 0)
     {
         param.minfilter = (ushort)0;
         param.magfilter = (ushort)0;
     }
     else
     {
         param.minfilter = texfile.MinFilter;
         param.magfilter = texfile.MagFilter;
     }
     param.globalIndex = ((int)texfile.fType & 1024) == 0 ? 0U : texfile.GlobalIndex;
     if (((int)texfile.fType & 2048) != 0)
     {
         param.bank = texfile.Bank;
     }
     else
     {
         param.bank = 0U;
     }
 }
Exemple #3
0
        public static AppMain.NNS_TEXFILE Read(BinaryReader reader, long data0Pos)
        {
            AppMain.NNS_TEXFILE nnsTexfile = new AppMain.NNS_TEXFILE();
            nnsTexfile.fType = reader.ReadUInt32();
            uint num1 = reader.ReadUInt32();

            nnsTexfile.MinFilter   = reader.ReadUInt16();
            nnsTexfile.MagFilter   = reader.ReadUInt16();
            nnsTexfile.GlobalIndex = reader.ReadUInt32();
            nnsTexfile.Bank        = reader.ReadUInt32();
            if (num1 != 0U)
            {
                long position = reader.BaseStream.Position;
                reader.BaseStream.Seek(data0Pos + (long)num1, SeekOrigin.Begin);
                StringBuilder stringBuilder = new StringBuilder();
                byte          num2;
                while ((num2 = reader.ReadByte()) != (byte)0)
                {
                    stringBuilder.Append((char)num2);
                }
                nnsTexfile.Filename = stringBuilder.ToString().ToUpper();
                reader.BaseStream.Seek(position, SeekOrigin.Begin);
            }
            return(nnsTexfile);
        }
 // Token: 0x06001861 RID: 6241 RVA: 0x000DB7F4 File Offset: 0x000D99F4
 public static int amTextureLoad(AppMain.NNS_TEXINFO texinfo, AppMain.NNS_TEXFILE texfile, string filepath, Texture2D texbuf, int size)
 {
     AppMain.AMS_PARAM_LOAD_TEXTURE ams_PARAM_LOAD_TEXTURE = new AppMain.AMS_PARAM_LOAD_TEXTURE();
     ams_PARAM_LOAD_TEXTURE.pTexInfo = texinfo;
     ams_PARAM_LOAD_TEXTURE.tex      = texbuf;
     ams_PARAM_LOAD_TEXTURE.size     = (uint)size;
     AppMain._amTextureSetupLoadParam(ref ams_PARAM_LOAD_TEXTURE, ref texfile, texbuf);
     return(AppMain.amDrawRegistCommand(1, ams_PARAM_LOAD_TEXTURE));
 }
Exemple #5
0
 public static int amTextureLoad(
     AppMain.NNS_TEXINFO texinfo,
     AppMain.NNS_TEXFILE texfile,
     string filepath,
     Texture2D texbuf,
     int size)
 {
     AppMain.AMS_PARAM_LOAD_TEXTURE paramLoadTexture = new AppMain.AMS_PARAM_LOAD_TEXTURE();
     paramLoadTexture.pTexInfo = texinfo;
     paramLoadTexture.tex      = texbuf;
     paramLoadTexture.size     = (uint)size;
     AppMain._amTextureSetupLoadParam(ref paramLoadTexture, ref texfile, texbuf);
     return(AppMain.amDrawRegistCommand(1, (object)paramLoadTexture));
 }
 // Token: 0x06001866 RID: 6246 RVA: 0x000DB8C4 File Offset: 0x000D9AC4
 public static void _amTextureSetupLoadParam(ref AppMain.AMS_PARAM_LOAD_TEXTURE param, ref AppMain.NNS_TEXFILE texfile, Texture2D texload)
 {
     if ((texfile.fType & 512U) != 0U)
     {
         param.minfilter = 0;
         param.magfilter = 0;
     }
     else
     {
         param.minfilter = texfile.MinFilter;
         param.magfilter = texfile.MagFilter;
     }
     if ((texfile.fType & 1024U) != 0U)
     {
         param.globalIndex = texfile.GlobalIndex;
     }
     else
     {
         param.globalIndex = 0U;
     }
     if ((texfile.fType & 2048U) != 0U)
     {
         param.bank = texfile.Bank;
         return;
     }
     param.bank = 0U;
 }