Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 12 additions & 8 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,21 +20,24 @@ jobs:
matrix:
label:
- Stable
- Unstable
- Legacy
- Unknown
include:
- label: Stable
postfix: _stable
target: wasm32-wasip1
features: '""'
- label: Unstable
postfix: _unstable
features: '--features "split-index"'
sleep: 0
- label: Legacy
postfix: _legacy
target: wasm32-wasip1
features: '"unstable"'
features: '--no-default-features'
sleep: 10
- label: Unknown
postfix: _unknown
target: wasm32-unknown-unknown
features: '""'
features: '--no-default-features'
sleep: 20
steps:
- name: Checkout Commit
uses: actions/checkout@v4
Expand All @@ -47,12 +50,13 @@ jobs:

- name: Build
run: |
cargo release --locked --target ${{matrix.target}} --features ${{ matrix.features }}
cargo release --locked --target ${{matrix.target}} ${{ matrix.features }}
ls -lh target/${{matrix.target}}/release/hollowknight_autosplit_wasm.wasm

- name: Prepare Release
run: |
cp target/${{matrix.target}}/release/hollowknight_autosplit_wasm.wasm hollowknight_autosplit_wasm${{ matrix.postfix }}.wasm
ls -lh hollowknight_autosplit_wasm${{ matrix.postfix }}.wasm
sleep ${{matrix.sleep}}

- name: Release
if: startsWith(github.ref, 'refs/tags/')
Expand Down
3 changes: 2 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,8 @@ dlmalloc = { version = "0.2.8", features = ["global"] }
serde_json = { version = "1" }

[features]
unstable = ["asr/split-index"]
default = ["split-index"]
split-index = ["asr/split-index"]

[lib]
crate-type = ["cdylib", "lib"]
Expand Down
26 changes: 0 additions & 26 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -89,11 +89,6 @@ check the `Use Layout` checkbox, click `Browse` next to that,
and navigate to the Layout file from before.
Select it and click `Ok`.

Finally, do not manually split or skip while running with this autosplitter,
unless either it's explicitly marked as `ManualSplit` or it's the end-split.
Don't manually split, skip, or undo splits in any other situation.
The autosplitter will not know that you did that, and the autosplitter's state will be out of sync with LiveSplit's state.

## Instructions for OBS LiveSplit One

OBS LiveSplit One works best on Windows or Linux.
Expand Down Expand Up @@ -162,21 +157,6 @@ Right-click or Control-click for the context menu:
- Compare Against: Game Time.
- Settings: Configure the hotkeys you want.

Finally, do not manually split or skip while running with this autosplitter,
unless either it's explicitly marked as `ManualSplit` or it's the end-split.
Don't manually split, skip, or undo splits in any other situation.
The autosplitter will not know that you did that,
and the autosplitter's state will be out of sync with LiveSplit One Druid's state.

### Unstable version for LiveSplit One Druid only

If you're only going to use this auto-splitter with LiveSplit One Druid 0.4.1 or later,
you can download the `hollowknight_autosplit_wasm_unstable.wasm` file from the
[Latest Release](https://github.com/AlexKnauth/hollowknight-autosplit-wasm/releases/latest),
instead of the stable version.

The unstable version works with manual split/skip/undo when used with LiveSplit One Druid, but it will crash if you try to use it with any other timer.

## Instructions for livesplit-one-desktop

Note: The main `livesplit-one-desktop` repository might not
Expand Down Expand Up @@ -242,12 +222,6 @@ cargo build --release
sudo ./target/release/livesplit-one
```

Finally, do not manually split or skip while running with this autosplitter,
unless either it's explicitly marked as `ManualSplit` or it's the end-split.
Don't manually split, skip, or undo splits in any other situation.
The autosplitter will not know that you did that,
and the autosplitter's state will be out of sync with `livesplit-one-desktop`'s state.

The keyboard shortcuts of `livesplit-one-desktop` assume the Qwerty keyboard layout,
so you may need to press where the key would be if you were using Qwerty.
For example to save splits is "Control S" on Qwerty, but on a Dvorak keyboard,
Expand Down
6 changes: 3 additions & 3 deletions src/timer.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#[cfg(feature = "unstable")]
#[cfg(feature = "split-index")]
use alloc::format;

use asr::timer::TimerState;
Expand Down Expand Up @@ -132,7 +132,7 @@ impl Timer {

pub fn update<R: Resettable>(&mut self, r: &mut R) {
self.update_state(r);
#[cfg(feature = "unstable")]
#[cfg(feature = "split-index")]
self.update_index();
}

Expand Down Expand Up @@ -172,7 +172,7 @@ impl Timer {
self.last_state = asr_state;
}

#[cfg(feature = "unstable")]
#[cfg(feature = "split-index")]
fn update_index(&mut self) -> Option<()> {
let asr_index = maybe_timer_current_split_index()?;
if asr_index == self.last_split_index {
Expand Down
2 changes: 1 addition & 1 deletion src/unstable.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
/// finished, but has not been reset. So you need to be careful when using
/// this value for indexing.
pub fn maybe_timer_current_split_index() -> Option<i32> {
#[cfg(feature = "unstable")]
#[cfg(feature = "split-index")]
return Some(asr::timer::current_split_index().map_or(-1, |i| i as i32));
#[allow(unreachable_code)]
None
Expand Down
Loading