惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

B
Blog
量子位
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
Last Week in AI
Last Week in AI
酷 壳 – CoolShell
酷 壳 – CoolShell
人人都是产品经理
人人都是产品经理
Jina AI
Jina AI
雷峰网
雷峰网
博客园_首页
WordPress大学
WordPress大学
博客园 - 司徒正美
爱范儿
爱范儿
博客园 - 聂微东
IT之家
IT之家
美团技术团队
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
博客园 - 三生石上(FineUI控件)
有赞技术团队
有赞技术团队
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
T
Tailwind CSS Blog
博客园 - Franky
V
V2EX
GbyAI
GbyAI
阮一峰的网络日志
阮一峰的网络日志

某岛

AtCoder Beginner Contest 409 Luogu P5325. 【模板】Min_25 筛 UOJ #188. 【UR #13】Sanrd AtCoder Beginner Contest 371 AtCoder Beginner Contest 369 RPGMaker 2k3 百科 OneShot 的考古 2024“开创拓芯”游戏创享节的相关记录 CJ 回来后的戒断反应 Luogu P10221. [省选联考 2024] 重塑时光 Luogu P5308 [COCI2018-2019#4] Akvizna wqs 二分 歌唱王国 Lean 相关 BZOJ 3153. Sone1 The 2023 ICPC World Finals Luxor 新巴别塔 Sora 的想象与思考 Facebook Hacker Cup 2023 Round 1 AtCoder Beginner Contest 322 LLaMA 2 相关 HuggingFace AI Game Jam ACL 2023 Trans 相关… Luogu P2053. [SCOI2007] 修车 Luogu P1973. [NOI2011] NOI 嘉年华 Luogu P1933. [NOI2010] 旅行路线 Luogu P1954. [NOI2010] 航空管制 Luogu P2048. [NOI2010] 超级钢琴 Luogu P2046. [NOI2010] 海拔
GameCreator 自动生成行走图
2021-08-09 · via 某岛

August 9, 2021

const fs = require('fs');

function gen(png, target, offset_x = 0, offset_y= 0, w  = 32, h = 32) {

    let t;
    let json = JSON.parse(fs.readFileSync('avatar5.json', 'utf8'));
    json["picUrls"] = ["asset/image/_RM/VA/Characters/" + png + ".png"];

    t = json["actionListArr"][0]["frameImageInfo"];
    
    let ox = offset_x*(w*3);
    let oy = offset_y*(h*4);

    for (let i=0;i<4;++i) {
        t[i][0]["rect"][0] = -(w*1+ox);
        t[i][0]["rect"][1] = -(h*i+oy);
        t[i][0]["rect"][2] = w;
        t[i][0]["rect"][3] = h;
        t[i][0]["width"] = w;
        t[i][0]["height"] = h;
        t[i][0].x = -Math.floor(w/2);
        t[i][0].y = -(h-1);
    }

    t = json["actionListArr"][1]["frameImageInfo"];

    for (let i=0;i<4;++i) {
        t[i].pop();
        for (let j=0;j<3;++j) {
            t[i][j]["picUrlIndex"] = 0;
            t[i][j]["rect"][0] = -(w*j+ox);
            t[i][j]["rect"][1] = -(h*i+oy);
            t[i][j]["rect"][2] = w;
            t[i][j]["rect"][3] = h;
            t[i][j]["width"] = w;
            t[i][j]["height"] = h;
            t[i][j].x = -Math.floor(w/2);
            t[i][j].y = -(h-1);
        }
    }

    fs.writeFileSync(target, JSON.stringify(json,null, 4));
}

gen("$キッカ", 'avatar8001.json')
gen("Actor5", 'avatar8002.json', 1, 1)
gen("$ラヴィアン", 'avatar8003.json')
gen("$タミネ", 'avatar8004.json')
gen("Vehicle", 'avatar44.json', 1, 0)

const int N = int(2e5) + 9;
char buf[5*96*96];

int n;

int main() {
#ifndef ONLINE_JUDGE
    //freopen("PORTMAP.001", "rb", stdin);
    freopen("PORTMAP001.json", "w", stdout);
#endif
    int n;
    }*/
    char c;

    REP(i, 101) {
        fstream file, outfile;
        string name = "PORTMAP.";
        int x = i;
        int c = x % 10; x /= 10;
        int b = x % 10; x /= 10;
        int a = x % 10;
        name += ('0'+a);
        name += ('0'+b);
        name += ('0'+c);

        file.open(name.c_str(), ios::binary|ios::in);

        string out_name = "PORTMAP";
        out_name += ('0'+a);
        out_name += ('0'+b);
        out_name += ('0'+c);
        out_name += ".json";
        outfile.open(out_name.c_str(), ios::out);

        file.read(buf, 96*96);
        REP(i, 96*96) {
            if (i) outfile << ",";
            outfile << int(byte(buf[i]));
        }

        outfile.close();
        file.close();
    }
}
let t = Game.player.sceneObject.avatar;
t.loadData(1001);

Posted by xiaodao
Category: 日常