コード例 #1
0
 public static SCFOMBIN.SCFOMBIN LoadBattleTextFile(IContainer gameDataPath, string filename, GameLocale locale, GameVersion version, EndianUtils.Endianness endian, TextUtils.GameTextEncoding encoding, BitUtils.Bitness bits)
 {
     if (!version.Is360())
     {
         uint ptrDiff = 0x1888;
         if (filename.StartsWith("BTL_XTM"))
         {
             ptrDiff = 0x1B4C;
         }
         var bin = new SCFOMBIN.SCFOMBIN(GenerateWebsite.TryGetBattleScenarioFile(gameDataPath, filename, locale, version), endian, encoding, ptrDiff);
         return(bin);
     }
     else
     {
         var bin = new ScenarioFile.ScenarioFile(GenerateWebsite.TryGetBattleScenarioFile(gameDataPath, filename, locale, version), encoding, endian, bits);
         var btl = new SCFOMBIN.SCFOMBIN();
         btl.EntryList = bin.EntryList;
         return(btl);
     }
 }
コード例 #2
0
        public void LoadBattleTextTSS( string dir )
        {
            BattleTextFiles = new Dictionary<string, SCFOMBIN.SCFOMBIN>();

            var files = new System.IO.DirectoryInfo( dir ).GetFiles();
            foreach ( var file in files ) {
                if ( file.Name.StartsWith( "BTL_" ) ) {
                    var bin = new ScenarioFile.ScenarioFile( Path.Combine( dir, file.Name ), true );
                    var name = file.Name.Split( '.' )[0];

                    var btl = new SCFOMBIN.SCFOMBIN();
                    btl.EntryList = bin.EntryList;
                    BattleTextFiles.Add( name, btl );
                }
            }
        }
コード例 #3
0
        public void LoadBattleTextScfombin( string dir, string modDir = null )
        {
            BattleTextFiles = new Dictionary<string, SCFOMBIN.SCFOMBIN>();

            var files = new System.IO.DirectoryInfo( dir ).GetFiles();
            foreach ( var file in files ) {
                if ( file.Name.StartsWith( "BTL_" ) ) {
                    uint ptrDiff = 0x1888;
                    if ( file.Name.StartsWith( "BTL_XTM" ) ) { ptrDiff = 0x1B4C; }

                    var bin = new SCFOMBIN.SCFOMBIN( Path.Combine( dir, file.Name ), ptrDiff );
                    var name = file.Name.Split( '.' )[0];

                    if ( modDir != null ) {
                        var modBin = new SCFOMBIN.SCFOMBIN( Path.Combine( modDir, file.Name ), ptrDiff );
                        for ( int i = 0; i < bin.EntryList.Count; ++i ) {
                            bin.EntryList[i].EnName = modBin.EntryList[i].JpName;
                            bin.EntryList[i].EnText = modBin.EntryList[i].JpText;
                        }
                    }

                    BattleTextFiles.Add( name, bin );
                }
            }
        }