<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[blog &amp; 技术 &amp; 教程]]></title><description><![CDATA[这里就是最好的 galgame 游玩教程]]></description><link>https://galgame.dev/category/3</link><generator>RSS for Node</generator><lastBuildDate>Wed, 22 Apr 2026 05:12:55 GMT</lastBuildDate><atom:link href="https://galgame.dev/category/3.rss" rel="self" type="application/rss+xml"/><pubDate>Tue, 14 Oct 2025 15:50:43 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[萌新小白求入门]]></title><description><![CDATA[下个winrar直接点查看
]]></description><link>https://galgame.dev/topic/79025/萌新小白求入门</link><guid isPermaLink="true">https://galgame.dev/topic/79025/萌新小白求入门</guid><dc:creator><![CDATA[适格者]]></dc:creator><pubDate>Tue, 14 Oct 2025 15:50:43 GMT</pubDate></item><item><title><![CDATA[[技术推荐] IPFS(InterPlanetary File System&#x2F;星际文件系统) -- 有趣的去中心化,分布式网络]]></title><description><![CDATA[ipfs mount

将 IPFS 挂载到文件系统(只读)
挂载方法(Linux)
sudo mkdir /ipfs /ipns /mfs
sudo chown $(whoami) /ipfs /ipns /mfs
ipfs daemon &amp;
ipfs mount

[实验性选项,未来可能会更改 ver 0.37.0]
]]></description><link>https://galgame.dev/topic/75897/技术推荐-ipfs-interplanetary-file-system-星际文件系统-有趣的去中心化-分布式网络</link><guid isPermaLink="true">https://galgame.dev/topic/75897/技术推荐-ipfs-interplanetary-file-system-星际文件系统-有趣的去中心化-分布式网络</guid><dc:creator><![CDATA[ErrorEutopia]]></dc:creator><pubDate>Sun, 07 Sep 2025 04:34:24 GMT</pubDate></item><item><title><![CDATA[有没有人测试过过谷歌自研的tenserG系列处理器和三星的猎户座对于krikri之类的软件的兼容性啊]]></title><description><![CDATA[<p dir="auto">测试了不少游戏 骁龙旗下基本都可以稳定运行 但是用天玑和麒麟soc就会出现一些很迷的兼容性问题  有没有老哥手上有标题所述两个系列的处理器 麻烦帮忙试一下 就krikri ones 和winlator之类的</p>
]]></description><link>https://galgame.dev/topic/75774/有没有人测试过过谷歌自研的tenserg系列处理器和三星的猎户座对于krikri之类的软件的兼容性啊</link><guid isPermaLink="true">https://galgame.dev/topic/75774/有没有人测试过过谷歌自研的tenserg系列处理器和三星的猎户座对于krikri之类的软件的兼容性啊</guid><dc:creator><![CDATA[Kanghaoqi]]></dc:creator><pubDate>Fri, 05 Sep 2025 03:54:33 GMT</pubDate></item><item><title><![CDATA[《我与老师的私人课程2》下载下载到最后是一个1.4G的png格式文件，接下来怎么弄求助]]></title><description><![CDATA[<p dir="auto"><img src="/assets/uploads/files/1756958781367-qq_1756958755337.png" alt="QQ_1756958755337.png" class=" img-fluid img-markdown" /></p>
]]></description><link>https://galgame.dev/topic/75751/我与老师的私人课程2-下载下载到最后是一个1.4g的png格式文件-接下来怎么弄求助</link><guid isPermaLink="true">https://galgame.dev/topic/75751/我与老师的私人课程2-下载下载到最后是一个1.4g的png格式文件-接下来怎么弄求助</guid><dc:creator><![CDATA[BaiShui]]></dc:creator><pubDate>Thu, 04 Sep 2025 05:02:41 GMT</pubDate></item><item><title><![CDATA[求助盖世启动总有乱码进不去这么办？]]></title><description><![CDATA[<p dir="auto">我第一次用电脑模拟器玩但解压完后用软件打开会有乱码然后根本打不开有大佬知道为什么吗？</p>
]]></description><link>https://galgame.dev/topic/74065/求助盖世启动总有乱码进不去这么办</link><guid isPermaLink="true">https://galgame.dev/topic/74065/求助盖世启动总有乱码进不去这么办</guid><dc:creator><![CDATA[stay]]></dc:creator><pubDate>Sun, 17 Aug 2025 15:11:38 GMT</pubDate></item><item><title><![CDATA[关于tg群聊]]></title><description><![CDATA[@梦境仙 没事，原来要主动去搞那个人机验证，nmbot那弄一下就行了
]]></description><link>https://galgame.dev/topic/67915/关于tg群聊</link><guid isPermaLink="true">https://galgame.dev/topic/67915/关于tg群聊</guid><dc:creator><![CDATA[虚aaa]]></dc:creator><pubDate>Sun, 06 Jul 2025 04:02:45 GMT</pubDate></item><item><title><![CDATA[求教怎么修改离线网页游戏的数据呀？（Back to Freedom 0.35 Base Game Full Version）]]></title><description><![CDATA[<p dir="auto">求教怎么修改离线网页游戏的数据呀？（Back to Freedom 0.35 Base Game Full Version）<br />
用了CG也抓不到，很多达成条件都找不到</p>
]]></description><link>https://galgame.dev/topic/66477/求教怎么修改离线网页游戏的数据呀-back-to-freedom-0.35-base-game-full-version</link><guid isPermaLink="true">https://galgame.dev/topic/66477/求教怎么修改离线网页游戏的数据呀-back-to-freedom-0.35-base-game-full-version</guid><dc:creator><![CDATA[yahah]]></dc:creator><pubDate>Sat, 28 Jun 2025 03:47:24 GMT</pubDate></item><item><title><![CDATA[新人 怎么更新MTool]]></title><description><![CDATA[第一种，打开这个软件，会在页面的左上角提示更新
第二种，直接从官网下载最新的版本
]]></description><link>https://galgame.dev/topic/62427/新人-怎么更新mtool</link><guid isPermaLink="true">https://galgame.dev/topic/62427/新人-怎么更新mtool</guid><dc:creator><![CDATA[superLWCH]]></dc:creator><pubDate>Sat, 07 Jun 2025 05:36:14 GMT</pubDate></item><item><title><![CDATA[后缀是mdf和mds的文件咋处理？]]></title><description><![CDATA[需要安装对应的免CD补丁
]]></description><link>https://galgame.dev/topic/61154/后缀是mdf和mds的文件咋处理</link><guid isPermaLink="true">https://galgame.dev/topic/61154/后缀是mdf和mds的文件咋处理</guid><dc:creator><![CDATA[xxmoz]]></dc:creator><pubDate>Sat, 31 May 2025 12:32:53 GMT</pubDate></item><item><title><![CDATA[真剣で私に恋しなさい！漢化版閃退問題]]></title><description><![CDATA[<p dir="auto">真剣で私に恋しなさい！這個遊戲不知道是不是很久以前的關係，我下載不同論壇資源，都是同一個問題，路徑已經改全英文，一開漢化版(沒有用le的情況下)玩了一下就閃退了，出現一本記事本寫著有衝突之類的。另外，漢化版我用le都是開不了的，我問chatgpt應該是漢化補丁有問題，試過直接開原版，沒問題。問題就是說在上網看到其他人玩得到呀，不知道漢化補丁是出了什麼問題。!!<img src="/assets/uploads/files/1743782957231-7cae5882-b567-47af-8009-4488fe3bd532-image.png" alt="7cae5882-b567-47af-8009-4488fe3bd532-image.png" class=" img-fluid img-markdown" /> <img src="/assets/uploads/files/1743783264054-0e795536-1758-4247-a3aa-90f3181aa183-image.png" alt="0e795536-1758-4247-a3aa-90f3181aa183-image.png" class=" img-fluid img-markdown" /></p>
]]></description><link>https://galgame.dev/topic/48160/真剣で私に恋しなさい-漢化版閃退問題</link><guid isPermaLink="true">https://galgame.dev/topic/48160/真剣で私に恋しなさい-漢化版閃退問題</guid><dc:creator><![CDATA[starrystar]]></dc:creator><pubDate>Fri, 04 Apr 2025 16:34:53 GMT</pubDate></item><item><title><![CDATA[移动galgame终极解决方案：gpd win max2]]></title><description><![CDATA[<p dir="auto">本来想买了mac总能好好的在星巴克推gal了吧？<br />
但是没想到还是要下krkr模拟器，这下总归没问题了吧</p>
]]></description><link>https://galgame.dev/topic/43315/移动galgame终极解决方案-gpd-win-max2</link><guid isPermaLink="true">https://galgame.dev/topic/43315/移动galgame终极解决方案-gpd-win-max2</guid><dc:creator><![CDATA[saikete]]></dc:creator><pubDate>Wed, 12 Mar 2025 17:02:11 GMT</pubDate></item><item><title><![CDATA[求帮助]]></title><description><![CDATA[<p dir="auto">有没有大佬知道我这个情况的是不是用错模拟器还是什么的<br />
<img src="/assets/uploads/files/1734664861769-screenshot_20241219_230545_org.tvp.kirikiri2_free_10309.jpg" alt="Screenshot_20241219_230545_org.tvp.kirikiri2_free_10309.jpg" class=" img-fluid img-markdown" /></p>
]]></description><link>https://galgame.dev/topic/24505/求帮助</link><guid isPermaLink="true">https://galgame.dev/topic/24505/求帮助</guid><dc:creator><![CDATA[寒庄]]></dc:creator><pubDate>Fri, 20 Dec 2024 03:28:41 GMT</pubDate></item><item><title><![CDATA[有没有使用calibre看漫画的，为什么我的mobi格式的漫画两页之间有很大面积的空白？这个该怎么解决？]]></title><description><![CDATA[<p dir="auto"><img src="/assets/uploads/files/1733411023035-793c06d8-16b9-463b-9fe9-4ce40cdf09b1-%E5%B1%8F%E5%B9%95%E6%88%AA%E5%9B%BE-2024-12-05-230138.png" alt="793c06d8-16b9-463b-9fe9-4ce40cdf09b1-屏幕截图 2024-12-05 230138.png" class=" img-fluid img-markdown" /> <img src="/assets/uploads/files/1733411035988-fc5b1ff7-2eeb-4c9d-af85-06a1484a6af6-%E5%B1%8F%E5%B9%95%E6%88%AA%E5%9B%BE-2024-12-05-230141.png" alt="fc5b1ff7-2eeb-4c9d-af85-06a1484a6af6-屏幕截图 2024-12-05 230141.png" class=" img-fluid img-markdown" /> <img src="/assets/uploads/files/1733411048433-6d8f02f2-c46d-4588-9976-05b7cde4c8bd-%E5%B1%8F%E5%B9%95%E6%88%AA%E5%9B%BE-2024-12-05-230144.png" alt="6d8f02f2-c46d-4588-9976-05b7cde4c8bd-屏幕截图 2024-12-05 230144.png" class=" img-fluid img-markdown" /></p>
]]></description><link>https://galgame.dev/topic/21759/有没有使用calibre看漫画的-为什么我的mobi格式的漫画两页之间有很大面积的空白-这个该怎么解决</link><guid isPermaLink="true">https://galgame.dev/topic/21759/有没有使用calibre看漫画的-为什么我的mobi格式的漫画两页之间有很大面积的空白-这个该怎么解决</guid><dc:creator><![CDATA[2767175379zwt]]></dc:creator><pubDate>Thu, 05 Dec 2024 15:04:34 GMT</pubDate></item><item><title><![CDATA[如何正确找到解包游戏的工具]]></title><description><![CDATA[怎么说呢，对于有一定程序基础的人来说还是不错的指南。
但是我觉得对于90%的当代网友，你让他学会正确解压分卷压缩包都困难，更不能指望他能学会解包了。。
]]></description><link>https://galgame.dev/topic/17395/如何正确找到解包游戏的工具</link><guid isPermaLink="true">https://galgame.dev/topic/17395/如何正确找到解包游戏的工具</guid><dc:creator><![CDATA[Yukie]]></dc:creator><pubDate>Sat, 16 Nov 2024 02:04:45 GMT</pubDate></item><item><title><![CDATA[win模拟器，点击运行游戏无反馈]]></title><description><![CDATA[<pre><code>    我非常幸运的，能够实现教程以上全部的操作。但是在完成操作，当我想要运行游戏时，也遇到了一些问题。
   我的配置与教程是一样的。当我点击游戏时，无法进入并且没有任何反馈这是要如何解决呢？
</code></pre>
]]></description><link>https://galgame.dev/topic/8464/win模拟器-点击运行游戏无反馈</link><guid isPermaLink="true">https://galgame.dev/topic/8464/win模拟器-点击运行游戏无反馈</guid><dc:creator><![CDATA[相见时难别亦难]]></dc:creator><pubDate>Sun, 29 Sep 2024 15:18:29 GMT</pubDate></item><item><title><![CDATA[关于winlator模拟器声音卡顿的解决办法：]]></title><description><![CDATA[<p dir="auto">容器编辑&gt;DX组件&gt;声音&gt;改成Native(windows)<br />
（难道是长者的保佑吗？ <img src="https://galgame.dev/assets/plugins/nodebb-plugin-emoji/emoji/android/1f60e.png?v=0656e34cabf" class="not-responsive emoji emoji-android emoji--sunglasses" style="height:23px;width:auto;vertical-align:middle" title=":sunglasses:" alt="😎" /> ）<br />
本人设备红米k50，处理器是天玑8100</p>
]]></description><link>https://galgame.dev/topic/4181/关于winlator模拟器声音卡顿的解决办法</link><guid isPermaLink="true">https://galgame.dev/topic/4181/关于winlator模拟器声音卡顿的解决办法</guid><dc:creator><![CDATA[xiao_li]]></dc:creator><pubDate>Wed, 10 Jul 2024 11:42:20 GMT</pubDate></item><item><title><![CDATA[[机翻]Onscripter脚本文档目录]]></title><description><![CDATA[顶一下
]]></description><link>https://galgame.dev/topic/3157/机翻-onscripter脚本文档目录</link><guid isPermaLink="true">https://galgame.dev/topic/3157/机翻-onscripter脚本文档目录</guid><dc:creator><![CDATA[shinnku]]></dc:creator><pubDate>Wed, 05 Jun 2024 10:19:40 GMT</pubDate></item><item><title><![CDATA[关于iso&#x2F;mds&#x2F;mdf镜像文件的使用教程]]></title><description><![CDATA[提问，iso的游戏怎么打中文补丁
]]></description><link>https://galgame.dev/topic/2971/关于iso-mds-mdf镜像文件的使用教程</link><guid isPermaLink="true">https://galgame.dev/topic/2971/关于iso-mds-mdf镜像文件的使用教程</guid><dc:creator><![CDATA[抹茶味花生豆]]></dc:creator><pubDate>Fri, 31 May 2024 11:34:07 GMT</pubDate></item><item><title><![CDATA[提问区]]></title><description><![CDATA[求求大佬帮帮忙˃ʍ˂ 命运石之门pc文件按顺序玩该先下载哪一个娅？好多不同内存版本的我都不知道该先后下载和玩哪一个呜呜呜X﹏X
]]></description><link>https://galgame.dev/topic/2188/提问区</link><guid isPermaLink="true">https://galgame.dev/topic/2188/提问区</guid><dc:creator><![CDATA[sayaNoUta7724]]></dc:creator><pubDate>Sat, 04 May 2024 08:04:09 GMT</pubDate></item><item><title><![CDATA[krkr引擎pbd解密为json的小工具]]></title><description><![CDATA[<p dir="auto">项目地址：<a href="https://github.com/TUdHQQ/pbd2json/releases/tag/v1.0.0-mod" target="_blank" rel="noopener noreferrer nofollow ugc">https://github.com/TUdHQQ/pbd2json/releases/tag/v1.0.0-mod</a></p>
<p dir="auto">源代码：自己去GitHub看</p>
<p dir="auto">熬太晚了！我现在要睡觉了！</p>
]]></description><link>https://galgame.dev/topic/1574/krkr引擎pbd解密为json的小工具</link><guid isPermaLink="true">https://galgame.dev/topic/1574/krkr引擎pbd解密为json的小工具</guid><dc:creator><![CDATA[listder]]></dc:creator><pubDate>Fri, 12 Apr 2024 21:47:45 GMT</pubDate></item><item><title><![CDATA[诈个尸：favorite立绘合成工具]]></title><description><![CDATA[<p dir="auto"><a href="https://github.com/bGlzdGRlcg/unfavbs" target="_blank" rel="noopener noreferrer nofollow ugc">https://github.com/bGlzdGRlcg/unfavbs</a></p>
<p dir="auto">首先我们需要知道favorite的立绘通常在一个叫做<code>graph_bs.bin</code>的文件下，用<code>grabro</code>打开可以看到如下内容：</p>
<p dir="auto"><img src="/assets/uploads/files/1712798956216-1.png" alt="1.png" class=" img-fluid img-markdown" /></p>
<p dir="auto"><img src="/assets/uploads/files/1712798965002-2.png" alt="2.png" class=" img-fluid img-markdown" /></p>
<p dir="auto">很明显，主体部分和面部表情是分开的，这种情况我们称之为差分</p>
<p dir="auto">而<code>garbro</code>并不会自动处理差分内容，所以如果要提取人物立绘就得我们自己手动合成</p>
<p dir="auto">那么如何实现呢，我们先使用<code>010editor</code>打开这个文件看看结构</p>
<p dir="auto"><img src="/assets/uploads/files/1712798988723-3.png" alt="3.png" class=" img-fluid img-markdown" /></p>
<p dir="auto">看起来。。。好像什么都看不出来</p>
<p dir="auto">不用着急，我们先看看最简单的<code>bgm.bin</code>来认识一下<code>*.bin</code>的文件结构</p>
<p dir="auto">先用使用<code>garbro</code>打开，可以看到，这个<code>bgm.bin</code>文件下共有60个文件</p>
<p dir="auto"><img src="/assets/uploads/files/1712798999215-4.png" alt="4.png" class=" img-fluid img-markdown" /></p>
<p dir="auto">使用<code>010editor</code>打开我们可以发现地址0h-4h刚好也等于60</p>
<p dir="auto"><img src="/assets/uploads/files/1712799009258-5.png" alt="5.png" class=" img-fluid img-markdown" /></p>
<p dir="auto">接着是一个值大小为240，这个值我们先不用理他</p>
<p dir="auto"><img src="/assets/uploads/files/1712799017673-6.png" alt="6.png" class=" img-fluid img-markdown" /></p>
<p dir="auto">现在我们先使用<code>garbro</code>随便提取一个文件，与原<code>bgm.bin</code>文件进行比较</p>
<p dir="auto"><img src="/assets/uploads/files/1712799026489-7.png" alt="7.png" class=" img-fluid img-markdown" /></p>
<p dir="auto">你会发现，好家伙原来这文件数据就在<code>.bin</code>文件里面，他甚至不愿意异或一下</p>
<p dir="auto">起始地址为968，共2723547个字节</p>
<p dir="auto">接着我们返回原<code>bgm.bin</code>一看，哎这不是968和2723547吗·</p>
<p dir="auto"><img src="/assets/uploads/files/1712799045132-8.png" alt="8.png" class=" img-fluid img-markdown" /> <img src="/assets/uploads/files/1712799045137-9.png" alt="9.png" class=" img-fluid img-markdown" /></p>
<p dir="auto">于是我们对前面这一部分就有了一点点了解，但是这里每个文件的第一个数据每次加4，这个4是拿来干什么的的呢？不着急，我们慢慢看。</p>
<p dir="auto"><img src="/assets/uploads/files/1712799061623-10.png" alt="10.png" class=" img-fluid img-markdown" /></p>
<p dir="auto">接着，当我们读完这些数据后，会发现之后这个东西</p>
<p dir="auto"><img src="/assets/uploads/files/1712799070516-11.png" alt="11.png" class=" img-fluid img-markdown" /></p>
<p dir="auto">wow，这不是文件名吗，还有原来之前的240是指的文件名的长度，那不难猜出前面的4指的就是文件名的大小的，也就是第一块是文件的文件名在文件名块（index）里面的地址</p>
<p dir="auto"><img src="/assets/uploads/files/1712799080914-12.png" alt="12.png" class=" img-fluid img-markdown" /></p>
<p dir="auto">接着打开<code>graph_bs.bin</code>验证我们的猜想</p>
<p dir="auto"><img src="/assets/uploads/files/1712799090949-13.png" alt="13.png" class=" img-fluid img-markdown" /></p>
<p dir="auto">完全符合，虽然第一个不是0但也对应了第一个文件的文件名所在的地址</p>
<p dir="auto"><img src="/assets/uploads/files/1712799100946-14.png" alt="14.png" class=" img-fluid img-markdown" /></p>
<p dir="auto">我们甚至可以知道文件名是以00分割的</p>
<p dir="auto">这下我们不难写出提取文件的程序了，但问题来了，我们提取出来的是一个<code>.hzc</code>文件啊，相当于<code>garbro</code>提取时的保留原样</p>
<p dir="auto"><img src="/assets/uploads/files/1712799111954-15.png" alt="15.png" class=" img-fluid img-markdown" /></p>
<p dir="auto"><code>ffmpeg</code>都无法正确识别这个格式</p>
<p dir="auto"><img src="/assets/uploads/files/1712799121698-16.png" alt="16.png" class=" img-fluid img-markdown" /></p>
<p dir="auto">但<code>garbro</code>居然可以正确识别，<s>这个时候我们就应该去翻看<code>garbro</code>的源码了</s></p>
<pre><code class="language-C#">//! \file       ArcHZC.cs
//! \date       Wed Dec 09 17:04:23 2015
//! \brief      Favorite View Point multi-frame image format.
//
// Copyright (C) 2015 by morkt
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to
// deal in the Software without restriction, including without limitation the
// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
// sell copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
// IN THE SOFTWARE.
//

using System;
using System.Collections.Generic;
using System.ComponentModel.Composition;
using System.IO;
using GameRes.Utility;
using GameRes.Compression;

namespace GameRes.Formats.FVP
{
    internal class HzcArchive : ArcFile
    {
        public readonly HzcMetaData ImageInfo;

        public HzcArchive (ArcView arc, ArchiveFormat impl, ICollection&lt;Entry&gt; dir, HzcMetaData info)
            : base (arc, impl, dir)
        {
            ImageInfo = info;
        }
    }

    [Export(typeof(ArchiveFormat))]
    public class HzcOpener : ArchiveFormat
    {
        public override string         Tag { get { return "HZC/MULTI"; } }
        public override string Description { get { return "Favorite View Point multi-frame image"; } }
        public override uint     Signature { get { return 0x31637A68; } } // 'HZC1'
        public override bool  IsHierarchic { get { return false; } }
        public override bool      CanWrite { get { return false; } }

        public HzcOpener ()
        {
            Extensions = new string[] { "hzc" };
        }

        static readonly Lazy&lt;ImageFormat&gt; Hzc = new Lazy&lt;ImageFormat&gt; (() =&gt; ImageFormat.FindByTag ("HZC"));

        public override ArcFile TryOpen (ArcView file)
        {
            uint header_size = file.View.ReadUInt32 (8);
            HzcMetaData image_info;
            using (var header = file.CreateStream (0, 0xC+header_size))
            {
                image_info = Hzc.Value.ReadMetaData (header) as HzcMetaData;
                if (null == image_info)
                    return null;
            }
            int count = file.View.ReadInt32 (0x20);
            if (0 == count)
                count = 1;
            string base_name = Path.GetFileNameWithoutExtension (file.Name);
            int frame_size = image_info.UnpackedSize / count;
            var dir = new List&lt;Entry&gt; (count);
            for (int i = 0; i &lt; count; ++i)
            {
                var entry = new Entry {
                    Name = string.Format ("{0}#{1:D3}", base_name, i),
                    Type = "image",
                    Offset = frame_size * i,
                    Size = (uint)frame_size,
                };
                dir.Add (entry);
            }
            return new HzcArchive (file, this, dir, image_info);
        }

        public override Stream OpenEntry (ArcFile arc, Entry entry)
        {
            var hzc = (HzcArchive)arc;
            using (var input = arc.File.CreateStream (0xC+hzc.ImageInfo.HeaderSize))
            using (var z = new ZLibStream (input, CompressionMode.Decompress))
            {
                uint frame_size = entry.Size;
                var pixels = new byte[frame_size];
                uint offset = 0;
                for (;;)
                {
                    if (pixels.Length != z.Read (pixels, 0, pixels.Length))
                        throw new EndOfStreamException();
                    if (offset &gt;= entry.Offset)
                        break;
                    offset += frame_size;
                }
                return new BinMemoryStream (pixels, entry.Name);
            }
        }

        public override IImageDecoder OpenImage (ArcFile arc, Entry entry)
        {
            var hzc = (HzcArchive)arc;
            var input = arc.File.CreateStream (0xC+hzc.ImageInfo.HeaderSize);
            try
            {
                return new HzcDecoder (input, hzc.ImageInfo, entry);
            }
            catch
            {
                input.Dispose();
                throw;
            }
        }
    }
}
</code></pre>
<p dir="auto">不难看出，等等？ZLibStream？</p>
<p dir="auto"><img src="/assets/uploads/files/1712799140598-17.png" alt="17.png" class=" img-fluid img-markdown" /></p>
<p dir="auto">这下看懂了，原来图像数据是使用<code>zlib</code>进行压缩了</p>
<p dir="auto"><img src="/assets/uploads/files/1712799151202-18.png" alt="18.png" class=" img-fluid img-markdown" /></p>
<p dir="auto">有关mode：</p>
<p dir="auto">0代表背景为<code>rgb</code>，1代表立绘基底为<code>rgba</code>，2代表差分（多个文件）也为<code>rgba</code></p>
<p dir="auto">接着那串0000之后就是<code>zlib</code>压缩的数据了，解压之后就可以得到<code>rgba/rgb</code></p>
<p dir="auto"><img src="/assets/uploads/files/1712799162136-19.png" alt="19.png" class=" img-fluid img-markdown" /></p>
<p dir="auto">然后利用<code>opencv</code>直接合成就好</p>
<p dir="auto">实现代码如下（<s>写的好屎，勿喷</s>）：</p>
<p dir="auto">GitHub： <a href="https://github.com/bGlzdGRlcg/unfavbs" target="_blank" rel="noopener noreferrer nofollow ugc">https://github.com/bGlzdGRlcg/unfavbs</a></p>
<p dir="auto"><code>unfavbs.h</code></p>
<pre><code class="language-c++">#include &lt;bits/stdc++.h&gt;
#include &lt;iostream&gt;
#include &lt;fstream&gt;
#include &lt;vector&gt;
#include &lt;opencv2/opencv.hpp&gt;
#include &lt;sstream&gt;
#include &lt;zlib.h&gt;
#include &lt;windows.h&gt;
#include &lt;locale&gt;
#include &lt;codecvt&gt;
#include &lt;map&gt;
#include &lt;io.h&gt;

using namespace std;
using namespace cv;

unsigned int readbinhelf(ifstream &amp;binfile){
	unsigned short int val;
	binfile.read((char *) &amp;val, 2);
	return val;
}

unsigned int readbin(ifstream &amp;binfile){
	unsigned int val;
	binfile.read((char *) &amp;val, 4);
	return val;
}

unsigned int readpng(istringstream &amp;pngfile){
	unsigned int val;
	pngfile.read((char *) &amp;val, 4);
	return val;
}

unsigned int readpnghelf(istringstream &amp;pngfile){
	unsigned short int val;
	pngfile.read((char *) &amp;val, 2);
	return val;
}

string ShiftJISToUTF8(const string&amp; shiftjis) {
    int len = MultiByteToWideChar(932,0,shiftjis.c_str(),-1,NULL,0);
    if (len == 0) return "";
    wstring wstr(len,0);
    MultiByteToWideChar(932,0,shiftjis.c_str(),-1,&amp;wstr[0],len);
    len = WideCharToMultiByte(CP_UTF8,0,&amp;wstr[0],-1,NULL,0,NULL,NULL);
    if (len == 0) return "";
    std::string utf8(len,0);
    WideCharToMultiByte(CP_UTF8,0,&amp;wstr[0],-1,&amp;utf8[0],len,NULL,NULL);
    return utf8;
}

string ShiftJISToGBK(const string&amp; shiftjis) {
    int len = MultiByteToWideChar(932, 0, shiftjis.c_str(), -1, NULL, 0);
    if (len == 0) return "";
    std::wstring wstr(len, 0);
    MultiByteToWideChar(932, 0, shiftjis.c_str(), -1, &amp;wstr[0], len);
    len = WideCharToMultiByte(936, 0, wstr.c_str(), -1, NULL, 0, NULL, NULL);
    if (len == 0) return "";
    string gbk(len, 0);
    WideCharToMultiByte(936, 0, wstr.c_str(), -1, &amp;gbk[0], len, NULL, NULL);
    return gbk;
}

string getbinname(ifstream &amp;binfile){
	string str="";
	char ch;
    while (binfile.get(ch)) {
        if (int(ch) == 0) break;
        str += ch;
    }
    return ShiftJISToGBK(str);
}

bool cmp(int a[],int b[]) {
    return a[0] &lt; b[0];
}

void unbinout(ifstream &amp;binfile,ofstream &amp;outfile, streampos start, streampos end) {
    binfile.seekg(start);
    char buffer[1024];
    streampos remaining = end - start;
    while (remaining &gt; 0) {
        size_t bytesToRead = min(remaining, static_cast&lt;streampos&gt;(sizeof(buffer)));
        binfile.read(buffer, bytesToRead);
        outfile.write(buffer, bytesToRead);
        remaining -= bytesToRead;
    }
    outfile.close();
}

istringstream decompressData(ifstream &amp;inputFile, int startOffset, int uncompressedSize) {
    inputFile.seekg(startOffset);
    vector&lt;char&gt; buffer(uncompressedSize);
    inputFile.read(buffer.data(), uncompressedSize);
    vector&lt;char&gt; uncompressedBuffer(uncompressedSize * 2);
    uLongf destLen = uncompressedSize * 2;
    int result = uncompress((Bytef*)uncompressedBuffer.data(), &amp;destLen, (const Bytef*)buffer.data(), uncompressedSize);
    if(result != Z_OK) {
        cerr&lt;&lt;"Failed to decompress data. Error code: " &lt;&lt;result&lt;&lt;endl;
        return istringstream();
        //return "";
    }
    string decompressedData(uncompressedBuffer.begin(), uncompressedBuffer.begin() + destLen);
    //return decompressedData;
	istringstream iss(decompressedData);
    return iss;
}

void overlayImages(const Mat &amp;background, const Mat &amp;foreground, Mat &amp;output, int x, int y){
    output = background.clone();
    cv::Rect roi(x, y, foreground.cols, foreground.rows);
    roi &amp;= cv::Rect(0, 0, background.cols, background.rows);
    cv::Mat roi_output = output(roi);
    cv::Mat roi_foreground = foreground(cv::Rect(0, 0, roi.width, roi.height));
    for (int i = 0; i &lt; roi.height; ++i){
        for (int j = 0; j &lt; roi.width; ++j){
            cv::Vec4b pixel_foreground = roi_foreground.at&lt;cv::Vec4b&gt;(i, j);
            cv::Vec4b &amp;pixel_output = roi_output.at&lt;cv::Vec4b&gt;(i, j);
            double alpha_foreground = pixel_foreground[3] / 255.0;
            double alpha_background = 1.0 - alpha_foreground;
            for (int k = 0; k &lt; 3; ++k){
                pixel_output[k] = static_cast&lt;uchar&gt;(alpha_foreground * pixel_foreground[k] + alpha_background * pixel_output[k]);
            }
            pixel_output[3] = static_cast&lt;uchar&gt;((alpha_foreground * 255) + (alpha_background * pixel_output[3]));
        }
    }
}

</code></pre>
<p dir="auto"><code>unfavbs.cpp</code></p>
<pre><code class="language-cpp">#include "unfavbs.h"

//定义导出文件数量，以及文件名在bin文件内所占字节大小
int filenamesize,filenumber;

int main(int argc,char* argv[]){
	
	//创建output文件夹
	system("md graph_bs");
	system("cls");

	//打开graph_bs.bin文件
	ifstream binfile;
	binfile.open("graph_bs.bin",ios::in | ios::binary);
	
	//从bin文件读入变量filenumber和filenamesize
	filenumber = readbin(binfile);
	filenamesize = readbin(binfile);
	//cout&lt;&lt;filenumber&lt;&lt;" "&lt;&lt;filenamesize&lt;&lt;endl;
	
	/*
		初始化动态数组bin和unbinname
		bin用来存放对应序列号，文件大小以及起始地址
		unbinname用来存放输出的文件名
	*/
	int **bin = new int *[filenumber];
	string *unbinname = new string[filenumber];
	for(int i = 0;i &lt; filenumber;i++) bin[i] = new int[3];
	
	//从bin文件内读入bin数组
	for(int i = 0;i &lt; filenumber;i++) for(int j = 0;j &lt; 3;j++) bin[i][j] = readbin(binfile);
	
	//排序，使得bin可以与unbinname对应
	sort(bin,bin+filenumber,cmp);
	
	//读入unbinname
	for(int i = 0;i &lt; filenumber;i++) unbinname[i] = getbinname(binfile);
	for(int i = 0;i &lt; filenumber;i++) unbinname[i].erase(unbinname[i].length()-1);
	//for(int i = 0;i &lt; filenumber;i++) cout&lt;&lt;bin[i][0]&lt;&lt;" "&lt;&lt;bin[i][1]&lt;&lt;" "&lt;&lt;bin[i][2]&lt;&lt;" "&lt;&lt;unbinname[i]&lt;&lt;" "&lt;&lt;unbinname[i].size()&lt;&lt;endl;

	//定义一个vecoter用来保存表情文件对应下标
	vector&lt;int&gt;face;

	//保存表情文件下标
	//-79 -19 -57 -23为GBK字符: "表情"
	for(int i = 0;i &lt; filenumber;i++) 
		if(int(unbinname[i][unbinname[i].size()-4])==-79 &amp;&amp;
		int(unbinname[i][unbinname[i].size()-3])==-19 &amp;&amp;
		int(unbinname[i][unbinname[i].size()-2])==-57 &amp;&amp;
		int(unbinname[i][unbinname[i].size()-1])==-23)
			face.push_back(i);
			
	//创建一个map映射文件名--&gt;下标
	map&lt;string,int&gt;binmap;
	for(int i = 0;i &lt; filenumber;i++) binmap[unbinname[i&rsqb;&rsqb;=i;

	//定义一个vecoter用来保存每个表情的基底
	vector&lt;int&gt;base;

	//计算每个基底的下标
	for(int i=0;i&lt;face.size();i++){
		string temp="";
		for(int t=0;t&lt;unbinname[face[i&rsqb;&rsqb;.size()-5;t++) temp+=unbinname[face[i&rsqb;&rsqb;[t];
		if(unbinname[binmap[temp&rsqb;&rsqb;==temp) base.push_back(binmap[temp]);
		else {
			for(int t=i;t&lt;face.size()-1;t++) swap(face[t],face[t+1]);
			face.pop_back();
			i--;
		}
	}
	//for(int i=0;i&lt;face.size();i++) cout&lt;&lt;unbinname[face[i&rsqb;&rsqb;&lt;&lt;" "&lt;&lt;unbinname[base[i&rsqb;&rsqb;&lt;&lt;" "&lt;&lt;face[i]&lt;&lt;endl;

	//清空之前的缓存
	system("del cachebase");
	system("del cacheface");
	system("cls");
	
	//合成立绘并输出到graph_bs文件夹
	for(int i=0;i&lt;base.size();i++){
		//定义两个流basestream和facestream
		ifstream basestream,facestream;

		//定义临时文件流
		ofstream cachebase,cacheface;
		cachebase.open("cachebase",ios::out | ios::binary);
		cacheface.open("cacheface",ios::out | ios::binary);

		//读入basestream
		unbinout(binfile,cachebase,bin[base[i&rsqb;&rsqb;[1],bin[base[i&rsqb;&rsqb;[2]+bin[base[i&rsqb;&rsqb;[1]);
		basestream.open("cachebase",ios::in | ios::binary);

		//读入facestream
		unbinout(binfile,cacheface,bin[face[i&rsqb;&rsqb;[1],bin[face[i&rsqb;&rsqb;[2]+bin[face[i&rsqb;&rsqb;[1]);
		facestream.open("cacheface",ios::in | ios::binary);

		//读入底图解压后的数据大小
		readbin(basestream);
		int basepngsize=readbin(basestream);

		//读取底图的画布大小
		readbin(basestream);
		readbin(basestream);
		readbin(basestream);
		int basepngx=readbinhelf(basestream),basepngy=readbinhelf(basestream);
		readbin(basestream);
		readbin(basestream);
		readbin(basestream);
		readbin(basestream);
		readbin(basestream);
		istringstream basepngstream=decompressData(basestream,44,basepngsize);

		//创建底图
		Mat basepng(basepngy,basepngx, CV_8UC4);
		for(int j = 0; j &lt; basepngy; ++j) for(int k = 0; k &lt; basepngx; ++k) {
        	basepng.at&lt;cv::Vec4b&gt;(j, k)[0] = int(basepngstream.get());
        	basepng.at&lt;cv::Vec4b&gt;(j, k)[1] = int(basepngstream.get());
        	basepng.at&lt;cv::Vec4b&gt;(j, k)[2] = int(basepngstream.get());
        	basepng.at&lt;cv::Vec4b&gt;(j, k)[3] = int(basepngstream.get());
    	}

		//读入表情解压后的数据大小
		readbin(facestream);
		int facepngsize=readbin(facestream);
		readbin(facestream);
		readbin(facestream);
		readbin(facestream);

		//读表情的画布大小以及偏移坐标
		int facepngx=readbinhelf(facestream),facepngy=readbinhelf(facestream),x=readbinhelf(facestream),y=readbinhelf(facestream);
		readbin(facestream);
		
		//读入表情图片数量
		int pngnumber=readbin(facestream);
		readbin(facestream);
		readbin(facestream);
		istringstream facepngstream=decompressData(facestream,44,facepngsize);

		//合成并输出
		string cmdstr="md .\\graph_bs\\"+unbinname[base[i&rsqb;&rsqb;;
    	system(cmdstr.c_str());
    	system("cls");
    	for(int n=0;n&lt;pngnumber;n++) {
    		Mat facepng(facepngy,facepngx, CV_8UC4);
    		for(int k = 0; k &lt; facepngy; ++k) for(int j = 0; j &lt; facepngx; ++j) {
        		facepng.at&lt;cv::Vec4b&gt;(k, j)[0] = int(facepngstream.get());
        		facepng.at&lt;cv::Vec4b&gt;(k, j)[1] = int(facepngstream.get());
        		facepng.at&lt;cv::Vec4b&gt;(k, j)[2] = int(facepngstream.get());
        		facepng.at&lt;cv::Vec4b&gt;(k, j)[3] = int(facepngstream.get());
    		}
			Mat pngfile;
			overlayImages(basepng,facepng,pngfile,x,y);
    		imwrite(".\\graph_bs\\"+unbinname[base[i&rsqb;&rsqb;+'\\'+unbinname[base[i&rsqb;&rsqb;+'_'+to_string(n)+".png",pngfile);
		}
		basestream.close();
		facestream.close();
		system("del cachebase");
		system("del cacheface");
		system("cls");
	}

	//释放动态数组
	for(int i = 0;i &lt; filenumber;i++) delete[] bin[i];
	delete[] bin;
	delete[] unbinname;
	
	//关闭bin文件
	binfile.close();
	
	return 0;
}

</code></pre>
]]></description><link>https://galgame.dev/topic/1544/诈个尸-favorite立绘合成工具</link><guid isPermaLink="true">https://galgame.dev/topic/1544/诈个尸-favorite立绘合成工具</guid><dc:creator><![CDATA[listder]]></dc:creator><pubDate>Wed, 10 Apr 2024 18:02:08 GMT</pubDate></item><item><title><![CDATA[基于坐标的立绘合成工具]]></title><description><![CDATA[<p dir="auto">usage:img-cov.exe backgroundfile foregroundfile outputfile x y<br />
<a href="/assets/uploads/files/1711333114146-533625e6-9f03-4c77-9d5e-4e5d3cef1aa7-img-cov.7z">img-cov.7z</a><br />
源代码：</p>
<pre><code class="language-cpp">#include&lt;bits/stdc++.h&gt;
#include &lt;io.h&gt;
#include &lt;windows.h&gt;
#include &lt;direct.h&gt; 
#include &lt;opencv2/opencv.hpp&gt;

using namespace cv;
using namespace std;

void overlayImages(const cv::Mat&amp; background, const cv::Mat&amp; foreground, cv::Mat&amp; output, int x, int y) {
	output = background.clone();
	cv::Rect roi(x, y, foreground.cols, foreground.rows);
	roi &amp;= cv::Rect(0, 0, background.cols, background.rows);
	cv::Mat roi_output = output(roi);
	cv::Mat roi_foreground = foreground(cv::Rect(0, 0, roi.width, roi.height));
	for (int i = 0; i &lt; roi.height; ++i) {
		for (int j = 0; j &lt; roi.width; ++j) {
			cv::Vec4b pixel_foreground = roi_foreground.at&lt;cv::Vec4b&gt;(i, j);
			cv::Vec4b&amp; pixel_output = roi_output.at&lt;cv::Vec4b&gt;(i, j);

			double alpha = pixel_foreground[3] / 255.0;
			double beta = 1.0 - alpha;

			for (int k = 0; k &lt; 3; ++k) {
				pixel_output[k] = static_cast&lt;uchar&gt;(alpha * pixel_foreground[k] + beta * pixel_output[k]);
			}
		}
	}
}

void imgset(string path1, string path2,string outpath,int x,int y){
	Mat img1 = cv::imread(path2, cv::IMREAD_UNCHANGED);
	Mat img2 = cv::imread(path1, cv::IMREAD_UNCHANGED);
	Mat mergedImg;
	overlayImages(img1,img2,mergedImg,x,y);
	imwrite(outpath, mergedImg);
	return ;
}

int main(int argc,char *argv[]){
	if(argc!=6){
	    printf("usage:img-cov.exe backgroundfile foregroundfile outputfile x y");
	    return 0;
	}
	else {
	    imgset(argv[2],argv[1],argv[3],atoi(argv[4]),atoi(argv[5]));
	    return 0;
	}
} 
</code></pre>
]]></description><link>https://galgame.dev/topic/1353/基于坐标的立绘合成工具</link><guid isPermaLink="true">https://galgame.dev/topic/1353/基于坐标的立绘合成工具</guid><dc:creator><![CDATA[listder]]></dc:creator><pubDate>Mon, 25 Mar 2024 02:20:36 GMT</pubDate></item><item><title><![CDATA[favorite立绘合成工具]]></title><description><![CDATA[要不。。。合并一下主题？
]]></description><link>https://galgame.dev/topic/1352/favorite立绘合成工具</link><guid isPermaLink="true">https://galgame.dev/topic/1352/favorite立绘合成工具</guid><dc:creator><![CDATA[hachiroku8620]]></dc:creator><pubDate>Mon, 25 Mar 2024 02:14:48 GMT</pubDate></item><item><title><![CDATA[[Linux中国合辑]]]></title><description><![CDATA[江湖再见    !
]]></description><link>https://galgame.dev/topic/1207/linux中国合辑</link><guid isPermaLink="true">https://galgame.dev/topic/1207/linux中国合辑</guid><dc:creator><![CDATA[ErrorEutopia]]></dc:creator><pubDate>Wed, 06 Mar 2024 16:43:40 GMT</pubDate></item><item><title><![CDATA[[Vim] + [Blender]笔记]]></title><description><![CDATA[1基本工作流程
建模-布光-材质-渲染
窗口面板可拆分，互换
2控制
Control + TAB切换
旋转视角：鼠标中健按住可旋转
平移视角：shift + 鼠标中键
推进推远视角：滚动鼠标中键
移动物体：G，恢复变换：Option + G
旋转物体：R，恢复变换：Option + R
缩放物体：S，恢复变换：Option + S
新建物体：Shift + A，删除物体：X或者 Delete
复制物体：Shift + D
隐藏物体：H，显示全部物体：Option + H
隐藏没有被选中的物体：Shift + H
选择物体：刷选：C ，
全选：A，按住Shift可以加选或者减选
移动游标：Shift + 鼠标右键
游标恢复到世界中心：Shift + C
调用游标Pie目录：Shift + S
G移动状态下，按住ctrl吸附
切换全局和局部坐标系：在G移动状态下按两次X，Y，Z
透视模式：Option + Z
标注擦除：command + 鼠标中键
3编辑模式
选中模型：TAB切换编辑模式
点、线、面选择：1 2 3
切换选择方式：W，框选快捷键：B，
刷选快捷键：C，擦除以刷选：鼠标中键
反选：command + I
多选：按住shift + 鼠标左键
最短路径多选：按住command + 鼠标左键
选择模型点：L
相邻多选：Option + 鼠标左键，
相邻同向多选：command + Option + 鼠标左键
外挤：E，连续挤出：command + 鼠标右键
内挤：I
环切：command + R，倒角：command + B
合并：M，断开：V，切刀：K，填充：F
桥接：command + E，分离：P
4曲线
曲线基础操作
贝塞尔曲线：控制柄
NURBS曲线：控制点,会多一个W
给曲线增加倒角的三种方式:圆,物体,轮廓
闭合曲线：
方法1：选中要闭合的两个点，F闭合；
方法2：选中一个点，Option + C
断开曲线：选中两个点,X删除-段数
改变曲线倒角半径：Option + S
父子级关系
设置父级：command + P
清空父级：Option + P，在设置父级目标的时候选择顶点(基于三点)可以使物体跟随曲线曲率变动
蒙皮修改器
改变蒙皮点的半径：command + A
勾选蒙皮修改器的平滑着色可以让模型平滑着色
5材质
白色为1黑色为0 白色的会被替换
着色器command + Shift + 鼠标左键直接连接输出
20集nodeWrangler快捷键
command + T
command + Shift + T
command + Shift + 鼠标左键
command + Shift + 鼠标右键
Option + S
纹理就是表面
表面颜色、表面法线、表面凹凸
材质、纹理一个意思
蒙板
表面长啥样，按什么样子展示
纹理是数据，材质是效果，蒙板是调控范围的工具，蒙皮是与动画相关的变形技术。
材质节点
颜色贴图节点（diffuse）
粗糙度贴图节点（roughness）
法线贴图节点-法线贴图转换节点（Normal Map）
凹凸贴图-置换节点（Displacement Map）
6骨骼
command + Shift + Option + s侧向缩放
]]></description><link>https://galgame.dev/topic/1206/vim-blender-笔记</link><guid isPermaLink="true">https://galgame.dev/topic/1206/vim-blender-笔记</guid><dc:creator><![CDATA[弥萨]]></dc:creator><pubDate>Wed, 06 Mar 2024 16:39:12 GMT</pubDate></item></channel></rss>