diff options
| author | Freya Murphy <freya@freyacat.org> | 2025-11-22 00:12:34 -0500 |
|---|---|---|
| committer | Freya Murphy <freya@freyacat.org> | 2025-11-22 00:12:34 -0500 |
| commit | 696ab0aadc346f1046f35419a558c291097c521f (patch) | |
| tree | 765e4486310a8968fca5b71570eb023fe44b1644 /graphics/src/audio/parse/lex.rs | |
| parent | audio: create orchestration system (diff) | |
| download | DungeonCrawl-696ab0aadc346f1046f35419a558c291097c521f.tar.gz DungeonCrawl-696ab0aadc346f1046f35419a558c291097c521f.tar.bz2 DungeonCrawl-696ab0aadc346f1046f35419a558c291097c521f.zip | |
audio: add temp changing
Diffstat (limited to 'graphics/src/audio/parse/lex.rs')
| -rw-r--r-- | graphics/src/audio/parse/lex.rs | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/graphics/src/audio/parse/lex.rs b/graphics/src/audio/parse/lex.rs index f2500da..a349c53 100644 --- a/graphics/src/audio/parse/lex.rs +++ b/graphics/src/audio/parse/lex.rs @@ -13,6 +13,7 @@ pub enum Token { LineSeparator, Pause(usize), Jump(usize), + Tempo(u32), ChanSpec(ChanSpec), SetVolume(u8), SetPitch(u8), @@ -96,11 +97,11 @@ impl<'s> Lexer<'s> { }?; let off = match self.peek()? { - 's' => { + '#' => { self.next()?; 1 } - 'f' => { + 'b' => { self.next()?; -1 } @@ -178,6 +179,8 @@ impl<'s> Lexer<'s> { '-' => self.next_pause()?, // jump 'j' => T::Jump(self.next_int()?), + // tempO + 'o' => T::Tempo(self.next_int()?), // eof '\0' => T::Eof, // new line |