diff --git a/Cargo.lock b/Cargo.lock index 73868b2..00daf50 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2,24 +2,12 @@ # It is not intended for manual editing. version = 3 -[[package]] -name = "ab_glyph_rasterizer" -version = "0.1.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c71b1793ee61086797f5c80b6efa2b8ffa6d5dd703f118545808a7f2e27f7046" - [[package]] name = "adler" version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f26201604c87b1e01bd3d98f8d5d9a8fcbb815e8cedb41ffccbeb4bf593a35fe" -[[package]] -name = "adler32" -version = "1.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aae1277d39aeec15cb388266ecc24b11c80469deae6067e17a1a7aa9e5c1f234" - [[package]] name = "ahash" version = "0.3.8" @@ -28,32 +16,13 @@ checksum = "e8fd72866655d1904d6b0997d0b07ba561047d070fbe29de039031c641b61217" [[package]] name = "aho-corasick" -version = "1.0.2" +version = "1.0.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "43f6cb1bf222025340178f382c426f13757b2960e89779dfcb319c32542a5a41" +checksum = "0c378d78423fdad8089616f827526ee33c19f2fddbd5de1629152c9593ba4783" dependencies = [ "memchr", ] -[[package]] -name = "andrew" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8c4afb09dd642feec8408e33f92f3ffc4052946f6b20f32fb99c1f58cd4fa7cf" -dependencies = [ - "bitflags 1.3.2", - "rusttype", - "walkdir", - "xdg", - "xml-rs", -] - -[[package]] -name = "android_glue" -version = "0.2.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "000444226fcff248f2bc4c7625be32c63caccfecc2723a2b9f78a7487a49c407" - [[package]] name = "anes" version = "0.1.6" @@ -62,15 +31,15 @@ checksum = "4b46cbb362ab8752921c97e041f5e366ee6297bd428a31275b9fcf1e380f7299" [[package]] name = "anstyle" -version = "1.0.1" +version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3a30da5c5f2d5e72842e00bcb57657162cdabef0931f40e2deb9b4140440cecd" +checksum = "15c4c2c83f81532e5845a733998b6971faca23490340a418e9b72a3ec9de12ea" [[package]] name = "anyhow" -version = "1.0.71" +version = "1.0.75" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c7d0618f0e0b7e8ff11427422b64564d5fb0be1940354bfe2e0529b18a9d9b8" +checksum = "a4668cab20f66d8d020e1fbc0ebe47217433c1b6c8f2040faf858554e394ace6" [[package]] name = "arrayref" @@ -104,9 +73,9 @@ checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" [[package]] name = "bitflags" -version = "2.3.3" +version = "2.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "630be753d4e58660abd17930c71b647fe46c27ea6b63cc59e1e3851406972e42" +checksum = "b4682ae6287fcf752ecaabbfcc7b6f9b72aa33933dc23a554d853aea8eea8635" [[package]] name = "block" @@ -135,13 +104,12 @@ dependencies = [ [[package]] name = "bracket-color" -version = "0.8.2" +version = "0.8.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3c1d1b160817fb74eebedccd678055cd688d1a73dc1a14519fa30ff4c9a5bdee" +checksum = "7333827cf727ceb302cc4f638cc8befc87f5f1423873255d94cc0a24009e940a" dependencies = [ - "byteorder", "lazy_static", - "parking_lot 0.11.2", + "parking_lot 0.12.1", "serde", ] @@ -155,6 +123,16 @@ dependencies = [ "serde", ] +[[package]] +name = "bracket-embedding" +version = "0.8.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c1cb6747f25903066109a619e3d580ef5ff7b3ffc281fa51ece473e1396e2298" +dependencies = [ + "lazy_static", + "parking_lot 0.12.1", +] + [[package]] name = "bracket-embedding" version = "0.8.7" @@ -171,7 +149,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0f31b525fcd65027885f3a1e3a250a5dd397d70de4a6a5a125f03e0bef951499" dependencies = [ "serde", - "ultraviolet 0.9.1", + "ultraviolet", ] [[package]] @@ -180,7 +158,7 @@ version = "0.8.7" source = "git+https://github.com/amethyst/bracket-lib.git?rev=851f6f08675444fb6fa088b9e67bee9fd75554c6#851f6f08675444fb6fa088b9e67bee9fd75554c6" dependencies = [ "serde", - "ultraviolet 0.9.1", + "ultraviolet", ] [[package]] @@ -190,12 +168,12 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "43bbe13e39628e7f73673737c825001494dee7329cee8ee79dfeaa7cfd136dbf" dependencies = [ "bracket-algorithm-traits 0.8.7 (registry+https://github.com/rust-lang/crates.io-index)", - "bracket-color 0.8.2", + "bracket-color 0.8.7 (registry+https://github.com/rust-lang/crates.io-index)", "bracket-geometry 0.8.7 (registry+https://github.com/rust-lang/crates.io-index)", "bracket-noise 0.8.7 (registry+https://github.com/rust-lang/crates.io-index)", "bracket-pathfinding 0.8.7 (registry+https://github.com/rust-lang/crates.io-index)", "bracket-random 0.8.7 (registry+https://github.com/rust-lang/crates.io-index)", - "bracket-terminal 0.8.5", + "bracket-terminal 0.8.7 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -204,12 +182,12 @@ version = "0.8.7" source = "git+https://github.com/amethyst/bracket-lib.git?rev=851f6f08675444fb6fa088b9e67bee9fd75554c6#851f6f08675444fb6fa088b9e67bee9fd75554c6" dependencies = [ "bracket-algorithm-traits 0.8.7 (git+https://github.com/amethyst/bracket-lib.git?rev=851f6f08675444fb6fa088b9e67bee9fd75554c6)", - "bracket-color 0.8.7", + "bracket-color 0.8.7 (git+https://github.com/amethyst/bracket-lib.git?rev=851f6f08675444fb6fa088b9e67bee9fd75554c6)", "bracket-geometry 0.8.7 (git+https://github.com/amethyst/bracket-lib.git?rev=851f6f08675444fb6fa088b9e67bee9fd75554c6)", "bracket-noise 0.8.7 (git+https://github.com/amethyst/bracket-lib.git?rev=851f6f08675444fb6fa088b9e67bee9fd75554c6)", "bracket-pathfinding 0.8.7 (git+https://github.com/amethyst/bracket-lib.git?rev=851f6f08675444fb6fa088b9e67bee9fd75554c6)", "bracket-random 0.8.7 (git+https://github.com/amethyst/bracket-lib.git?rev=851f6f08675444fb6fa088b9e67bee9fd75554c6)", - "bracket-terminal 0.8.7", + "bracket-terminal 0.8.7 (git+https://github.com/amethyst/bracket-lib.git?rev=851f6f08675444fb6fa088b9e67bee9fd75554c6)", ] [[package]] @@ -237,7 +215,7 @@ checksum = "32ae7f2ebf242316ba10e84ca3b31af064b8c0c77402b2171a3104a2a77718fc" dependencies = [ "bracket-algorithm-traits 0.8.7 (registry+https://github.com/rust-lang/crates.io-index)", "bracket-geometry 0.8.7 (registry+https://github.com/rust-lang/crates.io-index)", - "num-rational 0.4.1", + "num-rational", "smallvec", ] @@ -248,7 +226,7 @@ source = "git+https://github.com/amethyst/bracket-lib.git?rev=851f6f08675444fb6f dependencies = [ "bracket-algorithm-traits 0.8.7 (git+https://github.com/amethyst/bracket-lib.git?rev=851f6f08675444fb6fa088b9e67bee9fd75554c6)", "bracket-geometry 0.8.7 (git+https://github.com/amethyst/bracket-lib.git?rev=851f6f08675444fb6fa088b9e67bee9fd75554c6)", - "num-rational 0.4.1", + "num-rational", "smallvec", ] @@ -283,41 +261,54 @@ dependencies = [ "wasm-bindgen", ] +[[package]] +name = "bracket-rex" +version = "0.8.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c4735d15070b98d0f07360d62914d1524679325019cae46c7af73637a6ef196a" +dependencies = [ + "bracket-color 0.8.7 (registry+https://github.com/rust-lang/crates.io-index)", + "bracket-embedding 0.8.7 (registry+https://github.com/rust-lang/crates.io-index)", + "byteorder", + "flate2", +] + [[package]] name = "bracket-rex" version = "0.8.7" source = "git+https://github.com/amethyst/bracket-lib.git?rev=851f6f08675444fb6fa088b9e67bee9fd75554c6#851f6f08675444fb6fa088b9e67bee9fd75554c6" dependencies = [ - "bracket-color 0.8.7", - "bracket-embedding", + "bracket-color 0.8.7 (git+https://github.com/amethyst/bracket-lib.git?rev=851f6f08675444fb6fa088b9e67bee9fd75554c6)", + "bracket-embedding 0.8.7 (git+https://github.com/amethyst/bracket-lib.git?rev=851f6f08675444fb6fa088b9e67bee9fd75554c6)", "byteorder", "flate2", ] [[package]] name = "bracket-terminal" -version = "0.8.5" +version = "0.8.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "460594df0b3364cae6ce5a5de4d787b293d20df0deffed4a942c10b1e3d50b1d" +checksum = "2493063cb676e2e9e3a3a630eee032a297e43c8a1cee08c94feaad3344ed0b46" dependencies = [ "anyhow", - "bracket-color 0.8.2", + "bracket-color 0.8.7 (registry+https://github.com/rust-lang/crates.io-index)", + "bracket-embedding 0.8.7 (registry+https://github.com/rust-lang/crates.io-index)", "bracket-geometry 0.8.7 (registry+https://github.com/rust-lang/crates.io-index)", - "byteorder", + "bracket-rex 0.8.7 (registry+https://github.com/rust-lang/crates.io-index)", "console_error_panic_hook", - "flate2", - "glow 0.10.0", - "glutin 0.26.0", - "image 0.23.14", + "glow", + "glutin", + "image", "lazy_static", "object-pool", - "parking_lot 0.11.2", + "parking_lot 0.12.1", "rand", - "ultraviolet 0.8.1", + "ultraviolet", "wasm-bindgen", "wasm-timer", "web-sys", - "winit 0.24.0", + "winit 0.26.1", + "winit 0.27.5", ] [[package]] @@ -326,19 +317,19 @@ version = "0.8.7" source = "git+https://github.com/amethyst/bracket-lib.git?rev=851f6f08675444fb6fa088b9e67bee9fd75554c6#851f6f08675444fb6fa088b9e67bee9fd75554c6" dependencies = [ "anyhow", - "bracket-color 0.8.7", - "bracket-embedding", + "bracket-color 0.8.7 (git+https://github.com/amethyst/bracket-lib.git?rev=851f6f08675444fb6fa088b9e67bee9fd75554c6)", + "bracket-embedding 0.8.7 (git+https://github.com/amethyst/bracket-lib.git?rev=851f6f08675444fb6fa088b9e67bee9fd75554c6)", "bracket-geometry 0.8.7 (git+https://github.com/amethyst/bracket-lib.git?rev=851f6f08675444fb6fa088b9e67bee9fd75554c6)", - "bracket-rex", + "bracket-rex 0.8.7 (git+https://github.com/amethyst/bracket-lib.git?rev=851f6f08675444fb6fa088b9e67bee9fd75554c6)", "console_error_panic_hook", - "glow 0.11.2", - "glutin 0.29.1", - "image 0.24.6", + "glow", + "glutin", + "image", "lazy_static", "object-pool", "parking_lot 0.12.1", "rand", - "ultraviolet 0.9.1", + "ultraviolet", "wasm-bindgen", "wasm-timer", "web-sys", @@ -364,16 +355,6 @@ version = "1.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "14c189c53d098945499cdfa7ecc63567cf3886b3332b312a5b4585d8d3a6a610" -[[package]] -name = "calloop" -version = "0.6.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0b036167e76041694579972c28cf4877b4f92da222560ddb49008937b6a6727c" -dependencies = [ - "log", - "nix 0.18.0", -] - [[package]] name = "calloop" version = "0.9.3" @@ -406,9 +387,12 @@ checksum = "37b2a672a2cb129a2e41c10b1224bb368f9f37a2b16b612598138befd7b37eb5" [[package]] name = "cc" -version = "1.0.79" +version = "1.0.83" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "50d30906286121d95be3d479533b458f87493b30a4b5f79a607db8f5d11aa91f" +checksum = "f1174fb0b6ec23863f8b971027804a42614e347eafb0a95bf0b12cdae21fc4d0" +dependencies = [ + "libc", +] [[package]] name = "cfg-if" @@ -460,18 +444,18 @@ dependencies = [ [[package]] name = "clap" -version = "4.3.11" +version = "4.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1640e5cc7fb47dbb8338fd471b105e7ed6c3cb2aeb00c2e067127ffd3764a05d" +checksum = "6a13b88d2c62ff462f88e4a121f17a82c1af05693a2f192b5c38d14de73c19f6" dependencies = [ "clap_builder", ] [[package]] name = "clap_builder" -version = "4.3.11" +version = "4.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "98c59138d527eeaf9b53f35a77fcc1fad9d883116070c63d5de1c7dc7b00c72b" +checksum = "2bb9faaa7c2ef94b2743a21f5a29e6f0010dff4caa69ac8e9d6cf8b6fa74da08" dependencies = [ "anstyle", "clap_lex", @@ -479,9 +463,9 @@ dependencies = [ [[package]] name = "clap_lex" -version = "0.5.0" +version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2da6da31387c7e4ef160ffab6d5e7f00c42626fe39aea70a7b0f1773f7dd6c1b" +checksum = "cd7cc57abe963c6d3b9d8be5b06ba7c8957a930305ca90304f24ef040aa6f961" [[package]] name = "cmake" @@ -492,22 +476,6 @@ dependencies = [ "cc", ] -[[package]] -name = "cocoa" -version = "0.23.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c54201c07dcf3a5ca33fececb8042aed767ee4bfd5a0235a8ceabcda956044b2" -dependencies = [ - "bitflags 1.3.2", - "block", - "cocoa-foundation", - "core-foundation 0.9.3", - "core-graphics 0.22.3", - "foreign-types 0.3.2", - "libc", - "objc", -] - [[package]] name = "cocoa" version = "0.24.1" @@ -764,7 +732,7 @@ version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "21fd3add36ea31aba1520aa5288714dd63be506106753226d0eb387a93bc9c45" dependencies = [ - "cocoa 0.24.1", + "cocoa", "core-foundation 0.9.3", "core-foundation-sys 0.8.4", "core-graphics 0.22.3", @@ -778,7 +746,7 @@ dependencies = [ "once_cell", "pkg-config", "servo-fontconfig", - "winapi 0.3.9", + "winapi", ] [[package]] @@ -787,38 +755,14 @@ version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b365fabc795046672053e29c954733ec3b05e4be654ab130fe8f1f94d7051f35" -[[package]] -name = "darling" -version = "0.10.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0d706e75d87e35569db781a9b5e2416cff1236a47ed380831f959382ccd5f858" -dependencies = [ - "darling_core 0.10.2", - "darling_macro 0.10.2", -] - [[package]] name = "darling" version = "0.13.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a01d95850c592940db9b8194bc39f4bc0e89dee5c4265e4b1807c34a9aba453c" dependencies = [ - "darling_core 0.13.4", - "darling_macro 0.13.4", -] - -[[package]] -name = "darling_core" -version = "0.10.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f0c960ae2da4de88a91b2d920c2a7233b400bc33cb28453a2987822d8392519b" -dependencies = [ - "fnv", - "ident_case", - "proc-macro2", - "quote", - "strsim 0.9.3", - "syn 1.0.109", + "darling_core", + "darling_macro", ] [[package]] @@ -831,18 +775,7 @@ dependencies = [ "ident_case", "proc-macro2", "quote", - "strsim 0.10.0", - "syn 1.0.109", -] - -[[package]] -name = "darling_macro" -version = "0.10.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d9b5a2f4ac4969822c62224815d069952656cadc7084fdca9751e6d959189b72" -dependencies = [ - "darling_core 0.10.2", - "quote", + "strsim", "syn 1.0.109", ] @@ -852,28 +785,7 @@ version = "0.13.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9c972679f83bdf9c42bd905396b6c3588a843a17f0f16dfcfa3e2c5d57441835" dependencies = [ - "darling_core 0.13.4", - "quote", - "syn 1.0.109", -] - -[[package]] -name = "deflate" -version = "0.8.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "73770f8e1fe7d64df17ca66ad28994a0a623ea497fa69486e14984e715c5d174" -dependencies = [ - "adler32", - "byteorder", -] - -[[package]] -name = "derivative" -version = "2.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fcc3dd5e9e9c0b295d6e1e4d811fb6f157d5ffd784b8d202fc62eac8035a770b" -dependencies = [ - "proc-macro2", + "darling_core", "quote", "syn 1.0.109", ] @@ -884,15 +796,6 @@ version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bd0c93bb4b0c6d9b77f4435b0ae98c24d17f1c45b2ff844c6151a07256ca923b" -[[package]] -name = "dlib" -version = "0.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b11f15d1e3268f140f68d390637d5e76d849782d971ae7063e0da69fe9709a76" -dependencies = [ - "libloading 0.6.7", -] - [[package]] name = "dlib" version = "0.5.2" @@ -918,27 +821,27 @@ dependencies = [ "libc", "serde", "serde_derive", - "winapi 0.3.9", + "winapi", "wio", ] [[package]] name = "either" -version = "1.8.1" +version = "1.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7fcaabb2fef8c910e7f4c7ce9f67a1283a1715879a7c230ca9d6d1ae31f16d91" +checksum = "a26ae43d7bcc3b814de94796a5e736d4029efb0ee900c12e2d54c993ad1a1e07" [[package]] name = "equivalent" -version = "1.0.0" +version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "88bffebc5d80432c9b140ee17875ff173a8ab62faad5b257da912bd2f6c1c0a1" +checksum = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5" [[package]] name = "errno" -version = "0.3.1" +version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4bcfec3a70f97c962c307b2d2c56e358cf1d00b558d74262b5f929ee8cc7e73a" +checksum = "136526188508e25c6fef639d7927dfb3e0e3084488bf202267829cf7fc23dbdd" dependencies = [ "errno-dragonfly", "libc", @@ -976,12 +879,12 @@ dependencies = [ [[package]] name = "flate2" -version = "1.0.26" +version = "1.0.27" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3b9429470923de8e8cbd4d2dc513535400b4b3fef0319fb5c4e1f520a7bef743" +checksum = "c6c98ee8095e9d1dcbf2fcc6d95acccb90d1c81db1e44725c6a984b1dbdfb010" dependencies = [ "crc32fast", - "miniz_oxide 0.7.1", + "miniz_oxide", ] [[package]] @@ -1017,7 +920,7 @@ checksum = "1a5c6c585bc94aaf2c7b51dd4c2ba22680844aba4c687be581871a6f518c5742" dependencies = [ "proc-macro2", "quote", - "syn 2.0.23", + "syn 2.0.29", ] [[package]] @@ -1054,22 +957,6 @@ dependencies = [ "pkg-config", ] -[[package]] -name = "fuchsia-zircon" -version = "0.3.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2e9763c69ebaae630ba35f74888db465e49e259ba1bc0eda7d06f4a067615d82" -dependencies = [ - "bitflags 1.3.2", - "fuchsia-zircon-sys", -] - -[[package]] -name = "fuchsia-zircon-sys" -version = "0.3.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3dcaa9ae7725d12cdb85b3ad99a434db70b468c09ded17e012d86b5c1010f7a7" - [[package]] name = "futures" version = "0.1.31" @@ -1098,18 +985,6 @@ dependencies = [ "xml-rs", ] -[[package]] -name = "glow" -version = "0.10.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "945be163fdb893227410c8b44c2412dade922585b262d1daa6a7e96135217d4c" -dependencies = [ - "js-sys", - "slotmap", - "wasm-bindgen", - "web-sys", -] - [[package]] name = "glow" version = "0.11.2" @@ -1122,33 +997,6 @@ dependencies = [ "web-sys", ] -[[package]] -name = "glutin" -version = "0.26.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1ae1cbb9176b9151c4ce03f012e3cd1c6c18c4be79edeaeb3d99f5d8085c5fa3" -dependencies = [ - "android_glue", - "cgl", - "cocoa 0.23.0", - "core-foundation 0.9.3", - "glutin_egl_sys", - "glutin_emscripten_sys", - "glutin_gles2_sys", - "glutin_glx_sys", - "glutin_wgl_sys", - "lazy_static", - "libloading 0.6.7", - "log", - "objc", - "osmesa-sys", - "parking_lot 0.11.2", - "wayland-client 0.28.6", - "wayland-egl 0.28.6", - "winapi 0.3.9", - "winit 0.24.0", -] - [[package]] name = "glutin" version = "0.29.1" @@ -1156,7 +1004,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "444c9ad294fdcaf20ccf6726b78f380b5450275540c9b68ab62f49726ad1c713" dependencies = [ "cgl", - "cocoa 0.24.1", + "cocoa", "core-foundation 0.9.3", "glutin_egl_sys", "glutin_gles2_sys", @@ -1169,9 +1017,9 @@ dependencies = [ "osmesa-sys", "parking_lot 0.12.1", "raw-window-handle 0.5.2", - "wayland-client 0.29.5", - "wayland-egl 0.29.5", - "winapi 0.3.9", + "wayland-client", + "wayland-egl", + "winapi", "winit 0.27.5", ] @@ -1182,15 +1030,9 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "68900f84b471f31ea1d1355567eb865a2cf446294f06cef8d653ed7bcf5f013d" dependencies = [ "gl_generator", - "winapi 0.3.9", + "winapi", ] -[[package]] -name = "glutin_emscripten_sys" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "80de4146df76e8a6c32b03007bc764ff3249dcaeb4f675d68a06caf1bac363f1" - [[package]] name = "glutin_gles2_sys" version = "0.1.5" @@ -1258,15 +1100,6 @@ dependencies = [ "rayon", ] -[[package]] -name = "home" -version = "0.5.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5444c27eef6923071f7ebcc33e3444508466a76f7a2b93da00ed6e19f30c1ddb" -dependencies = [ - "windows-sys 0.48.0", -] - [[package]] name = "ident_case" version = "1.0.1" @@ -1275,33 +1108,17 @@ checksum = "b9e0384b61958566e926dc50660321d12159025e767c18e043daf26b70104c39" [[package]] name = "image" -version = "0.23.14" +version = "0.24.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "24ffcb7e7244a9bf19d35bf2883b9c080c4ced3c07a9895572178cdb8f13f6a1" +checksum = "6f3dfdbdd72063086ff443e297b61695500514b1e41095b6fb9a5ab48a70a711" dependencies = [ "bytemuck", "byteorder", "color_quant", - "jpeg-decoder 0.1.22", - "num-iter", - "num-rational 0.3.2", + "jpeg-decoder", + "num-rational", "num-traits", - "png 0.16.8", -] - -[[package]] -name = "image" -version = "0.24.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "527909aa81e20ac3a44803521443a765550f09b5130c2c2fa1ea59c2f8f50a3a" -dependencies = [ - "bytemuck", - "byteorder", - "color_quant", - "jpeg-decoder 0.3.0", - "num-rational 0.4.1", - "num-traits", - "png 0.17.9", + "png", ] [[package]] @@ -1326,15 +1143,6 @@ dependencies = [ "web-sys", ] -[[package]] -name = "iovec" -version = "0.1.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b2b3ea6ff95e175473f8ffe6a7eb7c00d054240321b84c57051175fe3c1e075e" -dependencies = [ - "libc", -] - [[package]] name = "is-terminal" version = "0.4.9" @@ -1357,9 +1165,9 @@ dependencies = [ [[package]] name = "itoa" -version = "1.0.8" +version = "1.0.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "62b02a5381cc465bd3041d84623d0fa3b66738b52b8e2fc3bab8ad63ab032f4a" +checksum = "af150ab688ff2122fcef229be89cb50dd66af9e01a4ff320cc137eecc9bacc38" [[package]] name = "jni-sys" @@ -1367,12 +1175,6 @@ version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8eaf4bc02d17cbdd7ff4c7438cafcdf7fb9a4613313ad11b4f8fefe7d3fa0130" -[[package]] -name = "jpeg-decoder" -version = "0.1.22" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "229d53d58899083193af11e15917b5640cd40b29ff475a1fe4ef725deb02d0f2" - [[package]] name = "jpeg-decoder" version = "0.3.0" @@ -1388,16 +1190,6 @@ dependencies = [ "wasm-bindgen", ] -[[package]] -name = "kernel32-sys" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7507624b29483431c0ba2d82aece8ca6cdba9382bff4ddd0f7490560c056098d" -dependencies = [ - "winapi 0.2.8", - "winapi-build", -] - [[package]] name = "khronos_api" version = "3.1.0" @@ -1410,28 +1202,12 @@ version = "1.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" -[[package]] -name = "lazycell" -version = "1.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "830d08ce1d1d941e6b30645f1a0eb5643013d835ce3779a5fc208261dbe10f55" - [[package]] name = "libc" version = "0.2.147" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b4668fb0ea861c1df094127ac5f1da3409a82116a4ba74fca2e58ef927159bb3" -[[package]] -name = "libloading" -version = "0.6.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "351a32417a12d5f7e82c368a66781e307834dae04c6ce0cd4456d52989229883" -dependencies = [ - "cfg-if 1.0.0", - "winapi 0.3.9", -] - [[package]] name = "libloading" version = "0.7.4" @@ -1439,7 +1215,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b67380fd3b2fbe7527a606e18729d21c6f3951633d0500574c4dc22d2d638b9f" dependencies = [ "cfg-if 1.0.0", - "winapi 0.3.9", + "winapi", ] [[package]] @@ -1454,9 +1230,9 @@ dependencies = [ [[package]] name = "linux-raw-sys" -version = "0.4.3" +version = "0.4.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "09fc20d2ca12cb9f044c93e3bd6d32d523e6e2ec3db4f7b2939cd99026ecd3f0" +checksum = "57bcfdad1b858c2db7c38303a6d2ad4dfaf5eb53dfeb0910128b2c26d6158503" [[package]] name = "lock_api" @@ -1470,9 +1246,9 @@ dependencies = [ [[package]] name = "log" -version = "0.4.19" +version = "0.4.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b06a4cde4c0f271a446782e3eff8de789548ce57dbc8eca9292c27f4a42004b4" +checksum = "b5e6163cb8c49088c2c36f57875e58ccd8c87c7427f7fbd50ea6710b2f3f2e8f" [[package]] name = "malloc_buf" @@ -1491,18 +1267,9 @@ checksum = "60302e4db3a61da70c0cb7991976248362f30319e88850c487b9b95bbf059e00" [[package]] name = "memchr" -version = "2.5.0" +version = "2.6.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2dffe52ecf27772e601905b7522cb4ef790d2cc203488bbd0e2fe85fcb74566d" - -[[package]] -name = "memmap2" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d9b70ca2a6103ac8b665dc150b142ef0e4e89df640c9e6cf295d189c3caebe5a" -dependencies = [ - "libc", -] +checksum = "8f232d6ef707e1956a43342693d2a31e72989554d58299d7a88738cc95b0d35c" [[package]] name = "memmap2" @@ -1546,15 +1313,6 @@ version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "68354c5c6bd36d73ff3feceb05efa59b6acb7626617f4962be322a825e61f79a" -[[package]] -name = "miniz_oxide" -version = "0.3.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "791daaae1ed6889560f8c4359194f56648355540573244a5448a83ba1ecc7435" -dependencies = [ - "adler32", -] - [[package]] name = "miniz_oxide" version = "0.7.1" @@ -1565,25 +1323,6 @@ dependencies = [ "simd-adler32", ] -[[package]] -name = "mio" -version = "0.6.23" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4afd66f5b91bf2a3bc13fad0e21caedac168ca4c707504e75585648ae80e4cc4" -dependencies = [ - "cfg-if 0.1.10", - "fuchsia-zircon", - "fuchsia-zircon-sys", - "iovec", - "kernel32-sys", - "libc", - "log", - "miow", - "net2", - "slab", - "winapi 0.2.8", -] - [[package]] name = "mio" version = "0.8.8" @@ -1596,48 +1335,12 @@ dependencies = [ "windows-sys 0.48.0", ] -[[package]] -name = "mio-extras" -version = "2.0.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "52403fe290012ce777c4626790c8951324a2b9e3316b3143779c72b029742f19" -dependencies = [ - "lazycell", - "log", - "mio 0.6.23", - "slab", -] - -[[package]] -name = "miow" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ebd808424166322d4a38da87083bfddd3ac4c131334ed55856112eb06d46944d" -dependencies = [ - "kernel32-sys", - "net2", - "winapi 0.2.8", - "ws2_32-sys", -] - [[package]] name = "mopa" version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a785740271256c230f57462d3b83e52f998433a7062fc18f96d5999474a9f915" -[[package]] -name = "ndk" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5eb167c1febed0a496639034d0c76b3b74263636045db5489eee52143c246e73" -dependencies = [ - "jni-sys", - "ndk-sys 0.2.2", - "num_enum 0.4.3", - "thiserror", -] - [[package]] name = "ndk" version = "0.5.0" @@ -1647,7 +1350,7 @@ dependencies = [ "bitflags 1.3.2", "jni-sys", "ndk-sys 0.2.2", - "num_enum 0.5.11", + "num_enum", "thiserror", ] @@ -1660,7 +1363,7 @@ dependencies = [ "bitflags 1.3.2", "jni-sys", "ndk-sys 0.4.1+23.1.7779620", - "num_enum 0.5.11", + "num_enum", "raw-window-handle 0.5.2", "thiserror", ] @@ -1671,20 +1374,6 @@ version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "27b02d87554356db9e9a873add8782d4ea6e3e58ea071a9adb9a2e8ddb884a8b" -[[package]] -name = "ndk-glue" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bdf399b8b7a39c6fb153c4ec32c72fd5fe789df24a647f229c239aa7adb15241" -dependencies = [ - "lazy_static", - "libc", - "log", - "ndk 0.2.1", - "ndk-macro 0.2.0", - "ndk-sys 0.2.2", -] - [[package]] name = "ndk-glue" version = "0.5.2" @@ -1696,7 +1385,7 @@ dependencies = [ "log", "ndk 0.5.0", "ndk-context", - "ndk-macro 0.3.0", + "ndk-macro", "ndk-sys 0.2.2", ] @@ -1710,33 +1399,20 @@ dependencies = [ "log", "ndk 0.7.0", "ndk-context", - "ndk-macro 0.3.0", + "ndk-macro", "ndk-sys 0.4.1+23.1.7779620", "once_cell", "parking_lot 0.12.1", ] -[[package]] -name = "ndk-macro" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "05d1c6307dc424d0f65b9b06e94f88248e6305726b14729fd67a5e47b2dc481d" -dependencies = [ - "darling 0.10.2", - "proc-macro-crate 0.1.5", - "proc-macro2", - "quote", - "syn 1.0.109", -] - [[package]] name = "ndk-macro" version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0df7ac00c4672f9d5aece54ee3347520b7e20f158656c7db2e6de01902eb7a6c" dependencies = [ - "darling 0.13.4", - "proc-macro-crate 1.3.1", + "darling", + "proc-macro-crate", "proc-macro2", "quote", "syn 1.0.109", @@ -1757,41 +1433,6 @@ dependencies = [ "jni-sys", ] -[[package]] -name = "net2" -version = "0.2.39" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b13b648036a2339d06de780866fbdfda0dde886de7b3af2ddeba8b14f4ee34ac" -dependencies = [ - "cfg-if 0.1.10", - "libc", - "winapi 0.3.9", -] - -[[package]] -name = "nix" -version = "0.18.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "83450fe6a6142ddd95fb064b746083fc4ef1705fe81f64a64e1d4b39f54a1055" -dependencies = [ - "bitflags 1.3.2", - "cc", - "cfg-if 0.1.10", - "libc", -] - -[[package]] -name = "nix" -version = "0.20.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fa9b4819da1bc61c0ea48b63b7bc8604064dd43013e7cc325df098d49cd7c18a" -dependencies = [ - "bitflags 1.3.2", - "cc", - "cfg-if 1.0.0", - "libc", -] - [[package]] name = "nix" version = "0.22.3" @@ -1850,28 +1491,6 @@ dependencies = [ "num-traits", ] -[[package]] -name = "num-iter" -version = "0.1.43" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7d03e6c028c5dc5cac6e2dec0efda81fc887605bb3d884578bb6d6bf7514e252" -dependencies = [ - "autocfg", - "num-integer", - "num-traits", -] - -[[package]] -name = "num-rational" -version = "0.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "12ac428b1cb17fce6f731001d307d351ec70a6d202fc2e60f7d4c5e42d8f4f07" -dependencies = [ - "autocfg", - "num-integer", - "num-traits", -] - [[package]] name = "num-rational" version = "0.4.1" @@ -1885,9 +1504,9 @@ dependencies = [ [[package]] name = "num-traits" -version = "0.2.15" +version = "0.2.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "578ede34cf02f8924ab9447f50c28075b4d3e5b269972345e7e0372b38c6cdcd" +checksum = "f30b0abd723be7e2ffca1272140fac1a2f084c77ec3e123c192b66af1ee9e6c2" dependencies = [ "autocfg", ] @@ -1902,35 +1521,13 @@ dependencies = [ "libc", ] -[[package]] -name = "num_enum" -version = "0.4.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ca565a7df06f3d4b485494f25ba05da1435950f4dc263440eda7a6fa9b8e36e4" -dependencies = [ - "derivative", - "num_enum_derive 0.4.3", -] - [[package]] name = "num_enum" version = "0.5.11" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1f646caf906c20226733ed5b1374287eb97e3c2a5c227ce668c1f2ce20ae57c9" dependencies = [ - "num_enum_derive 0.5.11", -] - -[[package]] -name = "num_enum_derive" -version = "0.4.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ffa5a33ddddfee04c0283a7653987d634e880347e96b5b2ed64de07efb59db9d" -dependencies = [ - "proc-macro-crate 0.1.5", - "proc-macro2", - "quote", - "syn 1.0.109", + "num_enum_derive", ] [[package]] @@ -1939,7 +1536,7 @@ version = "0.5.11" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "dcbff9bc912032c62bf65ef1d5aea88983b420f4f839db1e9b0c281a25c9c799" dependencies = [ - "proc-macro-crate 1.3.1", + "proc-macro-crate", "proc-macro2", "quote", "syn 1.0.109", @@ -1984,15 +1581,6 @@ dependencies = [ "shared_library", ] -[[package]] -name = "owned_ttf_parser" -version = "0.15.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "05e6affeb1632d6ff6a23d2cd40ffed138e82f1532571a26f527c8a284bb2fbb" -dependencies = [ - "ttf-parser", -] - [[package]] name = "parking_lot" version = "0.11.2" @@ -2025,7 +1613,7 @@ dependencies = [ "libc", "redox_syscall 0.2.16", "smallvec", - "winapi 0.3.9", + "winapi", ] [[package]] @@ -2083,36 +1671,15 @@ dependencies = [ [[package]] name = "png" -version = "0.16.8" +version = "0.17.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3c3287920cb847dee3de33d301c463fba14dda99db24214ddf93f83d3021f4c6" -dependencies = [ - "bitflags 1.3.2", - "crc32fast", - "deflate", - "miniz_oxide 0.3.7", -] - -[[package]] -name = "png" -version = "0.17.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "59871cc5b6cce7eaccca5a802b4173377a1c2ba90654246789a8fa2334426d11" +checksum = "dd75bf2d8dd3702b9707cdbc56a5b9ef42cec752eb8b3bafc01234558442aa64" dependencies = [ "bitflags 1.3.2", "crc32fast", "fdeflate", "flate2", - "miniz_oxide 0.7.1", -] - -[[package]] -name = "proc-macro-crate" -version = "0.1.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1d6ea3c4595b96363c13943497db34af4460fb474a95c43f4446ad341b8c9785" -dependencies = [ - "toml", + "miniz_oxide", ] [[package]] @@ -2127,18 +1694,18 @@ dependencies = [ [[package]] name = "proc-macro2" -version = "1.0.63" +version = "1.0.66" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7b368fba921b0dce7e60f5e04ec15e565b3303972b42bcfde1d0713b881959eb" +checksum = "18fb31db3f9bddb2ea821cde30a9f70117e3f119938b5ee630b7403aa6e2ead9" dependencies = [ "unicode-ident", ] [[package]] name = "quote" -version = "1.0.29" +version = "1.0.33" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "573015e8ab27661678357f27dc26460738fd2b6c86e46f386fde94cb5d913105" +checksum = "5267fca4496028628a95160fc423a33e8b2e6af8a5302579e322e4b520293cae" dependencies = [ "proc-macro2", ] @@ -2168,16 +1735,6 @@ dependencies = [ "serde", ] -[[package]] -name = "raw-window-handle" -version = "0.3.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e28f55143d0548dad60bb4fbdc835a3d7ac6acc3324506450c5fdd6e42903a76" -dependencies = [ - "libc", - "raw-window-handle 0.4.3", -] - [[package]] name = "raw-window-handle" version = "0.4.3" @@ -2235,9 +1792,9 @@ dependencies = [ [[package]] name = "regex" -version = "1.9.0" +version = "1.9.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "89089e897c013b3deb627116ae56a6955a72b8bed395c9526af31c9fe528b484" +checksum = "697061221ea1b4a94a624f67d0ae2bfe4e22b8a17b6a192afb11046542cc8c47" dependencies = [ "aho-corasick", "memchr", @@ -2247,9 +1804,9 @@ dependencies = [ [[package]] name = "regex-automata" -version = "0.3.0" +version = "0.3.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fa250384981ea14565685dea16a9ccc4d1c541a13f82b9c168572264d1df8c56" +checksum = "c2f401f4955220693b56f8ec66ee9c78abffd8d1c4f23dc41a23839eb88f0795" dependencies = [ "aho-corasick", "memchr", @@ -2258,9 +1815,9 @@ dependencies = [ [[package]] name = "regex-syntax" -version = "0.7.3" +version = "0.7.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2ab07dc67230e4a4718e70fd5c20055a4334b121f1f9db8fe63ef39ce9b8c846" +checksum = "dbb5fb1acd8a1a18b3dd5be62d25485eb770e05afb408a9627d14d451bae12da" [[package]] name = "rltk" @@ -2289,32 +1846,22 @@ dependencies = [ [[package]] name = "rustix" -version = "0.38.3" +version = "0.38.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ac5ffa1efe7548069688cd7028f32591853cd7b5b756d41bcffd2353e4fc75b4" +checksum = "c0c3dde1fc030af041adc40e79c0e7fbcf431dd24870053d187d7c66e4b87453" dependencies = [ - "bitflags 2.3.3", + "bitflags 2.4.0", "errno", "libc", "linux-raw-sys", "windows-sys 0.48.0", ] -[[package]] -name = "rusttype" -version = "0.9.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3ff8374aa04134254b7995b63ad3dc41c7f7236f69528b28553da7d72efaa967" -dependencies = [ - "ab_glyph_rasterizer", - "owned_ttf_parser", -] - [[package]] name = "ryu" -version = "1.0.14" +version = "1.0.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fe232bdf6be8c8de797b22184ee71118d63780ea42ac85b61d1baa6d3b782ae9" +checksum = "1ad4cc8da4ef723ed60bced201181d83791ad433213d8c24efffda1eec85d741" [[package]] name = "safe_arch" @@ -2327,9 +1874,9 @@ dependencies = [ [[package]] name = "safe_arch" -version = "0.7.0" +version = "0.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "62a7484307bd40f8f7ccbacccac730108f2cae119a3b11c74485b48aa9ea650f" +checksum = "f398075ce1e6a179b46f51bd88d0598b92b00d3551f1a2d4ac49e771b56ac354" dependencies = [ "bytemuck", ] @@ -2351,9 +1898,9 @@ checksum = "e1cf6437eb19a8f4a6cc0f7dca544973b0b78843adbfeb3683d1a94a0024a294" [[package]] name = "scopeguard" -version = "1.1.0" +version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d29ab0c6d3fc0ee92fe66e2d99f700eab17a8d57d1c1d3b748380fb20baa78cd" +checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49" [[package]] name = "sctk-adwaita" @@ -2375,29 +1922,29 @@ checksum = "a0eddf2e8f50ced781f288c19f18621fa72a3779e3cb58dbf23b07469b0abeb4" [[package]] name = "serde" -version = "1.0.166" +version = "1.0.188" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d01b7404f9d441d3ad40e6a636a7782c377d2abdbe4fa2440e2edcc2f4f10db8" +checksum = "cf9e0fcba69a370eed61bcf2b728575f726b50b55cba78064753d708ddc7549e" dependencies = [ "serde_derive", ] [[package]] name = "serde_derive" -version = "1.0.166" +version = "1.0.188" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5dd83d6dde2b6b2d466e14d9d1acce8816dedee94f735eac6395808b3483c6d6" +checksum = "4eca7ac642d82aa35b60049a6eccb4be6be75e599bd2e9adb5f875a737654af2" dependencies = [ "proc-macro2", "quote", - "syn 2.0.23", + "syn 2.0.29", ] [[package]] name = "serde_json" -version = "1.0.100" +version = "1.0.105" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0f1e14e89be7aa4c4b78bdbdc9eb5bf8517829a600ae8eaa39a6e1d960b5185c" +checksum = "693151e1ac27563d6dbcec9dee9fbd5da8539b20fa14ad3752b2e6d363ace360" dependencies = [ "itoa", "ryu", @@ -2457,15 +2004,15 @@ checksum = "a5ea33232fdcf1bf691ca33450e5a94dde13e1a8cbb8caabc5e4f9d761e10b1a" [[package]] name = "simd-adler32" -version = "0.3.5" +version = "0.3.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "238abfbb77c1915110ad968465608b68e869e0772622c9656714e73e5a1a522f" +checksum = "d66dc143e6b11c1eddc06d5c423cfc97062865baf299914ab64caa38182078fe" [[package]] name = "slab" -version = "0.4.8" +version = "0.4.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6528351c9bc8ab22353f9d776db39a20288e8d6c37ef8cfe3317cf875eecfc2d" +checksum = "8f92a496fb766b417c996b9c5e57daf2f7ad3b0bebe1ccfca4856390e3d3bb67" dependencies = [ "autocfg", ] @@ -2485,25 +2032,6 @@ version = "1.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "62bb4feee49fdd9f707ef802e22365a35de4b7b299de4763d44bfea899442ff9" -[[package]] -name = "smithay-client-toolkit" -version = "0.12.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4750c76fd5d3ac95fa3ed80fe667d6a3d8590a960e5b575b98eea93339a80b80" -dependencies = [ - "andrew", - "bitflags 1.3.2", - "calloop 0.6.5", - "dlib 0.4.2", - "lazy_static", - "log", - "memmap2 0.1.0", - "nix 0.18.0", - "wayland-client 0.28.6", - "wayland-cursor 0.28.6", - "wayland-protocols 0.28.6", -] - [[package]] name = "smithay-client-toolkit" version = "0.15.4" @@ -2512,15 +2040,15 @@ checksum = "8a28f16a97fa0e8ce563b2774d1e732dd5d4025d2772c5dba0a41a0f90a29da3" dependencies = [ "bitflags 1.3.2", "calloop 0.9.3", - "dlib 0.5.2", + "dlib", "lazy_static", "log", "memmap2 0.3.1", "nix 0.22.3", "pkg-config", - "wayland-client 0.29.5", - "wayland-cursor 0.29.5", - "wayland-protocols 0.29.5", + "wayland-client", + "wayland-cursor", + "wayland-protocols", ] [[package]] @@ -2531,15 +2059,15 @@ checksum = "f307c47d32d2715eb2e0ece5589057820e0e5e70d07c247d1063e844e107f454" dependencies = [ "bitflags 1.3.2", "calloop 0.10.6", - "dlib 0.5.2", + "dlib", "lazy_static", "log", "memmap2 0.5.10", "nix 0.24.3", "pkg-config", - "wayland-client 0.29.5", - "wayland-cursor 0.29.5", - "wayland-protocols 0.29.5", + "wayland-client", + "wayland-cursor", + "wayland-protocols", ] [[package]] @@ -2570,12 +2098,6 @@ dependencies = [ "syn 1.0.109", ] -[[package]] -name = "strsim" -version = "0.9.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6446ced80d6c486436db5c078dde11a9f73d42b57fb273121e160b84f63d894c" - [[package]] name = "strsim" version = "0.10.0" @@ -2595,9 +2117,9 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.23" +version = "2.0.29" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "59fb7d6d8281a51045d62b8eb3a7d1ce347b76f312af50cd3dc0af39c87c1737" +checksum = "c324c494eba9d92503e6f1ef2e6df781e78f6a7705a0202d9801b198807d518a" dependencies = [ "proc-macro2", "quote", @@ -2606,22 +2128,22 @@ dependencies = [ [[package]] name = "thiserror" -version = "1.0.41" +version = "1.0.48" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c16a64ba9387ef3fdae4f9c1a7f07a0997fce91985c0336f1ddc1822b3b37802" +checksum = "9d6d7a740b8a666a7e828dd00da9c0dc290dff53154ea77ac109281de90589b7" dependencies = [ "thiserror-impl", ] [[package]] name = "thiserror-impl" -version = "1.0.41" +version = "1.0.48" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d14928354b01c4d6a4f0e549069adef399a284e7995c7ccca94e8a07a5346c59" +checksum = "49922ecae66cc8a249b77e68d1d0623c1b2c514f0060c27cdc68bd62a1219d35" dependencies = [ "proc-macro2", "quote", - "syn 2.0.23", + "syn 2.0.29", ] [[package]] @@ -2634,7 +2156,7 @@ dependencies = [ "arrayvec", "bytemuck", "cfg-if 1.0.0", - "png 0.17.9", + "png", "safe_arch 0.5.2", "tiny-skia-path", ] @@ -2698,21 +2220,15 @@ checksum = "7cda73e2f1397b1262d6dfdcef8aafae14d1de7748d66822d3bfeeb6d03e5e4b" [[package]] name = "toml_edit" -version = "0.19.12" +version = "0.19.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c500344a19072298cd05a7224b3c0c629348b78692bf48466c5238656e315a78" +checksum = "f8123f27e969974a3dfba720fdb560be359f57b44302d280ba72e76a74480e8a" dependencies = [ "indexmap", "toml_datetime", "winnow", ] -[[package]] -name = "ttf-parser" -version = "0.15.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7b3e06c9b9d80ed6b745c7159c40b311ad2916abb34a49e9be2653b90db0d8dd" - [[package]] name = "tuple_utils" version = "0.3.0" @@ -2728,29 +2244,20 @@ dependencies = [ "nom", ] -[[package]] -name = "ultraviolet" -version = "0.8.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "16b9e3507eba17043af05c8a72fce3ec2c24b58945f45732e71dbc6646d904a7" -dependencies = [ - "wide 0.6.5", -] - [[package]] name = "ultraviolet" version = "0.9.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ca0b28b9a6ce66d47e3c5666aa738c5ec5223fcdd4c263f3edc98ab6fef618b3" dependencies = [ - "wide 0.7.10", + "wide", ] [[package]] name = "unicode-ident" -version = "1.0.10" +version = "1.0.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "22049a19f4a68748a168c0fc439f9516686aa045927ff767eca0a85101fb6e73" +checksum = "301abaae475aa91687eb82514b328ab47a211a533026cb25fc3e519b86adfc3c" [[package]] name = "vec_map" @@ -2801,7 +2308,7 @@ dependencies = [ "once_cell", "proc-macro2", "quote", - "syn 2.0.23", + "syn 2.0.29", "wasm-bindgen-shared", ] @@ -2823,7 +2330,7 @@ checksum = "54681b18a46765f095758388f2d0cf16eb8d4169b639ab575a8f5693af210c7b" dependencies = [ "proc-macro2", "quote", - "syn 2.0.23", + "syn 2.0.29", "wasm-bindgen-backend", "wasm-bindgen-shared", ] @@ -2848,22 +2355,6 @@ dependencies = [ "web-sys", ] -[[package]] -name = "wayland-client" -version = "0.28.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e3ab332350e502f159382201394a78e3cc12d0f04db863429260164ea40e0355" -dependencies = [ - "bitflags 1.3.2", - "downcast-rs", - "libc", - "nix 0.20.0", - "scoped-tls", - "wayland-commons 0.28.6", - "wayland-scanner 0.28.6", - "wayland-sys 0.28.6", -] - [[package]] name = "wayland-client" version = "0.29.5" @@ -2875,21 +2366,9 @@ dependencies = [ "libc", "nix 0.24.3", "scoped-tls", - "wayland-commons 0.29.5", - "wayland-scanner 0.29.5", - "wayland-sys 0.29.5", -] - -[[package]] -name = "wayland-commons" -version = "0.28.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a21817947c7011bbd0a27e11b17b337bfd022e8544b071a2641232047966fbda" -dependencies = [ - "nix 0.20.0", - "once_cell", - "smallvec", - "wayland-sys 0.28.6", + "wayland-commons", + "wayland-scanner", + "wayland-sys", ] [[package]] @@ -2901,18 +2380,7 @@ dependencies = [ "nix 0.24.3", "once_cell", "smallvec", - "wayland-sys 0.29.5", -] - -[[package]] -name = "wayland-cursor" -version = "0.28.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "be610084edd1586d45e7bdd275fe345c7c1873598caa464c4fb835dee70fa65a" -dependencies = [ - "nix 0.20.0", - "wayland-client 0.28.6", - "xcursor", + "wayland-sys", ] [[package]] @@ -2922,40 +2390,18 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6865c6b66f13d6257bef1cd40cbfe8ef2f150fb8ebbdb1e8e873455931377661" dependencies = [ "nix 0.24.3", - "wayland-client 0.29.5", + "wayland-client", "xcursor", ] -[[package]] -name = "wayland-egl" -version = "0.28.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "99ba1ab1e18756b23982d36f08856d521d7df45015f404a2d7c4f0b2d2f66956" -dependencies = [ - "wayland-client 0.28.6", - "wayland-sys 0.28.6", -] - [[package]] name = "wayland-egl" version = "0.29.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "402de949f81a012926d821a2d659f930694257e76dd92b6e0042ceb27be4107d" dependencies = [ - "wayland-client 0.29.5", - "wayland-sys 0.29.5", -] - -[[package]] -name = "wayland-protocols" -version = "0.28.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "286620ea4d803bacf61fa087a4242ee316693099ee5a140796aaba02b29f861f" -dependencies = [ - "bitflags 1.3.2", - "wayland-client 0.28.6", - "wayland-commons 0.28.6", - "wayland-scanner 0.28.6", + "wayland-client", + "wayland-sys", ] [[package]] @@ -2965,20 +2411,9 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b950621f9354b322ee817a23474e479b34be96c2e909c14f7bc0100e9a970bc6" dependencies = [ "bitflags 1.3.2", - "wayland-client 0.29.5", - "wayland-commons 0.29.5", - "wayland-scanner 0.29.5", -] - -[[package]] -name = "wayland-scanner" -version = "0.28.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ce923eb2deb61de332d1f356ec7b6bf37094dc5573952e1c8936db03b54c03f1" -dependencies = [ - "proc-macro2", - "quote", - "xml-rs", + "wayland-client", + "wayland-commons", + "wayland-scanner", ] [[package]] @@ -2992,24 +2427,13 @@ dependencies = [ "xml-rs", ] -[[package]] -name = "wayland-sys" -version = "0.28.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d841fca9aed7febf9bed2e9796c49bf58d4152ceda8ac949ebe00868d8f0feb8" -dependencies = [ - "dlib 0.5.2", - "lazy_static", - "pkg-config", -] - [[package]] name = "wayland-sys" version = "0.29.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "be12ce1a3c39ec7dba25594b97b42cb3195d54953ddb9d3d95a7c3902bc6e9d4" dependencies = [ - "dlib 0.5.2", + "dlib", "lazy_static", "pkg-config", ] @@ -3026,30 +2450,14 @@ dependencies = [ [[package]] name = "wide" -version = "0.6.5" +version = "0.7.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "46bbe7c604a27ca0b05c5503221e76da628225b568e6f1280b42dbad3b72d89b" +checksum = "aa469ffa65ef7e0ba0f164183697b89b854253fd31aeb92358b7b6155177d62f" dependencies = [ "bytemuck", - "safe_arch 0.5.2", + "safe_arch 0.7.1", ] -[[package]] -name = "wide" -version = "0.7.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "40018623e2dba2602a9790faba8d33f2ebdebf4b86561b83928db735f8784728" -dependencies = [ - "bytemuck", - "safe_arch 0.7.0", -] - -[[package]] -name = "winapi" -version = "0.2.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "167dc9d6949a9b857f3451275e911c3f44255842c1f7a76f33c55103a909087a" - [[package]] name = "winapi" version = "0.3.9" @@ -3060,12 +2468,6 @@ dependencies = [ "winapi-x86_64-pc-windows-gnu", ] -[[package]] -name = "winapi-build" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2d315eee3b34aca4797b2da6b13ed88266e6d612562a0c46390af8299fc699bc" - [[package]] name = "winapi-i686-pc-windows-gnu" version = "0.4.0" @@ -3078,7 +2480,7 @@ version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "70ec6ce85bb158151cae5e5c87f95a8e97d2c0c4b001223f33a334e3ce5de178" dependencies = [ - "winapi 0.3.9", + "winapi", ] [[package]] @@ -3111,24 +2513,24 @@ dependencies = [ [[package]] name = "windows-targets" -version = "0.48.1" +version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "05d4b17490f70499f20b9e791dcf6a299785ce8af4d709018206dc5b4953e95f" +checksum = "9a2fa6e2155d7247be68c096456083145c183cbbbc2764150dda45a87197940c" dependencies = [ "windows_aarch64_gnullvm", - "windows_aarch64_msvc 0.48.0", - "windows_i686_gnu 0.48.0", - "windows_i686_msvc 0.48.0", - "windows_x86_64_gnu 0.48.0", + "windows_aarch64_msvc 0.48.5", + "windows_i686_gnu 0.48.5", + "windows_i686_msvc 0.48.5", + "windows_x86_64_gnu 0.48.5", "windows_x86_64_gnullvm", - "windows_x86_64_msvc 0.48.0", + "windows_x86_64_msvc 0.48.5", ] [[package]] name = "windows_aarch64_gnullvm" -version = "0.48.0" +version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "91ae572e1b79dba883e0d315474df7305d12f569b400fcf90581b06062f7e1bc" +checksum = "2b38e32f0abccf9987a4e3079dfb67dcd799fb61361e53e2882c3cbaf0d905d8" [[package]] name = "windows_aarch64_msvc" @@ -3138,9 +2540,9 @@ checksum = "9bb8c3fd39ade2d67e9874ac4f3db21f0d710bee00fe7cab16949ec184eeaa47" [[package]] name = "windows_aarch64_msvc" -version = "0.48.0" +version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b2ef27e0d7bdfcfc7b868b317c1d32c641a6fe4629c171b8928c7b08d98d7cf3" +checksum = "dc35310971f3b2dbbf3f0690a219f40e2d9afcf64f9ab7cc1be722937c26b4bc" [[package]] name = "windows_i686_gnu" @@ -3150,9 +2552,9 @@ checksum = "180e6ccf01daf4c426b846dfc66db1fc518f074baa793aa7d9b9aaeffad6a3b6" [[package]] name = "windows_i686_gnu" -version = "0.48.0" +version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "622a1962a7db830d6fd0a69683c80a18fda201879f0f447f065a3b7467daa241" +checksum = "a75915e7def60c94dcef72200b9a8e58e5091744960da64ec734a6c6e9b3743e" [[package]] name = "windows_i686_msvc" @@ -3162,9 +2564,9 @@ checksum = "e2e7917148b2812d1eeafaeb22a97e4813dfa60a3f8f78ebe204bcc88f12f024" [[package]] name = "windows_i686_msvc" -version = "0.48.0" +version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4542c6e364ce21bf45d69fdd2a8e455fa38d316158cfd43b3ac1c5b1b19f8e00" +checksum = "8f55c233f70c4b27f66c523580f78f1004e8b5a8b659e05a4eb49d4166cca406" [[package]] name = "windows_x86_64_gnu" @@ -3174,15 +2576,15 @@ checksum = "4dcd171b8776c41b97521e5da127a2d86ad280114807d0b2ab1e462bc764d9e1" [[package]] name = "windows_x86_64_gnu" -version = "0.48.0" +version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ca2b8a661f7628cbd23440e50b05d705db3686f894fc9580820623656af974b1" +checksum = "53d40abd2583d23e4718fddf1ebec84dbff8381c07cae67ff7768bbf19c6718e" [[package]] name = "windows_x86_64_gnullvm" -version = "0.48.0" +version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7896dbc1f41e08872e9d5e8f8baa8fdd2677f29468c4e156210174edc7f7b953" +checksum = "0b7b52767868a23d5bab768e390dc5f5c55825b6d30b86c844ff2dc7414044cc" [[package]] name = "windows_x86_64_msvc" @@ -3192,42 +2594,9 @@ checksum = "c811ca4a8c853ef420abd8592ba53ddbbac90410fab6903b3e79972a631f7680" [[package]] name = "windows_x86_64_msvc" -version = "0.48.0" +version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1a515f5799fe4961cb532f983ce2b23082366b898e52ffbce459c86f67c8378a" - -[[package]] -name = "winit" -version = "0.24.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "da4eda6fce0eb84bd0a33e3c8794eb902e1033d0a1d5a31bc4f19b1b4bbff597" -dependencies = [ - "bitflags 1.3.2", - "cocoa 0.24.1", - "core-foundation 0.9.3", - "core-graphics 0.22.3", - "core-video-sys", - "dispatch", - "instant", - "lazy_static", - "libc", - "log", - "mio 0.6.23", - "mio-extras", - "ndk 0.2.1", - "ndk-glue 0.2.1", - "ndk-sys 0.2.2", - "objc", - "parking_lot 0.11.2", - "percent-encoding", - "raw-window-handle 0.3.4", - "smithay-client-toolkit 0.12.3", - "wasm-bindgen", - "wayland-client 0.28.6", - "web-sys", - "winapi 0.3.9", - "x11-dl", -] +checksum = "ed94fce61571a4006852b7389a063ab983c02eb1bb37b47f8272ce92d06d9538" [[package]] name = "winit" @@ -3236,7 +2605,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9b43cc931d58b99461188607efd7acb2a093e65fc621f54cad78517a6063e73a" dependencies = [ "bitflags 1.3.2", - "cocoa 0.24.1", + "cocoa", "core-foundation 0.9.3", "core-graphics 0.22.3", "core-video-sys", @@ -3245,7 +2614,7 @@ dependencies = [ "lazy_static", "libc", "log", - "mio 0.8.8", + "mio", "ndk 0.5.0", "ndk-glue 0.5.2", "ndk-sys 0.2.2", @@ -3255,10 +2624,10 @@ dependencies = [ "raw-window-handle 0.4.3", "smithay-client-toolkit 0.15.4", "wasm-bindgen", - "wayland-client 0.29.5", - "wayland-protocols 0.29.5", + "wayland-client", + "wayland-protocols", "web-sys", - "winapi 0.3.9", + "winapi", "x11-dl", ] @@ -3269,14 +2638,14 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bb796d6fbd86b2fd896c9471e6f04d39d750076ebe5680a3958f00f5ab97657c" dependencies = [ "bitflags 1.3.2", - "cocoa 0.24.1", + "cocoa", "core-foundation 0.9.3", "core-graphics 0.22.3", "dispatch", "instant", "libc", "log", - "mio 0.8.8", + "mio", "ndk 0.7.0", "ndk-glue 0.7.0", "objc", @@ -3288,8 +2657,8 @@ dependencies = [ "sctk-adwaita", "smithay-client-toolkit 0.16.0", "wasm-bindgen", - "wayland-client 0.29.5", - "wayland-protocols 0.29.5", + "wayland-client", + "wayland-protocols", "web-sys", "windows-sys 0.36.1", "x11-dl", @@ -3297,9 +2666,9 @@ dependencies = [ [[package]] name = "winnow" -version = "0.4.8" +version = "0.5.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a9482fe6ceabdf32f3966bfdd350ba69256a97c30253dc616fe0005af24f164e" +checksum = "7c2e3184b9c4e92ad5167ca73039d0c42476302ab603e2fec4487511f38ccefc" dependencies = [ "memchr", ] @@ -3310,17 +2679,7 @@ version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5d129932f4644ac2396cb456385cbf9e63b5b30c6e8dc4820bdca4eb082037a5" dependencies = [ - "winapi 0.3.9", -] - -[[package]] -name = "ws2_32-sys" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d59cefebd0c892fa2dd6de581e937301d8552cb44489cdff035c6187cb63fa5e" -dependencies = [ - "winapi 0.2.8", - "winapi-build", + "winapi", ] [[package]] @@ -3343,17 +2702,8 @@ dependencies = [ "nom", ] -[[package]] -name = "xdg" -version = "2.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "688597db5a750e9cad4511cb94729a078e274308099a0382b5b8203bbc767fee" -dependencies = [ - "home", -] - [[package]] name = "xml-rs" -version = "0.8.15" +version = "0.8.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5a56c84a8ccd4258aed21c92f70c0f6dea75356b6892ae27c24139da456f9336" +checksum = "47430998a7b5d499ccee752b41567bc3afc57e1327dc855b1a2aa44ce29b5fa1" diff --git a/resources/curses12x24.png b/resources/curses12x24.png new file mode 100644 index 0000000..af280d7 Binary files /dev/null and b/resources/curses12x24.png differ diff --git a/resources/curses16x16.png b/resources/curses16x16.png new file mode 100644 index 0000000..15767ca Binary files /dev/null and b/resources/curses16x16.png differ diff --git a/resources/nagidal24x24.png b/resources/nagidal24x24.png new file mode 100644 index 0000000..8c7c82b Binary files /dev/null and b/resources/nagidal24x24.png differ diff --git a/src/camera.rs b/src/camera.rs index c71e12c..82fb98b 100644 --- a/src/camera.rs +++ b/src/camera.rs @@ -2,13 +2,14 @@ use super::{ Hidden, Map, Mind, Position, Prop, Renderable }; use rltk::prelude::*; use specs::prelude::*; use std::ops::Mul; +use super::data::visuals::{ VIEWPORT_W, VIEWPORT_H }; const SHOW_BOUNDARIES: bool = false; pub fn get_screen_bounds(ecs: &World, _ctx: &mut Rltk) -> (i32, i32, i32, i32, i32, i32) { let player_pos = ecs.fetch::(); let map = ecs.fetch::(); - let (x_chars, y_chars, mut x_offset, mut y_offset) = (69, 41, 1, 10); + let (x_chars, y_chars, mut x_offset, mut y_offset) = (VIEWPORT_W, VIEWPORT_H, 1, 10); let centre_x = (x_chars / 2) as i32; let centre_y = (y_chars / 2) as i32; @@ -52,7 +53,13 @@ pub fn render_camera(ecs: &World, ctx: &mut Rltk) { ctx.set(x + x_offset, y + y_offset, fg, bg, glyph); } } else if SHOW_BOUNDARIES { - ctx.set(x + x_offset, y + y_offset, RGB::named(DARKSLATEGRAY), RGB::named(BLACK), rltk::to_cp437('#')); + ctx.set( + x + x_offset, + y + y_offset, + RGB::named(DARKSLATEGRAY), + RGB::named(BLACK), + rltk::to_cp437('#') + ); } x += 1; } @@ -112,7 +119,13 @@ pub fn render_camera(ecs: &World, ctx: &mut Rltk) { } } if draw { - ctx.set(entity_offset_x + x_offset, entity_offset_y + y_offset, fg, bg, render.glyph); + ctx.set( + entity_offset_x + x_offset, + entity_offset_y + y_offset, + fg, + bg, + render.glyph + ); } } } @@ -141,7 +154,12 @@ pub fn render_debug_map(map: &Map, ctx: &mut Rltk) { if tx >= 0 && tx < map_width && ty >= 0 && ty < map_height { let idx = map.xy_idx(tx, ty); if map.revealed_tiles[idx] { - let (glyph, fg, bg) = crate::map::themes::get_tile_renderables_for_id(idx, &*map, None, None); + let (glyph, fg, bg) = crate::map::themes::get_tile_renderables_for_id( + idx, + &*map, + None, + None + ); ctx.set(x, y, fg, bg, glyph); } } else if SHOW_BOUNDARIES { diff --git a/src/data/visuals.rs b/src/data/visuals.rs index fd348ea..a46ee1c 100644 --- a/src/data/visuals.rs +++ b/src/data/visuals.rs @@ -1,5 +1,7 @@ // POST-PROCESSING pub const WITH_DARKEN_BY_DISTANCE: bool = true; // If further away tiles should get darkened, instead of a harsh transition to non-visible. +pub const VIEWPORT_W: i32 = 40; +pub const VIEWPORT_H: i32 = 30; pub const BRIGHTEN_FG_COLOUR_BY: i32 = 16; pub const GLOBAL_OFFSET_MIN_CLAMP: f32 = -0.5; diff --git a/src/gui/character_creation.rs b/src/gui/character_creation.rs index 947e4c8..c198b92 100644 --- a/src/gui/character_creation.rs +++ b/src/gui/character_creation.rs @@ -112,6 +112,7 @@ pub enum CharCreateResult { /// Handles the player character creation screen. pub fn character_creation(gs: &mut State, ctx: &mut Rltk) -> CharCreateResult { + ctx.set_active_console(1); let runstate = gs.ecs.fetch::(); let mut x = 2; @@ -245,6 +246,7 @@ pub fn character_creation(gs: &mut State, ctx: &mut Rltk) -> CharCreateResult { } } } + ctx.set_active_console(0); return CharCreateResult::NoSelection { ancestry: Ancestry::Human, class: Class::Fighter }; } diff --git a/src/gui/farlook.rs b/src/gui/farlook.rs index beea815..2c232df 100644 --- a/src/gui/farlook.rs +++ b/src/gui/farlook.rs @@ -23,7 +23,7 @@ pub fn show_farlook(gs: &mut State, ctx: &mut Rltk) -> FarlookResult { ); if let RunState::Farlook { x, y } = *runstate { - let (screen_x, screen_y) = (69, 41); + let (screen_x, screen_y) = (40, 30); let x = x.clamp(x_offset, x_offset - 1 + (screen_x as i32)); let y = y.clamp(y_offset, y_offset - 1 + (screen_y as i32)); diff --git a/src/gui/mod.rs b/src/gui/mod.rs index d80d476..0041d04 100644 --- a/src/gui/mod.rs +++ b/src/gui/mod.rs @@ -35,7 +35,14 @@ use super::{ data::ids::get_local_col, }; use crate::data::entity::CARRY_CAPACITY_PER_STRENGTH; -use crate::data::visuals::{ TARGETING_LINE_COL, TARGETING_CURSOR_COL, TARGETING_AOE_COL, TARGETING_VALID_COL }; +use crate::data::visuals::{ + TARGETING_LINE_COL, + TARGETING_CURSOR_COL, + TARGETING_AOE_COL, + TARGETING_VALID_COL, + VIEWPORT_W, + VIEWPORT_H, +}; use rltk::prelude::*; use specs::prelude::*; use std::collections::BTreeMap; @@ -96,7 +103,10 @@ pub fn draw_lerping_bar( ctx.print(sx + width, sy, "]"); } +pub const TEXT_FONT_MOD: i32 = 2; + pub fn draw_ui(ecs: &World, ctx: &mut Rltk) { + ctx.set_active_console(1); // Render stats let pools = ecs.read_storage::(); let attributes = ecs.read_storage::(); @@ -104,12 +114,18 @@ pub fn draw_ui(ecs: &World, ctx: &mut Rltk) { let hunger = ecs.read_storage::(); let burden = ecs.read_storage::(); let skills = ecs.read_storage::(); - for (_player, stats, attributes, hunger, skills) in (&players, &pools, &attributes, &hunger, &skills).join() { + for (_player, stats, attributes, hunger, skills) in ( + &players, + &pools, + &attributes, + &hunger, + &skills, + ).join() { // Draw hp/mana bars draw_lerping_bar( ctx, - 2, - 53, + 2 * TEXT_FONT_MOD, + 53 * TEXT_FONT_MOD, 22, stats.hit_points.current, stats.hit_points.max, @@ -118,8 +134,8 @@ pub fn draw_ui(ecs: &World, ctx: &mut Rltk) { ); draw_lerping_bar( ctx, - 2, - 54, + 2 * TEXT_FONT_MOD, + 54 * TEXT_FONT_MOD, 22, stats.mana.current, stats.mana.max, @@ -137,66 +153,169 @@ pub fn draw_ui(ecs: &World, ctx: &mut Rltk) { armour_ac_bonus += ac.amount; } } - let armour_class = stats.bac - attributes.dexterity.bonus / 2 - skill_ac_bonus - armour_ac_bonus; - ctx.print_color(26, 53, RGB::named(rltk::PINK), RGB::named(rltk::BLACK), "AC"); - ctx.print_color(28, 53, RGB::named(rltk::WHITE), RGB::named(rltk::BLACK), armour_class); + let armour_class = + stats.bac - attributes.dexterity.bonus / 2 - skill_ac_bonus - armour_ac_bonus; + ctx.print_color( + 26 * TEXT_FONT_MOD, + 53, + RGB::named(rltk::PINK), + RGB::named(rltk::BLACK), + "AC" + ); + ctx.print_color( + 28 * TEXT_FONT_MOD, + 53, + RGB::named(rltk::WHITE), + RGB::named(rltk::BLACK), + armour_class + ); // Draw level ctx.print_color( - 26, + 26 * TEXT_FONT_MOD, 54, RGB::named(rltk::WHITE), RGB::named(rltk::BLACK), format!("XP{}/{}", stats.level, stats.xp) ); // Draw attributes - let x = 38; + let x = 38 * TEXT_FONT_MOD; ctx.print_color(x, 53, RGB::named(rltk::RED), RGB::named(rltk::BLACK), "STR"); - ctx.print_color(x + 3, 53, RGB::named(rltk::WHITE), RGB::named(rltk::BLACK), attributes.strength.base); + ctx.print_color( + x + 3, + 53, + RGB::named(rltk::WHITE), + RGB::named(rltk::BLACK), + attributes.strength.base + ); ctx.print_color(x + 7, 53, RGB::named(rltk::GREEN), RGB::named(rltk::BLACK), "DEX"); - ctx.print_color(x + 10, 53, RGB::named(rltk::WHITE), RGB::named(rltk::BLACK), attributes.dexterity.base); + ctx.print_color( + x + 10, + 53, + RGB::named(rltk::WHITE), + RGB::named(rltk::BLACK), + attributes.dexterity.base + ); ctx.print_color(x + 14, 53, RGB::named(rltk::ORANGE), RGB::named(rltk::BLACK), "CON"); - ctx.print_color(x + 17, 53, RGB::named(rltk::WHITE), RGB::named(rltk::BLACK), attributes.constitution.base); + ctx.print_color( + x + 17, + 53, + RGB::named(rltk::WHITE), + RGB::named(rltk::BLACK), + attributes.constitution.base + ); ctx.print_color(x, 54, RGB::named(rltk::CYAN), RGB::named(rltk::BLACK), "INT"); - ctx.print_color(x + 3, 54, RGB::named(rltk::WHITE), RGB::named(rltk::BLACK), attributes.intelligence.base); + ctx.print_color( + x + 3, + 54, + RGB::named(rltk::WHITE), + RGB::named(rltk::BLACK), + attributes.intelligence.base + ); ctx.print_color(x + 7, 54, RGB::named(rltk::YELLOW), RGB::named(rltk::BLACK), "WIS"); - ctx.print_color(x + 10, 54, RGB::named(rltk::WHITE), RGB::named(rltk::BLACK), attributes.wisdom.base); + ctx.print_color( + x + 10, + 54, + RGB::named(rltk::WHITE), + RGB::named(rltk::BLACK), + attributes.wisdom.base + ); ctx.print_color(x + 14, 54, RGB::named(rltk::PURPLE), RGB::named(rltk::BLACK), "CHA"); - ctx.print_color(x + 17, 54, RGB::named(rltk::WHITE), RGB::named(rltk::BLACK), attributes.charisma.base); + ctx.print_color( + x + 17, + 54, + RGB::named(rltk::WHITE), + RGB::named(rltk::BLACK), + attributes.charisma.base + ); // Draw hunger match hunger.state { HungerState::Satiated => { - ctx.print_color_right(70, 53, get_hunger_colour(hunger.state), RGB::named(rltk::BLACK), "Satiated"); + ctx.print_color_right( + (VIEWPORT_W + 1) * TEXT_FONT_MOD, + 53, + get_hunger_colour(hunger.state), + RGB::named(rltk::BLACK), + "Satiated" + ); } HungerState::Normal => {} HungerState::Hungry => { - ctx.print_color_right(70, 53, get_hunger_colour(hunger.state), RGB::named(rltk::BLACK), "Hungry"); + ctx.print_color_right( + (VIEWPORT_W + 1) * TEXT_FONT_MOD, + 53, + get_hunger_colour(hunger.state), + RGB::named(rltk::BLACK), + "Hungry" + ); } HungerState::Weak => { - ctx.print_color_right(70, 53, get_hunger_colour(hunger.state), RGB::named(rltk::BLACK), "Weak"); + ctx.print_color_right( + (VIEWPORT_W + 1) * TEXT_FONT_MOD, + 53, + get_hunger_colour(hunger.state), + RGB::named(rltk::BLACK), + "Weak" + ); } HungerState::Fainting => { - ctx.print_color_right(70, 53, get_hunger_colour(hunger.state), RGB::named(rltk::BLACK), "Fainting"); + ctx.print_color_right( + (VIEWPORT_W + 1) * TEXT_FONT_MOD, + 53, + get_hunger_colour(hunger.state), + RGB::named(rltk::BLACK), + "Fainting" + ); } HungerState::Starving => { - ctx.print_color_right(70, 53, get_hunger_colour(hunger.state), RGB::named(rltk::BLACK), "Starving"); + ctx.print_color_right( + (VIEWPORT_W + 1) * TEXT_FONT_MOD, + 53, + get_hunger_colour(hunger.state), + RGB::named(rltk::BLACK), + "Starving" + ); } } // Burden if let Some(burden) = burden.get(*player_entity) { match burden.level { crate::BurdenLevel::Burdened => { - ctx.print_color_right(70, 50, RGB::named(rltk::BROWN1), RGB::named(rltk::BLACK), "Burdened"); + ctx.print_color_right( + (VIEWPORT_W + 1) * TEXT_FONT_MOD, + 50, + RGB::named(rltk::BROWN1), + RGB::named(rltk::BLACK), + "Burdened" + ); } crate::BurdenLevel::Strained => { - ctx.print_color_right(70, 50, RGB::named(rltk::ORANGE), RGB::named(rltk::BLACK), "Strained"); + ctx.print_color_right( + (VIEWPORT_W + 1) * TEXT_FONT_MOD, + 50, + RGB::named(rltk::ORANGE), + RGB::named(rltk::BLACK), + "Strained" + ); } crate::BurdenLevel::Overloaded => { - ctx.print_color_right(70, 50, RGB::named(rltk::RED), RGB::named(rltk::BLACK), "Overloaded"); + ctx.print_color_right( + (VIEWPORT_W + 1) * TEXT_FONT_MOD, + 50, + RGB::named(rltk::RED), + RGB::named(rltk::BLACK), + "Overloaded" + ); } } } if stats.god { - ctx.print_color(20, 20, RGB::named(rltk::YELLOW), RGB::named(rltk::BLACK), "--- GODMODE: ON ---"); + ctx.print_color( + 20 * TEXT_FONT_MOD, + 20, + RGB::named(rltk::YELLOW), + RGB::named(rltk::BLACK), + "--- GODMODE: ON ---" + ); } // Draw equipment let renderables = ecs.read_storage::(); @@ -214,47 +333,96 @@ pub fn draw_ui(ecs: &World, ctx: &mut Rltk) { } let mut y = 1; if !equipment.is_empty() { - ctx.print_color(72, y, RGB::named(rltk::BLACK), RGB::named(rltk::WHITE), "Equipment"); + ctx.print_color( + (VIEWPORT_W + 3) * TEXT_FONT_MOD, + y, + RGB::named(rltk::BLACK), + RGB::named(rltk::WHITE), + "Equipment" + ); let mut j = 0; for item in equipment { y += 1; - ctx.set(72, y, RGB::named(rltk::YELLOW), RGB::named(rltk::BLACK), 97 + (j as rltk::FontCharType)); + ctx.set( + (VIEWPORT_W + 3) * TEXT_FONT_MOD, + y, + RGB::named(rltk::YELLOW), + RGB::named(rltk::BLACK), + 97 + (j as rltk::FontCharType) + ); j += 1; - ctx.set(74, y, item.2, RGB::named(rltk::BLACK), item.3); - ctx.print_color(76, y, item.1, RGB::named(rltk::BLACK), &item.0); - ctx.print_color(76 + &item.0.len() + 1, y, RGB::named(rltk::WHITE), RGB::named(rltk::BLACK), "(worn)"); + ctx.set( + (VIEWPORT_W + 3) * TEXT_FONT_MOD + 2, + y, + item.2, + RGB::named(rltk::BLACK), + item.3 + ); + ctx.print_color( + (VIEWPORT_W + 3) * TEXT_FONT_MOD + 4, + y, + item.1, + RGB::named(rltk::BLACK), + &item.0 + ); + ctx.print_color( + (VIEWPORT_W + 3) * TEXT_FONT_MOD + 4 + (item.0.len() as i32) + 1, + y, + RGB::named(rltk::WHITE), + RGB::named(rltk::BLACK), + "(worn)" + ); } y += 2; } // Draw consumables - ctx.print_color(72, y, RGB::named(rltk::BLACK), RGB::named(rltk::WHITE), "Backpack"); ctx.print_color( - 81, + (VIEWPORT_W + 3) * TEXT_FONT_MOD, + y, + RGB::named(rltk::BLACK), + RGB::named(rltk::WHITE), + "Backpack" + ); + ctx.print_color( + (VIEWPORT_W + 12) * TEXT_FONT_MOD, y, RGB::named(rltk::WHITE), RGB::named(rltk::BLACK), &format!( "[{:.1}/{} lbs]", stats.weight, - (attributes.strength.base + attributes.strength.modifiers) * CARRY_CAPACITY_PER_STRENGTH + (attributes.strength.base + attributes.strength.modifiers) * + CARRY_CAPACITY_PER_STRENGTH ) ); y += 1; let player_inventory = get_player_inventory(&ecs); - y = print_options(&player_inventory, 72, y, ctx).0; + y = print_options(&player_inventory, (VIEWPORT_W + 3) * TEXT_FONT_MOD, y, ctx).0; // Draw spells - if we have any -- NYI! if let Some(known_spells) = ecs.read_storage::().get(*player_entity) { y += 1; // Draw known spells - ctx.print_color(72, y, RGB::named(BLACK), RGB::named(WHITE), "Known Spells"); + ctx.print_color( + (VIEWPORT_W + 3) * TEXT_FONT_MOD, + y, + RGB::named(BLACK), + RGB::named(WHITE), + "Known Spells" + ); y += 1; let mut index = 1; for spell in known_spells.list.iter() { - ctx.print_color(72, y, RGB::named(YELLOW), RGB::named(BLACK), &format!("{}", index)); ctx.print_color( - 74, + (VIEWPORT_W + 3) * TEXT_FONT_MOD, + y, + RGB::named(YELLOW), + RGB::named(BLACK), + &format!("{}", index) + ); + ctx.print_color( + (VIEWPORT_W + 3) * TEXT_FONT_MOD + 1, y, RGB::named(CYAN), RGB::named(BLACK), @@ -311,32 +479,101 @@ pub fn draw_ui(ecs: &World, ctx: &mut Rltk) { if !seen_entities.is_empty() { y += 1; - ctx.print_color(72, y, RGB::named(rltk::BLACK), RGB::named(rltk::WHITE), "In View"); + ctx.print_color( + (VIEWPORT_W + 3) * TEXT_FONT_MOD, + y, + RGB::named(rltk::BLACK), + RGB::named(rltk::WHITE), + "In View" + ); for entity in seen_entities { y += 1; - ctx.set(72, y, entity.2, RGB::named(rltk::BLACK), entity.3); - ctx.print_color(74, y, entity.1, RGB::named(rltk::BLACK), entity.0); + ctx.set( + (VIEWPORT_W + 3) * TEXT_FONT_MOD, + y, + entity.2, + RGB::named(rltk::BLACK), + entity.3 + ); + ctx.print_color( + (VIEWPORT_W + 3) * TEXT_FONT_MOD + 1, + y, + entity.1, + RGB::named(rltk::BLACK), + entity.0 + ); } } } // Render the message log at [1, 7], ascending, with 7 lines and a max width of 68. - gamelog::print_log(&mut rltk::BACKEND_INTERNAL.lock().consoles[0].console, Point::new(1, 7), false, 7, 68); + gamelog::print_log( + &mut rltk::BACKEND_INTERNAL.lock().consoles[1].console, + Point::new(1 * TEXT_FONT_MOD, 7), + false, + 7, + (VIEWPORT_W - 1) * TEXT_FONT_MOD + ); // Render id let map = ecs.fetch::(); - let id = if map.depth > 0 { format!("{}{}", map.short_name, map.depth) } else { format!("{}", map.short_name) }; - ctx.print_color_right(70, 54, get_local_col(map.id), RGB::named(rltk::BLACK), &id); + let id = if map.depth > 0 { + format!("{}{}", map.short_name, map.depth) + } else { + format!("{}", map.short_name) + }; + ctx.print_color_right( + (VIEWPORT_W + 1) * TEXT_FONT_MOD, + 54, + get_local_col(map.id), + RGB::named(rltk::BLACK), + &id + ); // Render turn let turns = crate::gamelog::get_event_count(EVENT::COUNT_TURN); - ctx.print_color_right(69 - id.len(), 54, RGB::named(rltk::YELLOW), RGB::named(rltk::BLACK), &format!("T{}", turns)); + ctx.print_color_right( + VIEWPORT_W * TEXT_FONT_MOD - (id.len() as i32), + 54, + RGB::named(rltk::YELLOW), + RGB::named(rltk::BLACK), + &format!("T{}", turns) + ); // Boxes and tooltips last, so they draw over everything else. - ctx.draw_hollow_box(0, 0, 70, 8, RGB::named(rltk::WHITE), RGB::named(rltk::BLACK)); // Log box - ctx.draw_hollow_box(0, 9, 70, 42, RGB::named(rltk::WHITE), RGB::named(rltk::BLACK)); // Camera box - ctx.draw_hollow_box(0, 52, 70, 3, RGB::named(rltk::WHITE), RGB::named(rltk::BLACK)); // Stats box - ctx.draw_hollow_box(71, 0, 33, 55, RGB::named(rltk::WHITE), RGB::named(rltk::BLACK)); // Side box + ctx.draw_hollow_box( + 0 * TEXT_FONT_MOD, + 0, + (VIEWPORT_W + 1) * TEXT_FONT_MOD, + 8, + RGB::named(rltk::WHITE), + RGB::named(rltk::BLACK) + ); // Log box + ctx.draw_hollow_box( + 0 * TEXT_FONT_MOD, + 9, + (VIEWPORT_W + 1) * TEXT_FONT_MOD, + 42, + RGB::named(rltk::WHITE), + RGB::named(rltk::BLACK) + ); // Camera box + ctx.draw_hollow_box( + 0 * TEXT_FONT_MOD, + 52, + (VIEWPORT_W + 1) * TEXT_FONT_MOD, + 3, + RGB::named(rltk::WHITE), + RGB::named(rltk::BLACK) + ); // Stats box + ctx.draw_hollow_box( + (VIEWPORT_W + 2) * TEXT_FONT_MOD, + 0, + 33 * TEXT_FONT_MOD, + 55, + RGB::named(rltk::WHITE), + RGB::named(rltk::BLACK) + ); // Side box + ctx.set_active_console(0); tooltip::draw_tooltips(ecs, ctx, None); } @@ -403,7 +640,12 @@ pub enum ItemMenuResult { Selected, } -pub fn print_options(inventory: &PlayerInventory, mut x: i32, mut y: i32, ctx: &mut Rltk) -> (i32, i32) { +pub fn print_options( + inventory: &PlayerInventory, + mut x: i32, + mut y: i32, + ctx: &mut Rltk +) -> (i32, i32) { let mut j = 0; let initial_x: i32 = x; let mut width: i32 = -1; @@ -411,10 +653,22 @@ pub fn print_options(inventory: &PlayerInventory, mut x: i32, mut y: i32, ctx: & x = initial_x; // Print the character required to access this item. i.e. (a) if j < 26 { - ctx.set(x, y, RGB::named(rltk::YELLOW), RGB::named(rltk::BLACK), 97 + (j as rltk::FontCharType)); + ctx.set( + x, + y, + RGB::named(rltk::YELLOW), + RGB::named(rltk::BLACK), + 97 + (j as rltk::FontCharType) + ); } else { // If we somehow have more than 26, start using capitals - ctx.set(x, y, RGB::named(rltk::YELLOW), RGB::named(rltk::BLACK), 65 - 26 + (j as rltk::FontCharType)); + ctx.set( + x, + y, + RGB::named(rltk::YELLOW), + RGB::named(rltk::BLACK), + 65 - 26 + (j as rltk::FontCharType) + ); } x += 2; @@ -428,7 +682,13 @@ pub fn print_options(inventory: &PlayerInventory, mut x: i32, mut y: i32, ctx: & // i.e. (a) 3 daggers ctx.print_color(x, y, fg, RGB::named(rltk::BLACK), item_count); x += 2; - ctx.print_color(x, y, fg, RGB::named(rltk::BLACK), item.display_name.plural.to_string()); + ctx.print_color( + x, + y, + fg, + RGB::named(rltk::BLACK), + item.display_name.plural.to_string() + ); let this_width = x - initial_x + (item.display_name.plural.len() as i32); width = if width > this_width { width } else { this_width }; } else { @@ -436,7 +696,9 @@ pub fn print_options(inventory: &PlayerInventory, mut x: i32, mut y: i32, ctx: & ctx.print_color(x, y, fg, RGB::named(rltk::BLACK), "some"); x += 5; } else if - ['a', 'e', 'i', 'o', 'u'].iter().any(|&v| item.display_name.singular.to_lowercase().starts_with(v)) + ['a', 'e', 'i', 'o', 'u'] + .iter() + .any(|&v| item.display_name.singular.to_lowercase().starts_with(v)) { // If one and starts with a vowel, print 'an' // i.e. (a) an apple @@ -448,7 +710,13 @@ pub fn print_options(inventory: &PlayerInventory, mut x: i32, mut y: i32, ctx: & ctx.print_color(x, y, fg, RGB::named(rltk::BLACK), "a"); x += 2; } - ctx.print_color(x, y, fg, RGB::named(rltk::BLACK), item.display_name.singular.to_string()); + ctx.print_color( + x, + y, + fg, + RGB::named(rltk::BLACK), + item.display_name.singular.to_string() + ); let this_width = x - initial_x + (item.display_name.singular.len() as i32); width = if width > this_width { width } else { this_width }; } @@ -463,18 +731,20 @@ pub fn print_options(inventory: &PlayerInventory, mut x: i32, mut y: i32, ctx: & pub fn get_max_inventory_width(inventory: &PlayerInventory) -> i32 { let mut width: i32 = 0; for (item, (_e, count)) in inventory { - let mut this_width = item.display_name.singular.len() as i32; - // Clean this up. It should use consts. - this_width += 4; // The spaces before and after the character to select this item, etc. + let mut this_width = 4; // The spaces before and after the character to select this item, etc. if count <= &1 { + this_width += item.display_name.singular.len() as i32; if item.display_name.singular == item.display_name.plural { this_width += 4; // "some".len - } else if ['a', 'e', 'i', 'o', 'u'].iter().any(|&v| item.display_name.singular.starts_with(v)) { + } else if + ['a', 'e', 'i', 'o', 'u'].iter().any(|&v| item.display_name.singular.starts_with(v)) + { this_width += 2; // "an".len } else { this_width += 1; // "a".len } } else { + this_width += item.display_name.plural.len() as i32; this_width += count.to_string().len() as i32; // i.e. "12".len } width = if width > this_width { width } else { this_width }; @@ -492,7 +762,10 @@ pub fn obfuscate_name( dm: &MasterDungeonMap, wand: Option<&ReadStorage> ) -> (String, String) { - let (mut singular, mut plural) = ("nameless item (bug)".to_string(), "nameless items (bug)".to_string()); + let (mut singular, mut plural) = ( + "nameless item (bug)".to_string(), + "nameless items (bug)".to_string(), + ); if let Some(name) = names.get(item) { if magic_items.get(item).is_some() { if dm.identified_items.contains(&name.name) { @@ -510,7 +783,10 @@ pub fn obfuscate_name( } else if let Some(obfuscated) = obfuscated_names.get(item) { (singular, plural) = (obfuscated.name.clone(), obfuscated.plural.clone()); } else { - (singular, plural) = ("unid magic item".to_string(), "unid magic items".to_string()); + (singular, plural) = ( + "unid magic item".to_string(), + "unid magic items".to_string(), + ); } } else { (singular, plural) = (name.name.clone(), name.plural.clone()); @@ -534,7 +810,10 @@ pub fn obfuscate_name( // Outside the ECS pub fn obfuscate_name_ecs(ecs: &World, item: Entity) -> (String, String) { - let (mut singular, mut plural) = ("nameless item (bug)".to_string(), "nameless items (bug)".to_string()); + let (mut singular, mut plural) = ( + "nameless item (bug)".to_string(), + "nameless items (bug)".to_string(), + ); if let Some(name) = ecs.read_storage::().get(item) { if ecs.read_storage::().get(item).is_some() { let dm = ecs.fetch::(); @@ -550,7 +829,10 @@ pub fn obfuscate_name_ecs(ecs: &World, item: Entity) -> (String, String) { } else if let Some(obfuscated) = ecs.read_storage::().get(item) { (singular, plural) = (obfuscated.name.clone(), obfuscated.plural.clone()); } else { - (singular, plural) = ("unid magic item".to_string(), "unid magic items".to_string()); + (singular, plural) = ( + "unid magic item".to_string(), + "unid magic items".to_string(), + ); } } else { (singular, plural) = (name.name.clone(), name.plural.clone()); @@ -592,7 +874,11 @@ pub fn unobf_name_ecs(ecs: &World, item: Entity) -> (String, String) { /// Gets renderable colour as tuple of u8 pub fn renderable_colour(renderables: &ReadStorage, entity: Entity) -> (u8, u8, u8) { return if let Some(renderable) = renderables.get(entity) { - ((renderable.fg.r * 255.0) as u8, (renderable.fg.g * 255.0) as u8, (renderable.fg.b * 255.0) as u8) + ( + (renderable.fg.r * 255.0) as u8, + (renderable.fg.g * 255.0) as u8, + (renderable.fg.b * 255.0) as u8, + ) } else { WHITE }; @@ -601,7 +887,11 @@ pub fn renderable_colour(renderables: &ReadStorage, entity: Entity) /// Gets renderable colour as tuple of u8 pub fn renderable_colour_ecs(ecs: &World, entity: Entity) -> (u8, u8, u8) { return if let Some(renderable) = ecs.read_storage::().get(entity) { - ((renderable.fg.r * 255.0) as u8, (renderable.fg.g * 255.0) as u8, (renderable.fg.b * 255.0) as u8) + ( + (renderable.fg.r * 255.0) as u8, + (renderable.fg.g * 255.0) as u8, + (renderable.fg.b * 255.0) as u8, + ) } else { WHITE }; @@ -660,7 +950,13 @@ pub fn show_help(ctx: &mut Rltk) -> YesNoResult { let width = 25; ctx.draw_box(x, y, width, height, RGB::named(rltk::WHITE), RGB::named(rltk::BLACK)); ctx.print_color(x + 3, y, RGB::named(rltk::YELLOW), RGB::named(rltk::BLACK), " Controls "); - ctx.print_color(x + 3, y + height, RGB::named(rltk::YELLOW), RGB::named(rltk::BLACK), " ESC/? to close "); + ctx.print_color( + x + 3, + y + height, + RGB::named(rltk::YELLOW), + RGB::named(rltk::BLACK), + " ESC/? to close " + ); x += 2; y += 2; ctx.print_color(x, y, RGB::named(rltk::GREEN), RGB::named(rltk::BLACK), "MOVE COMMANDS"); @@ -767,10 +1063,12 @@ pub fn get_player_inventory(ecs: &World) -> PlayerInventory { } pub fn show_inventory(gs: &mut State, ctx: &mut Rltk) -> (ItemMenuResult, Option) { + ctx.set_active_console(1); + let player_inventory = get_player_inventory(&gs.ecs); let count = player_inventory.len(); - let (x_offset, y_offset) = (1, 10); + let (x_offset, y_offset) = (1 * TEXT_FONT_MOD, 10); let on_overmap = gs.ecs.fetch::().overmap; let message = if !on_overmap { @@ -779,14 +1077,29 @@ pub fn show_inventory(gs: &mut State, ctx: &mut Rltk) -> (ItemMenuResult, Option "You can't use items on the overmap [Esc.]" }; - ctx.print_color(1 + x_offset, 1 + y_offset, RGB::named(rltk::WHITE), RGB::named(rltk::BLACK), message); + ctx.print_color( + 1 + x_offset, + 1 + y_offset, + RGB::named(rltk::WHITE), + RGB::named(rltk::BLACK), + message + ); let x = 1 + x_offset; let y = 3 + y_offset; let width = get_max_inventory_width(&player_inventory); - ctx.draw_box(x, y, width + 2, (count + 1) as i32, RGB::named(rltk::WHITE), RGB::named(rltk::BLACK)); + ctx.draw_box( + x, + y, + width + 2, + (count + 1) as i32, + RGB::named(rltk::WHITE), + RGB::named(rltk::BLACK) + ); print_options(&player_inventory, x + 1, y + 1, ctx); + ctx.set_active_console(0); + match ctx.key { None => (ItemMenuResult::NoResponse, None), Some(key) => @@ -796,7 +1109,10 @@ pub fn show_inventory(gs: &mut State, ctx: &mut Rltk) -> (ItemMenuResult, Option let selection = letter_to_option::letter_to_option(key, ctx.shift); if selection > -1 && selection < (count as i32) { if on_overmap { - gamelog::Logger::new().append("You can't use items on the overmap.").log(); + gamelog::Logger + ::new() + .append("You can't use items on the overmap.") + .log(); } else { return ( ItemMenuResult::Selected, @@ -822,14 +1138,31 @@ pub fn drop_item_menu(gs: &mut State, ctx: &mut Rltk) -> (ItemMenuResult, Option let (x_offset, y_offset) = (1, 10); let on_overmap = gs.ecs.fetch::().overmap; - let message = if !on_overmap { "Drop what? [aA-zZ][Esc.]" } else { "You can't drop items on the overmap [Esc.]" }; + let message = if !on_overmap { + "Drop what? [aA-zZ][Esc.]" + } else { + "You can't drop items on the overmap [Esc.]" + }; - ctx.print_color(1 + x_offset, 1 + y_offset, RGB::named(rltk::WHITE), RGB::named(rltk::BLACK), message); + ctx.print_color( + 1 + x_offset, + 1 + y_offset, + RGB::named(rltk::WHITE), + RGB::named(rltk::BLACK), + message + ); let x = 1 + x_offset; let y = 3 + y_offset; let width = get_max_inventory_width(&player_inventory); - ctx.draw_box(x, y, width + 2, (count + 1) as i32, RGB::named(rltk::WHITE), RGB::named(rltk::BLACK)); + ctx.draw_box( + x, + y, + width + 2, + (count + 1) as i32, + RGB::named(rltk::WHITE), + RGB::named(rltk::BLACK) + ); print_options(&player_inventory, x + 1, y + 1, ctx); match ctx.key { @@ -841,7 +1174,10 @@ pub fn drop_item_menu(gs: &mut State, ctx: &mut Rltk) -> (ItemMenuResult, Option let selection = rltk::letter_to_option(key); if selection > -1 && selection < (count as i32) { if on_overmap { - gamelog::Logger::new().append("You can't drop items on the overmap.").log(); + gamelog::Logger + ::new() + .append("You can't drop items on the overmap.") + .log(); } else { return ( ItemMenuResult::Selected, @@ -879,7 +1215,9 @@ pub fn remove_item_menu(gs: &mut State, ctx: &mut Rltk) -> (ItemMenuResult, Opti let mut equippable: Vec<(Entity, String)> = Vec::new(); let mut width = 2; - for (entity, _pack) in (&entities, &backpack).join().filter(|item| item.1.owner == *player_entity) { + for (entity, _pack) in (&entities, &backpack) + .join() + .filter(|item| item.1.owner == *player_entity) { let this_name = &obfuscate_name_ecs(&gs.ecs, entity).0; let this_width = 5 + this_name.len(); width = if width > this_width { width } else { this_width }; @@ -900,7 +1238,13 @@ pub fn remove_item_menu(gs: &mut State, ctx: &mut Rltk) -> (ItemMenuResult, Opti } else { (RGB::named(rltk::WHITE), rltk::to_cp437('-')) }; - ctx.set(x + 1, y, RGB::named(rltk::YELLOW), RGB::named(rltk::BLACK), 97 + (j as rltk::FontCharType)); + ctx.set( + x + 1, + y, + RGB::named(rltk::YELLOW), + RGB::named(rltk::BLACK), + 97 + (j as rltk::FontCharType) + ); ctx.set(x + 3, y, fg, RGB::named(rltk::BLACK), glyph); fg = RGB::named(item_colour_ecs(&gs.ecs, *e)); ctx.print_color(x + 5, y, fg, RGB::named(rltk::BLACK), name); @@ -965,7 +1309,12 @@ pub fn ranged_target( if distance <= (range as f32) { let screen_x = idx.x - min_x; let screen_y = idx.y - min_y; - if screen_x > 1 && screen_x < max_x - min_x - 1 && screen_y > 1 && screen_y < max_y - min_y - 1 { + if + screen_x > 1 && + screen_x < max_x - min_x - 1 && + screen_y > 1 && + screen_y < max_y - min_y - 1 + { ctx.set_bg(screen_x + x_offset, screen_y + y_offset, TARGETING_VALID_COL); available_cells.push(idx); } @@ -977,8 +1326,11 @@ pub fn ranged_target( // Draw mouse cursor let mouse_pos = (x, y); - let (min_x, _max_x, min_y, _max_y, x_offset, y_offset) = camera::get_screen_bounds(&gs.ecs, ctx); - let (screen_x, screen_y) = (69, 41); + let (min_x, _max_x, min_y, _max_y, x_offset, y_offset) = camera::get_screen_bounds( + &gs.ecs, + ctx + ); + let (screen_x, screen_y) = (40, 30); let x = x.clamp(x_offset, x_offset - 1 + (screen_x as i32)); let y = y.clamp(y_offset, y_offset - 1 + (screen_y as i32)); @@ -1019,7 +1371,9 @@ pub fn ranged_target( aoe, &*map ); - blast_tiles.retain(|p| p.x > 0 && p.x < map.width - 1 && p.y > 0 && p.y < map.height - 1); + blast_tiles.retain( + |p| p.x > 0 && p.x < map.width - 1 && p.y > 0 && p.y < map.height - 1 + ); for tile in blast_tiles.iter() { let bg = if available_cells.contains(&tile) { let col1 = TARGETING_AOE_COL; @@ -1040,7 +1394,10 @@ pub fn ranged_target( Some(key) => match key { VirtualKeyCode::Return => { - return (TargetResult::Selected, Some(Point::new(mouse_pos_adjusted.0, mouse_pos_adjusted.1))); + return ( + TargetResult::Selected, + Some(Point::new(mouse_pos_adjusted.0, mouse_pos_adjusted.1)), + ); } _ => result, } @@ -1106,10 +1463,22 @@ pub fn main_menu(gs: &mut State, ctx: &mut Rltk) -> MainMenuResult { if save_exists { if selection == MainMenuSelection::LoadGame { ctx.print_color(x + 2, y, RGB::named(rltk::YELLOW), RGB::named(rltk::BLACK), "["); - ctx.print_color(x + 3, y, RGB::named(rltk::GREEN), RGB::named(rltk::BLACK), "continue"); + ctx.print_color( + x + 3, + y, + RGB::named(rltk::GREEN), + RGB::named(rltk::BLACK), + "continue" + ); ctx.print_color(x + 11, y, RGB::named(rltk::YELLOW), RGB::named(rltk::BLACK), "]"); } else { - ctx.print_color(x + 3, y, RGB::named(rltk::WHITE), RGB::named(rltk::BLACK), "continue"); + ctx.print_color( + x + 3, + y, + RGB::named(rltk::WHITE), + RGB::named(rltk::BLACK), + "continue" + ); } y += 1; } @@ -1142,7 +1511,9 @@ pub fn main_menu(gs: &mut State, ctx: &mut Rltk) -> MainMenuResult { return MainMenuResult::NoSelection { selected: MainMenuSelection::NewGame }; } VirtualKeyCode::L => { - return MainMenuResult::NoSelection { selected: MainMenuSelection::LoadGame }; + return MainMenuResult::NoSelection { + selected: MainMenuSelection::LoadGame, + }; } VirtualKeyCode::Up | VirtualKeyCode::Numpad8 | VirtualKeyCode::K => { let mut new_selection; @@ -1223,7 +1594,13 @@ pub fn game_over(ctx: &mut Rltk) -> YesNoResult { format!("You survived for {} turns.", crate::gamelog::get_event_count(EVENT::COUNT_TURN)) ); y += 2; - ctx.print_color(x, y, RGB::named(rltk::GREEN), RGB::named(rltk::BLACK), format!("And in the process, you")); + ctx.print_color( + x, + y, + RGB::named(rltk::GREEN), + RGB::named(rltk::BLACK), + format!("And in the process, you") + ); y += 1; if crate::gamelog::get_event_count(EVENT::COUNT_CHANGED_FLOOR) > 0 { ctx.print_color( @@ -1231,7 +1608,10 @@ pub fn game_over(ctx: &mut Rltk) -> YesNoResult { y, RGB::named(rltk::WHITE), RGB::named(rltk::BLACK), - format!("- changed floor {} times", crate::gamelog::get_event_count(EVENT::COUNT_CHANGED_FLOOR)) + format!( + "- changed floor {} times", + crate::gamelog::get_event_count(EVENT::COUNT_CHANGED_FLOOR) + ) ); y += 1; } @@ -1255,7 +1635,10 @@ pub fn game_over(ctx: &mut Rltk) -> YesNoResult { y, RGB::named(rltk::WHITE), RGB::named(rltk::BLACK), - format!("- slew {} other creature(s)", crate::gamelog::get_event_count(EVENT::COUNT_KILLED)) + format!( + "- slew {} other creature(s)", + crate::gamelog::get_event_count(EVENT::COUNT_KILLED) + ) ); y += 1; } @@ -1265,7 +1648,10 @@ pub fn game_over(ctx: &mut Rltk) -> YesNoResult { y, RGB::named(rltk::WHITE), RGB::named(rltk::BLACK), - format!("- forgot the controls {} time(s)", crate::gamelog::get_event_count(EVENT::COUNT_LOOKED_FOR_HELP)) + format!( + "- forgot the controls {} time(s)", + crate::gamelog::get_event_count(EVENT::COUNT_LOOKED_FOR_HELP) + ) ); } diff --git a/src/main.rs b/src/main.rs index 488ed16..a6e4092 100644 --- a/src/main.rs +++ b/src/main.rs @@ -3,22 +3,28 @@ use specs::prelude::*; use specs::saveload::{ SimpleMarker, SimpleMarkerAllocator }; use rltk::prelude::*; -const DISPLAYWIDTH: i32 = 105; +const DISPLAYWIDTH: i32 = 72; const DISPLAYHEIGHT: i32 = 56; fn main() -> rltk::BError { // Embedded resources for use in wasm build - const CURSES_14_16_BYTES: &[u8] = include_bytes!("../resources/curses14x16.png"); - rltk::embedding::EMBED.lock().add_resource("resources/curses14x16.png".to_string(), CURSES_14_16_BYTES); - - //rltk::link_resource!(CURSES14X16, "../resources/curses_14x16.png"); + const CURSES_16_16_BYTES: &[u8] = include_bytes!("../resources/nagidal24x24.png"); + const ISHMERIA_8_16_BYTES: &[u8] = include_bytes!("../resources/curses12x24.png"); + rltk::embedding::EMBED + .lock() + .add_resource("resources/nagidal24x24.png".to_string(), CURSES_16_16_BYTES); + rltk::embedding::EMBED + .lock() + .add_resource("resources/curses12x24.png".to_string(), ISHMERIA_8_16_BYTES); let mut context = RltkBuilder::new() .with_title("rust-rl") .with_dimensions(DISPLAYWIDTH, DISPLAYHEIGHT) - .with_font("curses14x16.png", 14, 16) - .with_tile_dimensions(14, 16) - .with_simple_console(DISPLAYWIDTH, DISPLAYHEIGHT, "curses14x16.png") + .with_font("nagidal24x24.png", 24, 24) + .with_font("curses12x24.png", 12, 24) + .with_tile_dimensions(24, 24) + .with_simple_console(DISPLAYWIDTH, DISPLAYHEIGHT, "nagidal24x24.png") + .with_sparse_console(DISPLAYWIDTH * 2, DISPLAYHEIGHT, "curses12x24.png") .build()?; if config::CONFIG.visuals.with_scanlines { context.with_post_scanlines(config::CONFIG.visuals.with_screen_burn); @@ -26,7 +32,9 @@ fn main() -> rltk::BError { let mut gs = State { ecs: World::new(), - mapgen_next_state: Some(RunState::MainMenu { menu_selection: gui::MainMenuSelection::NewGame }), + mapgen_next_state: Some(RunState::MainMenu { + menu_selection: gui::MainMenuSelection::NewGame, + }), mapgen_index: 0, mapgen_history: Vec::new(), mapgen_timer: 0.0, diff --git a/src/states/state.rs b/src/states/state.rs index 3dd1559..00152d5 100644 --- a/src/states/state.rs +++ b/src/states/state.rs @@ -164,6 +164,9 @@ impl GameState for State { new_runstate = *runstate; } // Clear screen + ctx.set_active_console(1); + ctx.cls(); + ctx.set_active_console(0); ctx.cls(); particle_system::particle_ticker(&mut self.ecs, ctx); @@ -559,6 +562,9 @@ impl GameState for State { new_runstate = self.mapgen_next_state.unwrap(); } if self.mapgen_history.len() != 0 { + ctx.set_active_console(1); + ctx.cls(); + ctx.set_active_console(0); ctx.cls(); camera::render_debug_map(&self.mapgen_history[self.mapgen_index], ctx);