feat: 全解功能 - #2
Draft
Applesaber wants to merge 1 commit into
Draft
Conversation
Co-authored-by: MoeGrid <MoeGrid@users.noreply.github.com>
|
Caution The consumer version of Gemini Code Assist on GitHub has been sunset. All code review activity has officially ceased. |
Reviewer's Guide添加一个基于内存的 XML 游戏内容解锁模块用于 CHUNITHM,将其接入 Applechu 平台,并暴露支持该模块所需的 winapi 工具和配置。 内存 XML 解锁流程的时序图sequenceDiagram
actor Game
participant CreateFileW
participant iohook
participant unlocker_irp_handler
participant handle_open
participant load_modified
participant std_fs_read as std::fs::read
participant modify_xml
participant open_nul_fd as iohook::open_nul_fd
Game->>CreateFileW: CreateFileW
CreateFileW->>iohook: Irp(Open)
iohook->>unlocker_irp_handler: unlocker_irp_handler(Open)
unlocker_irp_handler->>handle_open: handle_open
handle_open->>load_modified: load_modified(path, filename, rule_index)
activate load_modified
load_modified->>std_fs_read: std::fs::read(path)
std_fs_read-->>load_modified: raw XML bytes
load_modified->>modify_xml: modify_xml(text, tag, value)
modify_xml-->>load_modified: modified String
load_modified-->>handle_open: modified Vec<u8>
deactivate load_modified
handle_open->>open_nul_fd: iohook::open_nul_fd
open_nul_fd-->>handle_open: fd (NUL handle)
handle_open-->>unlocker_irp_handler: 1 (success)
unlocker_irp_handler-->>iohook: Irp(Open) handled
iohook-->>Game: HANDLE (virtual XML)
Game->>CreateFileW: ReadFile / GetFileSizeEx
CreateFileW->>iohook: Irp(Read/Seek)
iohook->>unlocker_irp_handler: unlocker_irp_handler(Read/Seek)
unlocker_irp_handler-->>Game: data from FileState (modified XML)
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your Experience访问你的 dashboard 来:
Getting HelpOriginal review guide in EnglishReviewer's GuideAdds an in-memory XML-based game content unlocker module for CHUNITHM, wires it into the Applechu platform, and exposes winapi utilities and configuration required to support it. Sequence diagram for the in-memory XML unlocker flowsequenceDiagram
actor Game
participant CreateFileW
participant iohook
participant unlocker_irp_handler
participant handle_open
participant load_modified
participant std_fs_read as std::fs::read
participant modify_xml
participant open_nul_fd as iohook::open_nul_fd
Game->>CreateFileW: CreateFileW
CreateFileW->>iohook: Irp(Open)
iohook->>unlocker_irp_handler: unlocker_irp_handler(Open)
unlocker_irp_handler->>handle_open: handle_open
handle_open->>load_modified: load_modified(path, filename, rule_index)
activate load_modified
load_modified->>std_fs_read: std::fs::read(path)
std_fs_read-->>load_modified: raw XML bytes
load_modified->>modify_xml: modify_xml(text, tag, value)
modify_xml-->>load_modified: modified String
load_modified-->>handle_open: modified Vec<u8>
deactivate load_modified
handle_open->>open_nul_fd: iohook::open_nul_fd
open_nul_fd-->>handle_open: fd (NUL handle)
handle_open-->>unlocker_irp_handler: 1 (success)
unlocker_irp_handler-->>iohook: Irp(Open) handled
iohook-->>Game: HANDLE (virtual XML)
Game->>CreateFileW: ReadFile / GetFileSizeEx
CreateFileW->>iohook: Irp(Read/Seek)
iohook->>unlocker_irp_handler: unlocker_irp_handler(Read/Seek)
unlocker_irp_handler-->>Game: data from FileState (modified XML)
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Co-authored-by: MoeGrid MoeGrid@users.noreply.github.com
实现由 @MoeGrid 提供,在此基础上进行了优化并代为提交
Summary by Sourcery
为 CHUNITHM 游戏内容添加一个内存中的 XML 解锁器,并公开必要的平台 API 以支持该功能。
New Features:
Enhancements:
Documentation:
Original summary in English
Summary by Sourcery
Add an in-memory XML unlocker for CHUNITHM game content and expose necessary platform APIs to support it.
New Features:
Enhancements:
Documentation:
Summary by cubic
新增内存 XML 全解功能。拦截只读打开并返回改写后的内容,解锁角色、乐曲、铭牌、语音、活动、小人、称号,且不改磁盘文件。
packages/applechu/src/unlocker,接入iohook拦截CreateFileW/ReadFile,并 hookGetFileSize/GetFileSizeEx,用NUL句柄占位、从内存模拟 Read/Seek。Unlocker分项开关:unlockChara,unlockMusic,unlockNamePlate,unlockSystemVoice,unlockEvent,unlockMapIcon,unlockTrophy。platform::winapi以便路径处理;更新README.md说明此功能。Written for commit 511c2a0. Summary will update on new commits.