fix all warnings
This commit is contained in:
parent
e5e2ccfc6b
commit
8e04d74682
3 changed files with 6 additions and 6 deletions
6
build.rs
6
build.rs
|
@ -122,16 +122,16 @@ impl AssetsWriter {
|
||||||
writeln!(file, "{indent}impl Assets {{")?;
|
writeln!(file, "{indent}impl Assets {{")?;
|
||||||
writeln!(
|
writeln!(
|
||||||
file,
|
file,
|
||||||
"{indent}\tpub fn load(c: &mut comfy::EngineContext<'_>) {{"
|
"{indent}\tpub fn load(_ctx: &mut comfy::EngineContext<'_>) {{"
|
||||||
)?;
|
)?;
|
||||||
for asset_const_name in root.assets.values() {
|
for asset_const_name in root.assets.values() {
|
||||||
writeln!(file, "{indent}\t\tc.load_texture_from_bytes({asset_const_name:?}, {asset_const_name});")?;
|
writeln!(file, "{indent}\t\t_ctx.load_texture_from_bytes({asset_const_name:?}, {asset_const_name});")?;
|
||||||
}
|
}
|
||||||
for asset_const_name in root.sound_assets.values() {
|
for asset_const_name in root.sound_assets.values() {
|
||||||
writeln!(file, "{indent}\t\tcomfy::load_sound_from_bytes({asset_const_name:?}, {asset_const_name}, Default::default());")?;
|
writeln!(file, "{indent}\t\tcomfy::load_sound_from_bytes({asset_const_name:?}, {asset_const_name}, Default::default());")?;
|
||||||
}
|
}
|
||||||
for group_name in root.groups.keys() {
|
for group_name in root.groups.keys() {
|
||||||
writeln!(file, "{indent}\t\t{group_name}::Assets::load(c);")?;
|
writeln!(file, "{indent}\t\t{group_name}::Assets::load(_ctx);")?;
|
||||||
}
|
}
|
||||||
writeln!(file, "{indent}\t}}")?;
|
writeln!(file, "{indent}\t}}")?;
|
||||||
writeln!(file, "{indent}}}")?;
|
writeln!(file, "{indent}}}")?;
|
||||||
|
|
|
@ -2,7 +2,7 @@ use super::{furniture::Furniture, grid::Grid};
|
||||||
use crate::game;
|
use crate::game;
|
||||||
use comfy::{
|
use comfy::{
|
||||||
draw_rect, draw_rect_outline, draw_sprite, error, random_i32, vec2, EngineContext,
|
draw_rect, draw_rect_outline, draw_sprite, error, random_i32, vec2, EngineContext,
|
||||||
HashSet, Index, RandomRange as _, Vec2, GREEN, PURPLE, RED, WHITE
|
HashSet, RandomRange as _, Vec2, GREEN, PURPLE, RED, WHITE
|
||||||
};
|
};
|
||||||
use indexmap::IndexSet;
|
use indexmap::IndexSet;
|
||||||
|
|
||||||
|
|
|
@ -4,8 +4,8 @@ use crate::{
|
||||||
State
|
State
|
||||||
};
|
};
|
||||||
use comfy::{
|
use comfy::{
|
||||||
draw_circle, draw_rect_outline, draw_sprite, error, info, is_key_down,
|
draw_rect_outline, draw_sprite, error, info, is_key_down, main_camera_mut,
|
||||||
main_camera_mut, texture_id, vec2, EngineContext, IVec2, KeyCode, Vec2, RED, WHITE
|
texture_id, vec2, EngineContext, IVec2, KeyCode, Vec2, RED, WHITE
|
||||||
};
|
};
|
||||||
use std::time::Instant;
|
use std::time::Instant;
|
||||||
use worldgen::MovementCost;
|
use worldgen::MovementCost;
|
||||||
|
|
Loading…
Reference in a new issue