<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>MaYaFei&#039;s StuDio &#187; SFB</title>
	<atom:link href="https://www.mayafei.cn/archives/tag/sfb/feed" rel="self" type="application/rss+xml" />
	<link>https://www.mayafei.cn</link>
	<description>Game ReSource Research &#124; Tools &#38; Mods</description>
	<lastBuildDate>Fri, 07 Feb 2025 02:44:07 +0000</lastBuildDate>
	<language>zh-CN</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=4.2.2</generator>
	<item>
		<title>【轩辕剑MOD】SFB Editor &#8211; SFB音乐资源封包编辑器</title>
		<link>https://www.mayafei.cn/archives/22</link>
		<comments>https://www.mayafei.cn/archives/22#comments</comments>
		<pubDate>Fri, 17 Jun 2011 08:42:05 +0000</pubDate>
		<dc:creator><![CDATA[mayafei]]></dc:creator>
				<category><![CDATA[工具发布]]></category>
		<category><![CDATA[SFB]]></category>
		<category><![CDATA[封包工具]]></category>
		<category><![CDATA[游戏资源]]></category>
		<category><![CDATA[轩辕剑]]></category>

		<guid isPermaLink="false">http://www.mayafei.cn/?p=22</guid>
		<description><![CDATA[【简介】SFB封包是轩五三部曲、仙剑OL、天之痕OL等音乐资源封包的封包格式，若要进行MOD开发，对音乐进行编 <a href='https://www.mayafei.cn/archives/22' class='excerpt-more'>[...]</a>]]></description>
				<content:encoded><![CDATA[<p>【简介】SFB封包是轩五三部曲、仙剑OL、天之痕OL等音乐资源封包的封包格式，若要进行MOD开发，对音乐进行编辑、添加是必不可少的，因此本工具便提供了这项功能</p>
<p>【功能】<br />
·支持SFB文件解包<br />
·支持SFB内部文件替换<br />
·支持SFB内部文件追加（用于MOD制作）<br />
·支持SFB内部文件删除（用于MOD卸载）</p>
<p>【下载】<a href="https://www.mayafei.cn/wp-content/uploads/2011/06/SFB_Editor.zip">点击下载</a></p>
<p>【截图】<br />
<a rel="attachment wp-att-26" href="https://www.mayafei.cn/?attachment_id="><img class="alignnone size-medium wp-image-26" title="Capture" src="https://www.mayafei.cn/wp-content/uploads/2011/06/Capture-297x300.jpg" alt="" width="297" height="300" /></a></p>
<p>【源代码】<strong>读取部分（Delphi v7.0编写）<span id="more-22"></span></strong></p>
<blockquote><p> <span style="color: #6aa84f;"><em>{<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;<br />
SFB Editor(轩辕剑游戏音乐封包文件编辑器)</em></span></p>
<p><span style="color: #6aa84f;"><em>Code By Mayafei<br />
Delphi v7.0</em></span></p>
<p><span style="color: #6aa84f;"><em>程序下载请到: <a href="http://mayafei263.ys168.com/" target="_blank">http://mayafei263.ys168.com/</a> </em>(轩辕剑MOD相关SFB_Editor.rar)</span></p>
<p><span style="color: #6aa84f;"><em>说明:</em></span><span style="color: #6aa84f;"><em><br />
Form1.Result是程式中的ListView<br />
Form1.Memo是程式中的Memo<br />
全局变量Anainfo是传递给本函数是否Memo显示信息的参数,类型是boolean<br />
全局变量FileTypeA是传递给本函数是否分析文件类型,类型是boolean</em></span></p>
<p><span style="color: #6aa84f;"><em>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;<br />
}</em></span></p>
<div><span style="font-size: 12px; font-family: 宋体;"><span style="font-size: 12px;"><span style="font-size: 12px; font-family: 宋体;"><strong><span style="font-size: 12px;">var</span></strong><br />
<span style="font-size: 12px;">SFB_Stream, FTyp_Stream: TFileStream;</span><br />
<span style="font-size: 12px;">offset, i: integer;</span><br />
<span style="font-size: 12px;">fx_temp: integer;</span></span></span></span></div>
<p><span style="font-size: 12px; font-family: 宋体;"><span style="font-size: 12px;"><span style="font-size: 12px; font-family: 宋体;"><strong><span style="font-size: 12px;">begin</span></strong><br />
<span style="font-size: 12px;">Form1.Result.Clear;</span><br />
<span style="font-size: 12px;">if AnaInfo=true then Form1.Memo.Lines.Add(#13#10+&#8217;开始分析SFB文件：&#8217;+Form1.SFBFile.Text);</span><br />
<span style="font-size: 12px;">if FileExists(Form1.SFBFile.Text) then</span><br />
<span style="font-size: 12px;">    begin</span><br />
<span style="font-size: 12px;">      SFB_Stream:=TFileStream.Create(Form1.SFBFile.Text, fmShareDenyNone);</span><br />
<span style="font-size: 12px;">      if FileTypeA=true then FTyp_Stream:=TFileStream.Create(Form1.SFBFile.Text, fmShareDenyNone);</span><br />
<span style="font-size: 12px;">      SFB_Stream.Position:=0;</span><br />
<span style="font-size: 12px;">      SFB_Stream.Read(File_Def[1],4);</span><br />
<span style="font-size: 12px;">                if AnaInfo=true then Form1.Memo.Lines.Add(&#8216;获取SFB内部文件大小定义(1)：&#8217;+inttostr(File_Def[1]));</span><br />
<span style="font-size: 12px;">      SFB_Stream.Seek(File_Def[1], soFromBeginning);</span><br />
<span style="font-size: 12px;">      SFB_Stream.Read(File_Def[2],4);</span><br />
<span style="font-size: 12px;">                if AnaInfo=true then Form1.Memo.Lines.Add(&#8216;获取SFB内部文件当前数量：&#8217;+inttostr(File_Def[2]));</span><br />
<span style="font-size: 12px;">      SFB_Stream.Read(File_Def[3],4);</span><br />
<span style="font-size: 12px;">                if AnaInfo=true then Form1.Memo.Lines.Add(&#8216;获取SFB内部文件大小定义(2)：&#8217;+inttostr(File_Def[3]));</span><br />
<span style="font-size: 12px;">      SFB_Stream.Seek(File_Def[3], soFromBeginning);</span><br />
<span style="font-size: 12px;">     </span><em><span style="font-size: 12px; color: #38761d;">//SFB整个文件定义读取完毕，获取内部每个文件定义开始</span></em><br />
<span style="font-size: 12px;">                if AnaInfo=true then Form1.Memo.Lines.Add(&#8216;正在获取每个文件信息&#8230;&#8217;);</span><br />
<span style="font-size: 12px;">        for i:=1 to File_Def[2] do</span><br />
<span style="font-size: 12px;">             begin</span><br />
<span style="font-size: 12px;">             SFB_Stream.Read(offset,4);</span><br />
<span style="font-size: 12px;">             with Form1.Result.items.add do</span><br />
<span style="font-size: 12px;">              begin</span><br />
<span style="font-size: 12px;">                  caption:=inttostr((i-1));</span><br />
<span style="font-size: 12px;">                  offset:=offset+4;</span><em><span style="font-size: 12px; color: #38761d;">//ListView中显示真实的文件起始偏移量</span></em><br />
<span style="font-size: 12px;">                  subitems.add(inttostr(offset));</span><br />
<span style="font-size: 12px;">                  if FileTypeA=true then</span><br />
<span style="font-size: 12px;">                  begin</span><br />
<span style="font-size: 12px;">                     FTyp_Stream.Seek(offset, soFromBeginning);</span><br />
<span style="font-size: 12px;">                     FTyp_Stream.Read(fx_temp,1);</span><br />
<span style="font-size: 12px;">                    </span><span style="color: #38761d;"><em><span style="font-size: 12px; color: #38761d;">//subitems.add(inttostr(fx_temp));</span><br />
</em></span><span style="font-size: 12px;">                     if fx_temp=82 then subitems.add(&#8216;WAV&#8217;)</span><br />
<span style="font-size: 12px;">                     else if fx_temp=73 then subitems.add(&#8216;MP3&#8242;)</span><br />
<span style="font-size: 12px;">                     else if fx_temp&gt;253 then subitems.add(&#8216;MP3&#8242;)</span><br />
<span style="font-size: 12px;">                     else subitems.add(&#8216;未知&#8217;);</span><br />
<span style="font-size: 12px;">                  end</span><br />
<span style="font-size: 12px;">                  else</span><br />
<span style="font-size: 12px;">                     subitems.add(&#8216;N/A&#8217;);</span><br />
<span style="font-size: 12px;">              end;</span><br />
<span style="font-size: 12px;">             end;</span><br />
<span style="font-size: 12px;">      if AnaInfo=true then Form1.Memo.Lines.Add(&#8216;SFB文件分析完成!&#8217;);</span><br />
<span style="font-size: 12px;">      FreeAndNil(FTyp_Stream);</span><br />
<span style="font-size: 12px;">      FreeAndNil(SFB_Stream);</span><br />
<span style="font-size: 12px;">      Form1.TakeupA.Enabled:=True;</span><br />
<span style="font-size: 12px;">      Form1.DeleteF.Enabled:=True;</span><br />
<span style="font-size: 12px;"><span style="font-size: 12px; font-family: 宋体;">    end</span><br />
<span style="font-size: 12px;">    else</span><br />
<span style="font-size: 12px;">Form1.Memo.Lines.Add(&#8216;错误：文件不存在！！！&#8217;);</span><br />
<strong><span style="font-size: 12px;">end;</span></strong></span></span></span><span style="font-size: 12px;"> <br />
</span></p>
<p></span></span>
</p></blockquote>
]]></content:encoded>
			<wfw:commentRss>https://www.mayafei.cn/archives/22/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
