Skip to content

hpmor-game/rust-dlg

Folders and files

NameName
Last commit message
Last commit date

Latest commit

29c3adb · Aug 17, 2022

History

25 Commits
Aug 15, 2022
Aug 15, 2022
Aug 17, 2022
Aug 17, 2022
Aug 15, 2022
Aug 17, 2022
Jul 23, 2022
Aug 15, 2022
Aug 15, 2022
Aug 17, 2022
Aug 17, 2022
Aug 15, 2022
Aug 15, 2022

Repository files navigation

DLG

Нереальный парсер и проигрыватель диалогов формата .dlg

Сборка и запуск

  1. Качаем Rust
  2. Для запуска вызываем cargo run
  3. Для сборки вызываем cargo build

Example

static RAW_DIALOG: &'static str = r"
Alice came into the room and waved her hand

@alice Hi, Bob!

@bob Hi!

@alice What are you going to do?

:menu What should I say to her?
:opt(#walk) I'm going to go for a walk
:opt(#sleep) I want to sleep


#walk

@alice Great! May I come with you?

@bob Sure!

You went for a walk and had a good time


#sleep

@alice Oh, okay. Then I'll come back later. Sweet dreams

@bob Are made of this...
";

fn main() { 
    let dialog = Dialog::from_str(RAW_DIALOG).expect("can't parse dialog");
}

About

Parser for .dlg files

Topics

Resources

License

MIT, Apache-2.0 licenses found

Licenses found

MIT
LICENCE-MIT
Apache-2.0
LICENSE-APACHE

Stars

Watchers

Forks

Releases

No releases published

Languages