Skip to content

[+] 标题画面播放自定义视频#115

Open
WUGqnwvMQPzl wants to merge 4 commits intoMuNET-OSS:mainfrom
WUGqnwvMQPzl:title-video
Open

[+] 标题画面播放自定义视频#115
WUGqnwvMQPzl wants to merge 4 commits intoMuNET-OSS:mainfrom
WUGqnwvMQPzl:title-video

Conversation

@WUGqnwvMQPzl
Copy link
Contributor

No description provided.

@gemini-code-assist
Copy link

Summary of Changes

Hello @WUGqnwvMQPzl, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

此拉取请求引入了一个新模组,允许用户在游戏标题画面播放自定义的视频和音频文件。通过替换默认的标题动画,它为玩家提供了更丰富的个性化选项,并旨在重现旧版本游戏中曾有的标题视频功能。该模组通过HarmonyLib对游戏广告流程进行修改,以实现视频和音频的无缝集成和管理。

Highlights

  • 自定义标题视频播放: 实现了在标题画面播放自定义视频和音频的功能,允许用户替换默认的标题动画。
  • HarmonyLib 集成: 通过 HarmonyLib 对 AdvertiseProcessAdvertiseMonitor 的多个方法进行修补,以集成自定义视频播放逻辑。
  • 原版元素禁用: 在自定义视频播放时,禁用了原版标题画面的UI元素和声音,以避免冲突并提供无缝体验。
  • 资源管理: 包含了视频和音频文件的加载、准备、播放和卸载逻辑,并处理了加载失败的情况,确保资源正确释放。
  • 版本兼容性: 考虑了不同游戏版本(如26000及以上)的兼容性,例如禁用特定UI元素。
Changelog
  • AquaMai.Mods/Fancy/TitleScreenVideo.cs
    • 新增了 TitleScreenVideo 类,用于管理自定义标题视频的播放逻辑。
Activity
  • 目前没有记录到任何活动。
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

这个 PR 实现了一个很棒的功能,允许在标题画面播放自定义视频。代码结构清晰,并利用 Harmony 来修改游戏行为,实现了预期的效果。

在代码审查中,我发现了一些可以改进的地方,主要集中在并发处理、资源管理和代码健壮性方面。具体来说,存在一个关于视频准备状态的竞态条件,可能会导致不稳定的行为;还有一个小的内存泄漏问题,与动态创建的材质有关。此外,一些硬编码的值和口语化的注释也可以优化,以提高代码的可读性和可维护性。

请查看我提出的具体建议,这些修改将有助于提高这个功能的稳定性和代码质量。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant

Comments