R3EXS 1.1.0 → 2.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.yardopts +10 -12
- data/CHANGELOG.md +46 -21
- data/README.md +17 -38
- data/README_EN.md +21 -40
- data/bin/R3EXS +191 -217
- data/ext/R3EXS/R3EXS.cxx +334 -0
- data/ext/R3EXS/extconf.rb +12 -0
- data/lib/R3EXS/RGSS3.rb +553 -1437
- data/lib/R3EXS/RGSS3_R3EXS.rb +1939 -1811
- data/lib/R3EXS/ast.rb +209 -149
- data/lib/R3EXS/error.rb +39 -209
- data/lib/R3EXS/extract_strings.rb +86 -63
- data/lib/R3EXS/inject_strings.rb +83 -61
- data/lib/R3EXS/json_rvdata2.rb +122 -109
- data/lib/R3EXS/logger.rb +44 -0
- data/lib/R3EXS/rvdata2_json.rb +79 -82
- data/lib/R3EXS/utils.rb +404 -1055
- data/lib/R3EXS/version.rb +3 -4
- data/lib/R3EXS.rb +14 -12
- metadata +20 -34
- data/ext/rgss3a_rvdata2/extconf.rb +0 -3
- data/ext/rgss3a_rvdata2/rgss3a_rvdata2.c +0 -616
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: d97e49d3d7f7510703aed62a5d2e83a0405eeadd3d9072605c43014e4fe87f55
|
|
4
|
+
data.tar.gz: 40a95a786b2fd8a6b3a1feb865c9dff2d4304fdad6d78e90b8f0eef9638cb750
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 3660f54a2ead90dbbdbf1af6ee197b3f875f6a451c8982821037de8d2cc3cecaac84a8941797b6450ffe08a226081c12caa4dbb8b0501bdbe7d1128848cadc8b
|
|
7
|
+
data.tar.gz: 8eabbc60378d841136a01af7b876f75df83ca5a625642ce323c93e8b38229ee69a37360d7738dbfa5d9dda7fdc5c392c66e743bea1a3bf693668af1991df7636
|
data/.yardopts
CHANGED
|
@@ -1,12 +1,10 @@
|
|
|
1
|
-
--title R3EXS
|
|
2
|
-
--readme README_EN.md
|
|
3
|
-
--
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
README_EN.md
|
|
12
|
-
CHANGELOG.md
|
|
1
|
+
--title R3EXS
|
|
2
|
+
--readme README_EN.md
|
|
3
|
+
--charset utf-8
|
|
4
|
+
lib/**/*.rb
|
|
5
|
+
ext/**/*.cxx
|
|
6
|
+
-
|
|
7
|
+
LICENSE
|
|
8
|
+
README.md
|
|
9
|
+
README_EN.md
|
|
10
|
+
CHANGELOG.md
|
data/CHANGELOG.md
CHANGED
|
@@ -1,45 +1,70 @@
|
|
|
1
1
|
# [R3EXS]
|
|
2
2
|
|
|
3
|
+
## [2.0.0] - 2026-07-05
|
|
4
|
+
|
|
5
|
+
### CXX 扩展
|
|
6
|
+
|
|
7
|
+
- 使用 c++23 重写了整体逻辑,代码更加简洁,易于维护
|
|
8
|
+
- 并行计算 magickey,真正发挥 SIMD 的优势,解码速度为原来的 4 倍
|
|
9
|
+
- 默认对所有平台都开启 -march=native -O3 编译
|
|
10
|
+
|
|
11
|
+
### Ruby 扩展
|
|
12
|
+
|
|
13
|
+
- 清理了大量的 Ruby 代码,特别是 RGSS3.rb 文件里面的代码,逻辑更加清晰
|
|
14
|
+
- 优化了项目的整体结构,删除了不必要的文件和依赖
|
|
15
|
+
- ast.rb 改为使用类方法,方便后续可能的多线程实现
|
|
16
|
+
- EventCommand 类不再处理 505 指令,由于该指令对应的 parameter 其实是对 205 指令里面的 MoveRoute 的参数的引用,
|
|
17
|
+
所以重复处理没有意义,而且这样可以避免许多由于使用了其他翻译软件读取 rvdata2 后再写入 rvdata2,导致的 505 指令的参数被破坏的问题
|
|
18
|
+
- 添加了一个 Logger 类来打印日志
|
|
19
|
+
- 修复了 Color 和 Tone 反序列化赋值错位的问题
|
|
20
|
+
- 移除了不提取 note 的功能,后续可能考虑使用更好的方法实现
|
|
21
|
+
- ruby 的支持降低到 >=3.0.0
|
|
22
|
+
|
|
23
|
+
## [1.1.1] - 2025-07-21
|
|
24
|
+
|
|
25
|
+
- rgss3a_rvdata2 方法添加 AVX 优化
|
|
26
|
+
- rgss3a_rvdata2 方法使用 mmap 代替 fopen
|
|
27
|
+
|
|
3
28
|
## [1.1.0] - 2025-04-09
|
|
4
29
|
|
|
5
|
-
-
|
|
6
|
-
-
|
|
7
|
-
-
|
|
8
|
-
-
|
|
30
|
+
- 添加了递归搜索目标目录下的 \*.rvdata2 文件的功能
|
|
31
|
+
- 修复了 R3EXS::EventCommand 类里面的 205 和 505 指令的处理问题
|
|
32
|
+
- 修复了 StringsInjector 里面的逻辑错误,即在遍历 AST 时,错误地将翻译后的字符串放入 location 中
|
|
33
|
+
- gli 版本更新到 2.22.2
|
|
9
34
|
|
|
10
35
|
## [1.0.5] - 2025-03-12
|
|
11
36
|
|
|
12
|
-
-
|
|
13
|
-
-
|
|
37
|
+
- rb_in_strings 方法里面添加将 Scripts_info.json 文件拷贝至目标目录里面,以避免后续报错
|
|
38
|
+
- 优化了一下 json_rvdata2 方法里的输出
|
|
14
39
|
|
|
15
40
|
## [1.0.4] - 2025-03-11
|
|
16
41
|
|
|
17
|
-
-
|
|
18
|
-
-
|
|
19
|
-
-
|
|
20
|
-
-
|
|
42
|
+
- 修复 rvdata2_json 方法里处理 Scripts 的 BUG
|
|
43
|
+
- rb_ex_strings 方法里 Extract 单词拼写修正
|
|
44
|
+
- oj 版本更新到 3.16.10
|
|
45
|
+
- redcarpet 版本更新到 3.6.1
|
|
21
46
|
|
|
22
47
|
## [1.0.3] - 2025-02-15
|
|
23
48
|
|
|
24
|
-
-
|
|
25
|
-
-
|
|
26
|
-
-
|
|
49
|
+
- 添加 RGSS3AFileError 类以处理加密格式不支持的问题
|
|
50
|
+
- 将 rgss3a_rvdata2 方法里面的文件路径统一为 Unix 格式
|
|
51
|
+
- 完善 rgss3a_rvdata2 方法的异常抛出
|
|
27
52
|
|
|
28
53
|
## [1.0.2] - 2025-02-14
|
|
29
54
|
|
|
30
|
-
-
|
|
55
|
+
- 将 .yardopts 文件添加到 gem 文件里面以支持 https://rubydoc.info/ 的文档自动生成
|
|
31
56
|
|
|
32
57
|
## [1.0.1] - 2025-02-14
|
|
33
58
|
|
|
34
|
-
-
|
|
35
|
-
-
|
|
59
|
+
- 添加了 gemspec 文件里面的 metadata 信息
|
|
60
|
+
- 修改了一下生成 yard 文档的选项
|
|
36
61
|
|
|
37
62
|
## [1.0.0] - 2025-02-13
|
|
38
63
|
|
|
39
64
|
### 添加功能
|
|
40
65
|
|
|
41
|
-
-
|
|
42
|
-
-
|
|
43
|
-
-
|
|
44
|
-
-
|
|
45
|
-
-
|
|
66
|
+
- decrypt - 解码 Game.rgss3a 文件
|
|
67
|
+
- rvdata2_json - 将 rvdata2 文件序列化为 json 格式
|
|
68
|
+
- json_rvdata2 - 将 json 文件反序列化为 rvdata2 文件
|
|
69
|
+
- ex_strings - 提取所有的字符串
|
|
70
|
+
- in_strings - 注入所有的字符串
|
data/README.md
CHANGED
|
@@ -8,14 +8,14 @@ RGSS3_Extract_Strings_Tool
|
|
|
8
8
|
|
|
9
9
|
## 目录
|
|
10
10
|
|
|
11
|
-
-
|
|
12
|
-
-
|
|
13
|
-
-
|
|
14
|
-
-
|
|
15
|
-
-
|
|
16
|
-
-
|
|
17
|
-
-
|
|
18
|
-
-
|
|
11
|
+
- [简介](#简介)
|
|
12
|
+
- [特点](#特点)
|
|
13
|
+
- [功能列表](#功能列表)
|
|
14
|
+
- [安装方法](#安装方法)
|
|
15
|
+
- [使用方法](#使用方法)
|
|
16
|
+
- [项目构建](#项目构建)
|
|
17
|
+
- [项目文档](#项目文档)
|
|
18
|
+
- [友情链接](#友情链接)
|
|
19
19
|
|
|
20
20
|
## [简介](#目录)
|
|
21
21
|
|
|
@@ -44,18 +44,6 @@ R3EXS 是一个基于 Ruby 语言,用来提取和翻译 RGSS3 游戏里字符
|
|
|
44
44
|
gem install R3EXS
|
|
45
45
|
```
|
|
46
46
|
|
|
47
|
-
### 直接下载 exe 可执行文件
|
|
48
|
-
|
|
49
|
-
点击下载 [R3EXS.exe](https://github.com/LuoTat/R3EXS/releases)
|
|
50
|
-
|
|
51
|
-
使用 [Ocran](https://github.com/Largo/ocran) 和 [Tebako](https://github.com/tamatebako/tebako) 两个打包工具
|
|
52
|
-
|
|
53
|
-
`Windows` 环境提供 `R3EXS-windows-Ocran` 和 `R3EXS-windows-Tebako`
|
|
54
|
-
|
|
55
|
-
`Linux (GLIBC>=2.31)` 环境提供 `R3EXS-linux-Tebako`
|
|
56
|
-
|
|
57
|
-
在首次运行时会解压 Ruby 环境,所以首次运行会比较慢
|
|
58
|
-
|
|
59
47
|
## [使用方法](#目录)
|
|
60
48
|
|
|
61
49
|
以下代码均假设在游戏根目录下运行,确保 `./Game.rgss3a` 文件存在,或者已经解包到 `./Data` 文件夹下
|
|
@@ -94,7 +82,6 @@ SYNOPSIS
|
|
|
94
82
|
|
|
95
83
|
COMMAND OPTIONS
|
|
96
84
|
-c, --[no-]complete - 开启完全序列化
|
|
97
|
-
-n, --[no-]with_notes - 开启注释序列化
|
|
98
85
|
-o, --output_dir=DIRECTORY - *.json 文件的输出目录 (默认: ./JSON)
|
|
99
86
|
-s, --[no-]with_scripts - 开启 Scripts 脚本序列化
|
|
100
87
|
```
|
|
@@ -207,7 +194,7 @@ R3EXS help
|
|
|
207
194
|
如果想要构建项目并运行,首先克隆整个项目
|
|
208
195
|
|
|
209
196
|
```bash
|
|
210
|
-
git clone
|
|
197
|
+
git clone https://github.com/LuoTat/R3EXS.git
|
|
211
198
|
```
|
|
212
199
|
|
|
213
200
|
然后使用 `bundle` 安装依赖
|
|
@@ -230,12 +217,6 @@ rake compile
|
|
|
230
217
|
yardoc
|
|
231
218
|
```
|
|
232
219
|
|
|
233
|
-
构建 `R3EXS_Ocran.exe` 可执行文件
|
|
234
|
-
|
|
235
|
-
```bash
|
|
236
|
-
rake ocran
|
|
237
|
-
```
|
|
238
|
-
|
|
239
220
|
查看所有 rake 任务
|
|
240
221
|
|
|
241
222
|
```bash
|
|
@@ -248,13 +229,11 @@ rake -T
|
|
|
248
229
|
|
|
249
230
|
## [友情链接](#目录)
|
|
250
231
|
|
|
251
|
-
-
|
|
252
|
-
-
|
|
253
|
-
-
|
|
254
|
-
-
|
|
255
|
-
-
|
|
256
|
-
-
|
|
257
|
-
-
|
|
258
|
-
-
|
|
259
|
-
- [RPGMakerDecrypter](https://github.com/uuksu/RPGMakerDecrypter)
|
|
260
|
-
- [RPGMaker VX Ace F1-Manual](https://miaowm5.github.io/RMVA-F1)
|
|
232
|
+
- [oj](https://github.com/ohler55/oj)
|
|
233
|
+
- [gli](https://github.com/davetron5000/gli)
|
|
234
|
+
- [Prism](https://github.com/ruby/prism)
|
|
235
|
+
- [RGSS3](https://github.com/taroxd/RGSS3)
|
|
236
|
+
- [rvdata2json](https://github.com/DICE2000/rvdata2json)
|
|
237
|
+
- [VX-Ace-Translator](https://github.com/AhmedAhmedEG/VX-Ace-Translator)
|
|
238
|
+
- [RPGMakerDecrypter](https://github.com/uuksu/RPGMakerDecrypter)
|
|
239
|
+
- [RPGMaker VX Ace F1-Manual](https://miaowm5.github.io/RMVA-F1)
|
data/README_EN.md
CHANGED
|
@@ -8,14 +8,14 @@ RGSS3_Extract_Strings_Tool
|
|
|
8
8
|
|
|
9
9
|
## Contents
|
|
10
10
|
|
|
11
|
-
-
|
|
12
|
-
-
|
|
13
|
-
-
|
|
14
|
-
-
|
|
15
|
-
-
|
|
16
|
-
-
|
|
17
|
-
-
|
|
18
|
-
-
|
|
11
|
+
- [Synopsis](#synopsis)
|
|
12
|
+
- [Features](#features)
|
|
13
|
+
- [Function List](#function-list)
|
|
14
|
+
- [Installation](#installation)
|
|
15
|
+
- [Usage](#usage)
|
|
16
|
+
- [Project Build](#project-build)
|
|
17
|
+
- [Documentation](#documentation)
|
|
18
|
+
- [Links](#links)
|
|
19
19
|
|
|
20
20
|
## [Synopsis](#contents)
|
|
21
21
|
|
|
@@ -44,23 +44,13 @@ It uses [Prism](https://github.com/ruby/prism) to accurately extract strings and
|
|
|
44
44
|
gem install R3EXS
|
|
45
45
|
```
|
|
46
46
|
|
|
47
|
-
### Download executable file directly
|
|
48
|
-
|
|
49
|
-
Click to download [R3EXS.exe](https://github.com/LuoTat/R3EXS/releases)
|
|
50
|
-
|
|
51
|
-
Since the R3EXS.exe file is packaged using [Ocran](https://github.com/Largo/ocran) and [Tebako](https://github.com/tamatebako/tebako)
|
|
52
|
-
|
|
53
|
-
The `Windows` environment provides `R3EXS-windows_Ocran` and `R3EXS-windows_Tebako`
|
|
54
|
-
|
|
55
|
-
The `Linux (GLIBC >= 2.31)` environment provides `R3EXS-linux_Tebako`
|
|
56
|
-
|
|
57
|
-
it will extract the Ruby environment the first time it runs, so the first run may be slower.
|
|
58
|
-
|
|
59
47
|
## [Usage](#contents)
|
|
60
48
|
|
|
61
|
-
The following commands assume they are run in the game’s root directory, ensuring the `./Game.rgss3a` file exists or has
|
|
49
|
+
The following commands assume they are run in the game’s root directory, ensuring the `./Game.rgss3a` file exists or has
|
|
50
|
+
already been unpacked into the `./Data` folder.
|
|
62
51
|
|
|
63
|
-
~~If you enjoy a crazy amount of console output or feel like the execution is too fast~~, please enable the `--verbose`
|
|
52
|
+
~~If you enjoy a crazy amount of console output or feel like the execution is too fast~~, please enable the `--verbose`
|
|
53
|
+
option.
|
|
64
54
|
|
|
65
55
|
### [Unpack Game.rgss3a file](#function-list)
|
|
66
56
|
|
|
@@ -94,7 +84,6 @@ SYNOPSIS
|
|
|
94
84
|
|
|
95
85
|
COMMAND OPTIONS
|
|
96
86
|
-c, --[no-]complete - Enable complete serialization
|
|
97
|
-
-n, --[no-]with_notes - Enable notes attribute serialization
|
|
98
87
|
-o, --output_dir=DIRECTORY - The *.json output dir (default: ./JSON)
|
|
99
88
|
-s, --[no-]with_scripts - Enable Scripts.rvdata2 serialization
|
|
100
89
|
```
|
|
@@ -207,7 +196,7 @@ R3EXS help
|
|
|
207
196
|
To build and run the project, first clone the entire repository:
|
|
208
197
|
|
|
209
198
|
```bash
|
|
210
|
-
git clone
|
|
199
|
+
git clone https://github.com/LuoTat/R3EXS.git
|
|
211
200
|
```
|
|
212
201
|
|
|
213
202
|
Then use `bundle` to install dependencies:
|
|
@@ -230,12 +219,6 @@ Build the local documentation:
|
|
|
230
219
|
yardoc
|
|
231
220
|
```
|
|
232
221
|
|
|
233
|
-
Build the `R3EXS_Ocran.exe` file:
|
|
234
|
-
|
|
235
|
-
```bash
|
|
236
|
-
rake ocran
|
|
237
|
-
```
|
|
238
|
-
|
|
239
222
|
View all rake tasks:
|
|
240
223
|
|
|
241
224
|
```bash
|
|
@@ -248,13 +231,11 @@ rake -T
|
|
|
248
231
|
|
|
249
232
|
## [Links](#contents)
|
|
250
233
|
|
|
251
|
-
-
|
|
252
|
-
-
|
|
253
|
-
-
|
|
254
|
-
-
|
|
255
|
-
-
|
|
256
|
-
-
|
|
257
|
-
-
|
|
258
|
-
-
|
|
259
|
-
- [RPGMakerDecrypter](https://github.com/uuksu/RPGMakerDecrypter)
|
|
260
|
-
- [RPGMaker VX Ace F1-Manual](https://miaowm5.github.io/RMVA-F1)
|
|
234
|
+
- [oj](https://github.com/ohler55/oj)
|
|
235
|
+
- [gli](https://github.com/davetron5000/gli)
|
|
236
|
+
- [Prism](https://github.com/ruby/prism)
|
|
237
|
+
- [RGSS3](https://github.com/taroxd/RGSS3)
|
|
238
|
+
- [rvdata2json](https://github.com/DICE2000/rvdata2json)
|
|
239
|
+
- [VX-Ace-Translator](https://github.com/AhmedAhmedEG/VX-Ace-Translator)
|
|
240
|
+
- [RPGMakerDecrypter](https://github.com/uuksu/RPGMakerDecrypter)
|
|
241
|
+
- [RPGMaker VX Ace F1-Manual](https://miaowm5.github.io/RMVA-F1)
|