Skip to content

add 1-10k#201

Merged
AiAe merged 1 commit into
Quaver:masterfrom
Warp9000:10k
Jun 9, 2025
Merged

add 1-10k#201
AiAe merged 1 commit into
Quaver:masterfrom
Warp9000:10k

Conversation

@Warp9000

@Warp9000 Warp9000 commented Jun 6, 2025

Copy link
Copy Markdown
Member

No description provided.

@Warp9000 Warp9000 mentioned this pull request Jun 6, 2025
@Warp9000 Warp9000 marked this pull request as ready for review June 9, 2025 18:31
@AiAe AiAe requested a review from Copilot June 9, 2025 18:32

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull Request Overview

This PR adds support for additional key modes, allowing maps to support between 1 and 10 keys. Key changes include refactoring key-bindings in the virtual replay player, updating key press state enums, and modifying helper methods for mode conversion and key count calculations.

Reviewed Changes

Copilot reviewed 9 out of 9 changed files in this pull request and generated no comments.

Show a summary per file
File Description
Quaver.API/Replays/Virtual/VirtualReplayPlayer.cs Refactored virtual key binding logic to use a dynamic key count and updated scratch key handling
Quaver.API/Replays/ReplayKeyPressState.cs Extended the ReplayKeyPressState enum to include additional keys
Quaver.API/Replays/Replay.cs Simplified key lane conversion and updated key flag handling logic
Quaver.API/Maps/Qua.cs Modified key count calculation using the new ModeHelper function
Quaver.API/Maps/Processors/Difficulty/Rulesets/Keys/DifficultyProcessorKeys.cs Refactored hand and finger mapping logic based on dynamic key count
Quaver.API/Maps/Parsers/OsuBeatmap.cs Updated key count validation and game mode conversion logic
Quaver.API/Maps/Parsers/Malody/MalodyFile.cs Updated game mode determination using ModeHelper
Quaver.API/Helpers/ModeHelper.cs Added support for new game modes and key count conversions
Quaver.API/Enums/GameMode.cs Added new game mode values for 1-10 keys
Comments suppressed due to low confidence (3)

Quaver.API/Replays/Virtual/VirtualReplayPlayer.cs:105

  • The approach adds 2 to keyCount for scratch keys, whereas in Qua.GetKeyCount scratch is added as 1, creating an inconsistency. Consider reviewing and harmonizing scratch key handling across modules.
if (map.HasScratchKey) keyCount += 2; // Scratch can be pressed by 2 keys

Quaver.API/Replays/Replay.cs:386

  • Consider adding input validation to ensure that 'lane' falls within the expected range to avoid producing an invalid key press state.
public static ReplayKeyPressState KeyLaneToPressState(int lane) => (ReplayKeyPressState)(1 << (lane - 1));

Quaver.API/Maps/Processors/Difficulty/Rulesets/Keys/DifficultyProcessorKeys.cs:91

  • [nitpick] The bitwise calculation for determining FingerState in even key counts is non-obvious. Consider adding inline comments to explain the rationale behind the bit shifting logic.
return (FingerState)(1 << (half - lane));

@AiAe AiAe merged commit 7538eb8 into Quaver:master Jun 9, 2025
1 of 2 checks passed
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.

3 participants