1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
#[macro_use]
extern crate log;
mod after_level;
mod animation;
mod before_level;
mod buildings;
mod controls;
mod game;
mod levels;
mod meters;
mod movement_v2;
mod music;
mod session;
mod title;
mod vehicles;
type App = map_gui::SimpleApp<session::Session>;
type Transition = widgetry::Transition<App>;
pub fn main() {
widgetry::run(widgetry::Settings::new("experiment"), |ctx| {
let mut opts = map_gui::options::Options::default();
opts.color_scheme = map_gui::colors::ColorSchemeChoice::NightMode;
let mut app = map_gui::SimpleApp::new_with_opts(
ctx,
abstutil::CmdArgs::new(),
opts,
session::Session::load(),
);
if app.opts.dev {
app.session.unlock_all();
}
app.session.music = music::Music::start(ctx, app.session.play_music);
let states = vec![title::TitleScreen::new(ctx, &app)];
(app, states)
});
}
#[cfg(target_arch = "wasm32")]
use wasm_bindgen::prelude::*;
#[cfg(target_arch = "wasm32")]
#[wasm_bindgen(start)]
pub fn run() {
main();
}