qua

package
v0.0.0-...-b901195 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 2, 2025 License: AGPL-3.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Bookmark

type Bookmark struct {
	StartTime int    `yaml:"StartTime"`
	Note      string `yaml:"Note"`
}

type CustomAudioSample

type CustomAudioSample struct {
	Path             string `yaml:"Path"`
	UnaffectedByRate bool   `yaml:"UnaffectedByRate"`
}

type EditorLayer

type EditorLayer struct {
	Name     string `yaml:"Name"`
	Hidden   bool   `yaml:"Hidden"`
	ColorRGB string `yaml:"ColorRgb"`
}

type HitObject

type HitObject struct {
	StartTime   int        `yaml:"StartTime"`
	Lane        int        `yaml:"Lane"`
	EndTime     int        `yaml:"EndTime"`
	HitSound    string     `yaml:"HitSound"`
	KeySounds   []KeySound `yaml:"KeySounds"`
	EditorLayer int        `yaml:"EditorLayer"`
}

func (HitObject) IsLongNote

func (h HitObject) IsLongNote() bool

IsLongNote Returns if the hit object is a long note

type KeySound

type KeySound struct {
	Sample int `yaml:"Sample"`
	Volume int `yaml:"Volume"`
}

type Qua

type Qua struct {
	RawBytes                       []byte           `yaml:"-"`
	AudioFile                      string           `yaml:"AudioFile"`
	SongPreviewTime                int              `yaml:"SongPreviewTime"`
	BackgroundFile                 string           `yaml:"BackgroundFile"`
	BannerFile                     string           `yaml:"BannerFile"`
	MapId                          int              `yaml:"MapId"`
	MapSetId                       int              `yaml:"MapSetId"`
	RawMode                        string           `yaml:"Mode"`
	Mode                           enums.GameMode   `yaml:"-"`
	Title                          string           `yaml:"Title"`
	Artist                         string           `yaml:"Artist"`
	Source                         string           `yaml:"Source"`
	Tags                           string           `yaml:"Tags"`
	Creator                        string           `yaml:"Creator"`
	DifficultyName                 string           `yaml:"DifficultyName"`
	Description                    string           `yaml:"Description"`
	Genre                          string           `yaml:"Genre"`
	LegacyLNRendering              bool             `yaml:"LegacyLNRendering"`
	BPMDoesNotAffectScrollVelocity bool             `yaml:"BPMDoesNotAffectScrollVelocity"`
	InitialScrollVelocity          float32          `yaml:"InitialScrollVelocity"`
	HasScratchKey                  bool             `yaml:"HasScratchKey"`
	EditorLayers                   []EditorLayer    `yaml:"EditorLayers"`
	Bookmarks                      []Bookmark       `yaml:"Bookmarks"`
	SoundEffects                   []SoundEffect    `yaml:"SoundEffects"`
	TimingPoints                   []TimingPoint    `yaml:"TimingPoints"`
	ScrollVelocities               []ScrollVelocity `yaml:"SliderVelocities"`
	HitObjects                     []HitObject      `yaml:"HitObjects"`
}

func Parse

func Parse(file []byte) (*Qua, error)

Parse Parses and returns a Qua file

func (*Qua) CommonBPM

func (q *Qua) CommonBPM() float32

CommonBPM Returns the most common BPM in the map

func (*Qua) CountHitObjectLong

func (q *Qua) CountHitObjectLong() int

CountHitObjectLong Returns the count of long notes in the map

func (*Qua) CountHitObjectNormal

func (q *Qua) CountHitObjectNormal() int

CountHitObjectNormal Returns the count of normal hit objects in the map

func (*Qua) FileName

func (q *Qua) FileName() string

FileName Returns the file name of the qua (map_id.qua)

func (*Qua) MapLength

func (q *Qua) MapLength() int

MapLength Returns the length of the map

func (*Qua) MaxCombo

func (q *Qua) MaxCombo() int

MaxCombo Returns the max combo achievable in the map

func (*Qua) ReplaceIds

func (q *Qua) ReplaceIds(mapsetId int, mapId int) string

ReplaceIds Replaces the ids of the map and sets Qua.RawBytes. Returns a string of the new file.

func (*Qua) Write

func (q *Qua) Write(path string) error

Writes the .qua to a file

type ScrollVelocity

type ScrollVelocity struct {
	StartTime  float32 `yaml:"StartTime"`
	Multiplier float32 `yaml:"Multiplier"`
}

type SoundEffect

type SoundEffect struct {
	StartTime float32 `yaml:"StartTime"`
	Sample    int     `yaml:"Sample"`
	Volume    int     `yaml:"Volume"`
}

type TimingPoint

type TimingPoint struct {
	StartTime     float32 `yaml:"StartTime"`
	BPM           float32 `yaml:"Bpm"`
	TimeSignature string  `yaml:"TimeSignature"`
	Hidden        bool    `yaml:"Hidden"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL