Skip to content

CSDotNET0211/fumen-rs

Repository files navigation

fumen-rs

fumen-rs

fumen-rs

Table of Contents

Features

Assistance with Bots The application supports custom bot integration, allowing you to analyze scenarios using bots. By default, the application includes `cold-clear.dll` for analysis. Refer to the [Adding Bot DLLs](#adding-bot-dlls) section for detailed instructions on adding your own bots.
Online Fumen Analysis Share and collaboratively edit fumen in real-time.
Fumen Image Recognition Basic image recognition capabilities for fumen analysis. Currently, only PPT default images are supported, with more images under development. fumen-rs
Compatible with Fumen Fully compatible with the fumen format, enabling seamless integration and analysis of fumen data. fumen-rs
History Tracking Keep track of your edit history within the application. This feature allows you to undo and redo.

Installation Instructions

Portable Version

For the portable version, you need to install WebView2. You can download it from the official Microsoft website: WebView2 Runtime.

Installer Version

For the installer version, simply run the installer. The application will be installed in the following directory:

%LOCALAPPDATA%\fumen-rs

Changing Block Images

To change the block images, replace the files in the assets/images folder located in the installation directory.

assets\images

After replacing the images, restart the application to apply the changes.

Directory Structure

The following is an overview of the project's directory structure:

  • src/components/: Components related to the UI display.
  • src/registry/: Registration of commands and shortcuts loaded at startup.
  • src/routes/: Window management.
  • src/translations/: Language translations.

for Developers

Adding Bot DLLs

To add custom bot DLLs:

  1. Implement the bot logic in a DLL file. For example, you can use the following function signature for a bot search function.
  2. Place the DLL files in the assets/bots/ directory.
  3. Restart the application to load the new bots.
How to make DLLs
unsafe extern "C" fn cc_search(
  field: *const std::os::raw::c_char,
  hold: *const std::os::raw::c_char,
  b2b: bool,
  combo: u32,
  pieces: *const std::os::raw::c_char,
  incoming: u32,
  result: *mut [u8; 9])
  • field: A pointer to the current field state as a C-style string.
    Example:
    "10111111110001111111100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"

  • hold: A pointer to the hold piece as a C-style string.
    Example:
    "t" (or "empty" if no piece is held)

  • b2b: A boolean indicating whether the back-to-back bonus is active.
    Example: true

  • combo: The current combo count.
    Example: 3

  • pieces: A pointer to the sequence of upcoming pieces as a C-style string.
    Example: "szjltoi"

  • incoming: The number of incoming garbage lines.
    Example: 5

  • result: A mutable pointer to an array where the bot's decision block status will be stored.
    [minoType, block1 x, block1 y, block2 x, block2 y, block3 x, block3 y, block4 x, block4 y]

Adding Image Recognition

Under construction.
only ppt default image is supported.

License

This project is licensed under the MIT License. See the LICENSE file for details.

Contact

For questions or discussions, join our Discord server: Discord Invite Link.

Support

If you enjoy this project and want to support its development, consider buying me a coffee on Ko-fi
Buy Me a Coffee at ko-fi.com

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published