const fs = require("fs");
const path = require("path");
const fileName = "310000";
const b_num = Buffer.from(fileName, "hex");
const f_num = b_num.toString("utf8");
const f1_path = "./dist/ccysp/" + fileName + "_CHARA_BASE.cysp.bytes";
const f2_path = "./dist/bcysp/" + fileName + "_BATTLE.cysp.bytes";
const f3_path = "./dist/skel/" + fileName + ".skel";
// 读取基础文件
const b1 = fs.readFileSync(f1_path);
let i = 0;
while (i < b1.length) {
if (b1[i] === 0x1c) {
break;
}
i++;
}
const result = b1.slice(i);
// 读取增量文件
const b2 = fs.readFileSync(f2_path);
i = 0;
while (i < b2.length) {
let j = 0;
let flag = true;
while (j < b_num.length) {
if (b2[i + j] !== b_num[j]) {
flag = false;
break;
}
j++;
}
if (flag) {
break;
}
i++;
}
const animationCount = Buffer.alloc(1);
animationCount.writeUInt8(0x50, 0);
const b2sub = b2.slice(i - 1);
const mergedResult = Buffer.concat([result, animationCount, b2sub]);
fs.writeFileSync(f3_path, mergedResult);
此页面不支持夜间模式!
已进入夜间模式!
已进入普通模式!
搜索框不允许为空
签到成功!经验+5!芋圆币+2!
签到失败!今日已签到!
需要登录社区账号才可以进入!