Skip to content

Commit

Permalink
fix: docs formatting (#27)
Browse files Browse the repository at this point in the history
  • Loading branch information
piotrmacha authored May 24, 2024
1 parent bb69101 commit a4a0381
Show file tree
Hide file tree
Showing 5 changed files with 63 additions and 68 deletions.
4 changes: 3 additions & 1 deletion docs/docs/developer-guide/architecture/index.md
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
# Architecture
# Architecture

TBA
7 changes: 3 additions & 4 deletions docs/docs/developer-guide/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,13 @@ It explains the architecture of the system, how to build it, and how to extend i
## Setup Project

!!! info "CMake vs IDE"
The setup instructions assume no IDE is used, and CMake is called from the command line.
If you use Visual Studio, CLion or any other IDE, you can use the CMake integration from it.
The setup instructions assume no IDE is used, and CMake is called from the command line.
If you use Visual Studio, CLion or any other IDE, you can use the CMake integration from it.

### Fork Repository

Unless you are an internal contributor, you can't push directly to the repository, so you have to fork it first.
To do it, click the "Fork" button in the top right corner of
the [repository page](https://github.com/Silver-Ore-Team/zBassMusic).
To do it, click the "Fork" button in the top right corner of the [repository page](https://github.com/Silver-Ore-Team/zBassMusic).

### Clone Repository

Expand Down
46 changes: 23 additions & 23 deletions docs/docs/developer-guide/style-guide/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,31 +5,31 @@
Use `.clang-format` to format your code. You can find the configuration file in the root of the repository.

??? info "Naming Rules"
* use `UPPERCASE` for constants, macros, and preprocessor directives
* use `PascalCase` for classes, structs, enums, and namespaces
* use `PascalCase` for methods and properties
* use `PascalCase` for functions
* use `kebabCase` for local variables
* prefix private fields with `m_`
* prefix static fields with `s_`
* prefix static variables with `s_`
* prefix global variables with `g_`
* use `UPPERCASE` for constants, macros, and preprocessor directives
* use `PascalCase` for classes, structs, enums, and namespaces
* use `PascalCase` for methods and properties
* use `PascalCase` for functions
* use `kebabCase` for local variables
* prefix private fields with `m_`
* prefix static fields with `s_`
* prefix static variables with `s_`
* prefix global variables with `g_`

??? info "Other Rules"
* use `#pragma once` instead of include guards
* use the same namespace as the folder structure
* excluding `Gothic` directory which has `GOTHIC_NAMESPACE` defined (subdirectories should use new namespace)
* excluding `Hooks.hpp` files, which may need `GOTHIC_NAMESPACE` to implement member functions
* prefer single class per file
* use the same file name as the class name
* use `#pragma region` and `#pragma endregion` to group related code for bigger files
* don't use `using namespace` in header files
* can use `using namespace` in source files
* don't use `using namespace std` in any file
* avoid use `using namespace X;` where X is a namespace of vendor code
* can use `using namespace X;` where X is the project namespace

## Design Principles
* use `#pragma once` instead of include guards
* use the same namespace as the folder structure
* excluding `Gothic` directory which has `GOTHIC_NAMESPACE` defined (subdirectories should use new namespace)
* excluding `Hooks.hpp` files, which may need `GOTHIC_NAMESPACE` to implement member functions
* prefer single class per file
* use the same file name as the class name
* use `#pragma region` and `#pragma endregion` to group related code for bigger files
* don't use `using namespace` in header files
* can use `using namespace` in source files
* don't use `using namespace std` in any file
* avoid use `using namespace X;` where X is a namespace of vendor code
* can use `using namespace X;` where X is the project namespace

## Design Principles

### Separation of Concerns

Expand Down
32 changes: 16 additions & 16 deletions docs/docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,37 +27,37 @@ The most important features include:

<div class="grid cards" markdown>

- ::octicons-rocket-16:{ .lg .middle } __Release Builds__
- ::octicons-rocket-16:{ .lg .middle } __Release Builds__

---
---

Release builds are ready to be used in Gothic and we publish them automatically on our GitHub.
Release builds are ready to be used in Gothic and we publish them automatically on our GitHub.

[:octicons-arrow-right-24: Releases](https://github.com/Silver-Ore-Team/zBassMusic/releases)
[:octicons-arrow-right-24: Releases](https://github.com/Silver-Ore-Team/zBassMusic/releases)

- :fontawesome-brands-github:{ .lg .middle } __Source Code__
- :fontawesome-brands-github:{ .lg .middle } __Source Code__

---
---

zBassMusic is open source and you can access the code on our public repo hosted by GitHub.
zBassMusic is open source and you can access the code on our public repo hosted by GitHub.

[:octicons-arrow-right-24: GitHub](https://github.com/Silver-Ore-Team/zBassMusic)
[:octicons-arrow-right-24: GitHub](https://github.com/Silver-Ore-Team/zBassMusic)

- :fontawesome-solid-bug:{ .lg .middle } __Bug Reporting__
- :fontawesome-solid-bug:{ .lg .middle } __Bug Reporting__

---
---

If you have found a bug in zBassMusic, please create an issue on GitHub and tell us what's wrong.
If you have found a bug in zBassMusic, please create an issue on GitHub and tell us what's wrong.

[:octicons-arrow-right-24: Issues](https://github.com/Silver-Ore-Team/zBassMusic/issues)
[:octicons-arrow-right-24: Issues](https://github.com/Silver-Ore-Team/zBassMusic/issues)

- :fontawesome-regular-message:{ .lg .middle } __Discussions__
- :fontawesome-regular-message:{ .lg .middle } __Discussions__

---
---

We listen to ideas for new features, so if something is missing from zBassMusic, let us know and we'll do it.
We listen to ideas for new features, so if something is missing from zBassMusic, let us know and we'll do it.

[:octicons-arrow-right-24: Discussions](https://github.com/Silver-Ore-Team/zBassMusic/discussions)
[:octicons-arrow-right-24: Discussions](https://github.com/Silver-Ore-Team/zBassMusic/discussions)

</div>

Expand Down
42 changes: 18 additions & 24 deletions docs/docs/roadmap/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,29 +15,24 @@ hide:
## Done

### Core functions

??? success "Music Engine (v0.1.0)"
Music engine capable of replacing the original DM system in the scope of playing audio and switching songs based on game
events.
Music engine capable of replacing the original DM system in the scope of playing audio and switching songs based on game events.

??? success "Daedalus API for controlling playback (v0.1.0)"
External functions to take control over music scheduling in Daedalus scripts. API is stable and shouldn't introduce any
breaking changes.
External functions to take control over music scheduling in Daedalus scripts. API is stable and shouldn't introduce any breaking changes.

??? success "Simple crossfade (v0.1.0)"
Every music theme can opt-in for simple fade-in and fade-out transitions to smoothly crossfade changing themes. The
crossfade time is
set globally and the transition starts instantly after receiving an event from the game.
Every music theme can opt-in for simple fade-in and fade-out transitions to smoothly crossfade changing themes. The crossfade time is
set globally and the transition starts instantly after receiving an event from the game.


## In Progress
## In Progress

### Transition Scheduler
### Transition Scheduler

??? info "Transition Scheduler (v0.2.x)"
Scheduler for executing advanced transitions between songs based on defined rules. The system should be flexible and
offer different
transition effects behind an easy-to-use interface. The artist should be able to define rules with high precision (soft
goal: <10ms latency).
Scheduler for executing advanced transitions between songs based on defined rules. The system should be flexible and offer different
transition effects behind an easy-to-use interface. The artist should be able to define rules with high precision (soft goal: <10ms latency).

??? success "Instant Transition (Done)"
Default transition starts the effect instantly after receiving an event from the game.
Expand All @@ -51,27 +46,26 @@ goal: <10ms latency).
normal can play some theme to emphasize the end of a fight.

??? info "MIDI bridge for Transition Scheduler (v0.2.x)"
The MIDI format is the best option for defining rules for the Transition Scheduler. The composer can just
put all the information about the transitions as MIDI events on some muted track in DAW and export it to the plugin.
The composer uses a tool he knows, and we can extract precise information from the MIDI file perfectly synchronized
with the music.
The MIDI format is the best option for defining rules for the Transition Scheduler. The composer can just
put all the information about the transitions as MIDI events on some muted track in DAW and export it to the plugin.
The composer uses a tool he knows, and we can extract precise information from the MIDI file perfectly synchronized
with the music.

The bridge defines a spec how to interpret MIDI events and how they map to the internal structures of the Transition Scheduler.
Then the bridge can load MIDI files and provide the rules to the scheduler.

## Future Plans

??? question "New features?"
We still may plan to implement some new features if they can provide value.
We still may plan to implement some new features if they can provide value.

??? danger "Support late injection"
Right now the plugin hooks early into Gothic initialization to set itself up and replace the `zmusic` pointer with a
custom implementation.
We should add support for late initialization and let the plugin be loaded by Daedalus/Ikaus scripts.
Right now the plugin hooks early into Gothic initialization to set itself up and replace the `zmusic` pointer with a custom implementation.
We should add support for late initialization and let the plugin be loaded by Daedalus/Ikaus scripts.

??? danger "Complete Product Release (v1.0.0)"
Before we release version v1.0.0 and mark zBassMusic as a finished product, we need to:

Before we release version v1.0.0 and mark zBassMusic as a finished product, we need to:
* finish all the features in the backlog
* battle-test the system by having it work in multiple released Gothic mods
* fix all bugs and crashes that have a meaningful probability of causing Access Violations on players' games

0 comments on commit a4a0381

Please sign in to comment.