2021-07-22 05:59:25 +10:00
|
|
|
use std::collections::HashMap;
|
|
|
|
|
2022-08-12 06:16:26 +10:00
|
|
|
use crate::{Colour, Colours, TileSize};
|
2021-07-22 05:59:25 +10:00
|
|
|
|
2021-07-22 07:07:09 +10:00
|
|
|
pub(crate) trait Config {
|
2021-07-22 05:59:25 +10:00
|
|
|
fn crate_prefix(&self) -> String;
|
|
|
|
fn images(&self) -> HashMap<String, &dyn Image>;
|
2022-10-09 02:43:25 +11:00
|
|
|
fn transparent_colour(&self) -> Option<Colour>;
|
2021-07-22 05:59:25 +10:00
|
|
|
}
|
|
|
|
|
2021-07-22 07:07:09 +10:00
|
|
|
pub(crate) trait Image {
|
2021-07-22 05:59:25 +10:00
|
|
|
fn filename(&self) -> String;
|
2022-11-18 08:18:54 +11:00
|
|
|
fn tile_size(&self) -> TileSize;
|
2022-08-12 07:47:52 +10:00
|
|
|
fn colours(&self) -> Colours;
|
2021-07-22 05:59:25 +10:00
|
|
|
}
|