Пример #1
0
        public string GetDataAsHtml(GameVersion version, TSS.TSSFile stringDic, Dictionary <uint, TSS.TSSEntry> inGameIdDict)
        {
            StringBuilder sb = new StringBuilder();

            //sb.Append( RefString );
            sb.Append("<tr id=\"strategyoption" + InGameID + "\">");
            sb.Append("<td>");
            sb.Append(StrategySet.GetCategoryName(Category, version, inGameIdDict));
            sb.Append("</td>");

            sb.Append("<td>");
            sb.Append("<span class=\"itemname\">");
            sb.Append(inGameIdDict[NameStringDicID].StringJpnHtml(version));
            sb.Append("</span>");
            sb.Append("<br>");
            sb.Append(inGameIdDict[DescStringDicID].StringJpnHtml(version));
            sb.Append("</td>");

            sb.Append("<td>");
            sb.Append("<span class=\"itemname\">");
            sb.Append(inGameIdDict[NameStringDicID].StringEngHtml(version));
            sb.Append("</span>");
            sb.Append("<br>");
            sb.Append(inGameIdDict[DescStringDicID].StringEngHtml(version));
            sb.Append("</td>");

            sb.Append("<td>");
            Website.GenerateWebsite.AppendCharacterBitfieldAsImageString(sb, version, Characters);
            sb.Append("</td>");

            sb.Append("</tr>");
            return(sb.ToString());
        }
Пример #2
0
        private bool LoadFile(Stream stream, EndianUtils.Endianness endian, BitUtils.Bitness bits)
        {
            string magic = stream.ReadAscii(8);

            if (magic != "T8BTTA  ")
            {
                throw new Exception("Invalid magic.");
            }
            uint strategySetCount    = stream.ReadUInt32().FromEndian(endian);
            uint strategyOptionCount = stream.ReadUInt32().FromEndian(endian);
            uint refStringStart      = stream.ReadUInt32().FromEndian(endian);

            StrategySetList = new List <StrategySet>((int)strategySetCount);
            for (uint i = 0; i < strategySetCount; ++i)
            {
                StrategySet ss = new StrategySet(stream, refStringStart, endian, bits);
                StrategySetList.Add(ss);
            }
            StrategyOptionList = new List <StrategyOption>((int)strategyOptionCount);
            for (uint i = 0; i < strategyOptionCount; ++i)
            {
                StrategyOption so = new StrategyOption(stream, refStringStart, endian, bits);
                StrategyOptionList.Add(so);
            }

            StrategyOptionDict = new Dictionary <uint, StrategyOption>(StrategyOptionList.Count);
            foreach (var option in StrategyOptionList)
            {
                StrategyOptionDict.Add(option.InGameID, option);
            }

            return(true);
        }
Пример #3
0
        private bool LoadFile(Stream stream)
        {
            string magic               = stream.ReadAscii(8);
            uint   strategySetCount    = stream.ReadUInt32().SwapEndian();
            uint   strategyOptionCount = stream.ReadUInt32().SwapEndian();
            uint   refStringStart      = stream.ReadUInt32().SwapEndian();

            StrategySetList = new List <StrategySet>((int)strategySetCount);
            for (uint i = 0; i < strategySetCount; ++i)
            {
                StrategySet ss = new StrategySet(stream, refStringStart);
                StrategySetList.Add(ss);
            }
            StrategyOptionList = new List <StrategyOption>((int)strategyOptionCount);
            for (uint i = 0; i < strategyOptionCount; ++i)
            {
                StrategyOption so = new StrategyOption(stream, refStringStart);
                StrategyOptionList.Add(so);
            }

            StrategyOptionDict = new Dictionary <uint, StrategyOption>(StrategyOptionList.Count);
            foreach (var option in StrategyOptionList)
            {
                StrategyOptionDict.Add(option.InGameID, option);
            }

            return(true);
        }
Пример #4
0
        private bool LoadFile( Stream stream )
        {
            string magic = stream.ReadAscii( 8 );
            uint strategySetCount = stream.ReadUInt32().SwapEndian();
            uint strategyOptionCount = stream.ReadUInt32().SwapEndian();
            uint refStringStart = stream.ReadUInt32().SwapEndian();

            StrategySetList = new List<StrategySet>( (int)strategySetCount );
            for ( uint i = 0; i < strategySetCount; ++i ) {
                StrategySet ss = new StrategySet( stream, refStringStart );
                StrategySetList.Add( ss );
            }
            StrategyOptionList = new List<StrategyOption>( (int)strategyOptionCount );
            for ( uint i = 0; i < strategyOptionCount; ++i ) {
                StrategyOption so = new StrategyOption( stream, refStringStart );
                StrategyOptionList.Add( so );
            }

            StrategyOptionDict = new Dictionary<uint, StrategyOption>( StrategyOptionList.Count );
            foreach ( var option in StrategyOptionList ) {
                StrategyOptionDict.Add( option.InGameID, option );
            }

            return true;
        }
Пример #5
0
        public string GetDataAsHtml(GameVersion version, string versionPostfix, GameLocale locale, WebsiteLanguage websiteLanguage, TSS.TSSFile stringDic, Dictionary <uint, TSS.TSSEntry> inGameIdDict)
        {
            StringBuilder sb = new StringBuilder();

            //sb.Append( RefString );
            sb.Append("<tr id=\"strategyoption" + InGameID + "\">");
            sb.Append("<td>");
            sb.Append(StrategySet.GetCategoryName(Category, version, websiteLanguage, inGameIdDict));
            sb.Append("</td>");

            int colspan = websiteLanguage.WantsBoth() ? 1 : 2;

            if (websiteLanguage.WantsJp())
            {
                sb.Append("<td colspan=\"" + colspan + "\">");
                sb.Append("<span class=\"itemname\">");
                sb.Append(inGameIdDict[NameStringDicID].StringJpnHtml(version, inGameIdDict));
                sb.Append("</span>");
                sb.Append("<br>");
                sb.Append(inGameIdDict[DescStringDicID].StringJpnHtml(version, inGameIdDict));
                sb.Append("</td>");
            }

            if (websiteLanguage.WantsEn())
            {
                sb.Append("<td colspan=\"" + colspan + "\">");
                sb.Append("<span class=\"itemname\">");
                sb.Append(inGameIdDict[NameStringDicID].StringEngHtml(version, inGameIdDict));
                sb.Append("</span>");
                sb.Append("<br>");
                sb.Append(inGameIdDict[DescStringDicID].StringEngHtml(version, inGameIdDict));
                sb.Append("</td>");
            }

            sb.Append("<td>");
            Website.WebsiteGenerator.AppendCharacterBitfieldAsImageString(sb, inGameIdDict, version, Characters, websiteLanguage.MainJp());
            sb.Append("</td>");

            sb.Append("</tr>");
            return(sb.ToString());
        }