From f94d65794711e341f485d06e12c413a7f0337e1c Mon Sep 17 00:00:00 2001 From: Fredrik Sandkvist Date: Tue, 13 Dec 2022 20:08:56 +0100 Subject: [PATCH] update deps --- Cargo.lock | 418 ++++++++++++++++++++++++--------------------- Cargo.toml | 9 +- README.md | 3 +- src/egui_glutin.rs | 101 ++++++++--- src/game_data.rs | 8 +- src/main.rs | 12 +- src/shader_e.frag | 17 +- src/shader_e.vert | 18 +- src/update.rs | 15 +- 9 files changed, 349 insertions(+), 252 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 2a425f4..393890f 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -24,19 +24,13 @@ 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.7.6" +version = "0.8.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fcb51a0695d8f838b1ee009b3fbf66bda078cd64590202a864a8f3e8c4315c47" +checksum = "bf6ccdb167abbf410dcb915cabd428929d7f6a04980b54a11f26a39f1c7f7107" dependencies = [ - "getrandom", + "cfg-if", "once_cell", "version_check", ] @@ -79,24 +73,24 @@ checksum = "0d8c1fef690941d3e7788d328517591fecc684c084084702d6ff1641e993699a" [[package]] name = "bumpalo" -version = "3.10.0" +version = "3.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "37ccbd214614c6783386c1af30caf03192f17891059cecc394b4fb119e363de3" +checksum = "572f695136211188308f16ad2ca5c851a712c464060ae6974944458eb83880ba" [[package]] name = "bytemuck" -version = "1.11.0" +version = "1.12.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a5377c8865e74a160d21f29c2d40669f53286db6eab59b88540cbb12ffc8b835" +checksum = "aaa3a8d9a1ca92e282c96a32d6511b695d7d994d1d102ba85d279f9b2756947f" [[package]] name = "calloop" -version = "0.10.1" +version = "0.10.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a22a6a8f622f797120d452c630b0ab12e1331a1a753e2039ce7868d4ac77b4ee" +checksum = "19457a0da465234abd76134a5c2a910c14bd3c5558463e4396ab9a37a328e465" dependencies = [ "log", - "nix 0.24.2", + "nix 0.25.1", "slotmap", "thiserror", "vec_map", @@ -104,9 +98,9 @@ dependencies = [ [[package]] name = "cc" -version = "1.0.73" +version = "1.0.77" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2fff2a6927b3bb87f9595d67196a70493f627687a71d87a0d692242c33f58c11" +checksum = "e9f73505338f7d905b19d18738976aae232eb46b8efc15554ffc56deb5d9ebe4" [[package]] name = "cfg-if" @@ -114,6 +108,12 @@ version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" +[[package]] +name = "cfg_aliases" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fd16c4719339c4530435d38e511904438d07cce7950afa3718a84ac36c10e89e" + [[package]] name = "cgl" version = "0.3.2" @@ -125,9 +125,9 @@ dependencies = [ [[package]] name = "cmake" -version = "0.1.48" +version = "0.1.49" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e8ad8cef104ac57b68b89df3208164d228503abbdce70f6880ffa3d970e7443a" +checksum = "db34956e100b30725f2eb215f90d4871051239535632f84fea3bc92722c66b7c" dependencies = [ "cc", ] @@ -227,9 +227,9 @@ dependencies = [ [[package]] name = "crossfont" -version = "0.5.0" +version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f66b1c1979c4362323f03ab6bf7fb522902bfc418e0c37319ab347f9561d980f" +checksum = "21fd3add36ea31aba1520aa5288714dd63be506106753226d0eb387a93bc9c45" dependencies = [ "cocoa", "core-foundation", @@ -289,15 +289,6 @@ dependencies = [ "syn", ] -[[package]] -name = "deflate" -version = "1.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c86f7e25f518f4b81808a2cf1c50996a61f5c2eb394b2393bd87f2a4780a432f" -dependencies = [ - "adler32", -] - [[package]] name = "dispatch" version = "0.2.0" @@ -333,11 +324,17 @@ dependencies = [ "wio", ] +[[package]] +name = "ecolor" +version = "0.20.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b601108bca3af7650440ace4ca55b2daf52c36f2635be3587d77b16efd8d0691" + [[package]] name = "egui" -version = "0.18.1" +version = "0.20.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eb095a8b9feb9b7ff8f00b6776dffcef059538a3f4a91238e03c900e9c9ad9a2" +checksum = "65a5e883a316e53866977450eecfbcac9c48109c2ab3394af29feb83fcde4ea9" dependencies = [ "ahash", "epaint", @@ -346,19 +343,20 @@ dependencies = [ [[package]] name = "emath" -version = "0.18.0" +version = "0.20.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c223f58c7e38abe1770f367b969f1b3fbd4704b67666bcb65dbb1adb0980ba72" +checksum = "5277249c8c3430e7127e4f2c40a77485e7baf11ae132ce9b3253a8ed710df0a0" [[package]] name = "epaint" -version = "0.18.1" +version = "0.20.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0c29567088888e8ac3e8f61bbb2ddc820207ebb8d69eefde5bcefa06d65e4e89" +checksum = "de14b65fe5e423e0058f77a8beb2c863b056d0566d6c4ce0d097aa5814cb705a" dependencies = [ "ab_glyph", "ahash", "atomic_refcell", + "ecolor", "emath", "nohash-hasher", "parking_lot", @@ -374,6 +372,16 @@ dependencies = [ "pkg-config", ] +[[package]] +name = "flate2" +version = "1.0.25" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a8a2db397cb1c8772f31494cb8917e48cd1e64f0fa7efac59fbd741a0a8ce841" +dependencies = [ + "crc32fast", + "miniz_oxide", +] + [[package]] name = "fnv" version = "1.0.7" @@ -452,19 +460,11 @@ dependencies = [ "gl", "gl_generator", "glutin", + "glutin-winit", "miniserde", + "raw-window-handle 0.5.0", "windows", -] - -[[package]] -name = "getrandom" -version = "0.2.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4eb1a864a501629691edf6c15a593b7a51eebaa1e8468e9ddc623de7c9b58ec6" -dependencies = [ - "cfg-if", - "libc", - "wasi", + "winit", ] [[package]] @@ -489,55 +489,54 @@ dependencies = [ [[package]] name = "glutin" -version = "0.29.0" +version = "0.30.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a4f9adafdcaf3c81bc750238f4f6d694ef35ca3f79ae7417f2ca8af58838f24e" +checksum = "524d807cd49a0c56a53ef9a6738cd15e7c8c4e9d37a3b7fdb3c250c1cd5bf7a3" dependencies = [ + "bitflags", + "cfg_aliases", "cgl", "cocoa", "core-foundation", "glutin_egl_sys", - "glutin_gles2_sys", "glutin_glx_sys", "glutin_wgl_sys", "libloading", - "log", "objc", "once_cell", - "osmesa-sys", - "parking_lot", - "raw-window-handle", - "wayland-client", - "wayland-egl", - "winapi", - "winit", + "raw-window-handle 0.5.0", + "wayland-sys 0.30.1", + "windows-sys 0.36.1", + "x11-dl", ] [[package]] -name = "glutin_egl_sys" -version = "0.1.6" +name = "glutin-winit" +version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "68900f84b471f31ea1d1355567eb865a2cf446294f06cef8d653ed7bcf5f013d" +checksum = "e44949d3a525ad1deae282fc9e7dbf05ddcce98219079c5aea7d9aa6927920c6" dependencies = [ - "gl_generator", - "winapi", + "cfg_aliases", + "glutin", + "raw-window-handle 0.5.0", + "winit", ] [[package]] -name = "glutin_gles2_sys" -version = "0.1.5" +name = "glutin_egl_sys" +version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e8094e708b730a7c8a1954f4f8a31880af00eb8a1c5b5bf85d28a0a3c6d69103" +checksum = "3adbb8fec0e18e340f990c78f79f5f0e142d0d83f46b10909aaa7d251c00afdf" dependencies = [ "gl_generator", - "objc", + "windows-sys 0.36.1", ] [[package]] name = "glutin_glx_sys" -version = "0.1.8" +version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d93d0575865098580c5b3a423188cd959419912ea60b1e48e8b3b526f6d02468" +checksum = "947c4850c58211c9627969c2b4e2674764b81ae5b47bab2c9a477d7942f96e0f" dependencies = [ "gl_generator", "x11-dl", @@ -545,9 +544,9 @@ dependencies = [ [[package]] name = "glutin_wgl_sys" -version = "0.1.5" +version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3da5951a1569dbab865c6f2a863efafff193a93caf05538d193e9e3816d21696" +checksum = "20c33975a6c9d49d72c8f032a60079bf8df536954fbf9e4cee90396ace815c57" dependencies = [ "gl_generator", ] @@ -584,9 +583,9 @@ checksum = "8eaf4bc02d17cbdd7ff4c7438cafcdf7fb9a4613313ad11b4f8fefe7d3fa0130" [[package]] name = "js-sys" -version = "0.3.59" +version = "0.3.60" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "258451ab10b34f8af53416d1fdab72c22e805f0c92a1136d59470ec0b11138b2" +checksum = "49409df3e3bf0856b916e2ceaca09ee28e6871cf7d9ce97a692cacfdb2a25a47" dependencies = [ "wasm-bindgen", ] @@ -655,9 +654,9 @@ checksum = "2dffe52ecf27772e601905b7522cb4ef790d2cc203488bbd0e2fe85fcb74566d" [[package]] name = "memmap2" -version = "0.5.5" +version = "0.5.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3a79b39c93a7a5a27eeaf9a23b5ff43f1b9e0ad6b1cdd441140ae53c35613fc7" +checksum = "4b182332558b18d807c4ce1ca8ca983b34c3ee32765e47b3f0f69b90355cc1dc" dependencies = [ "libc", ] @@ -701,23 +700,23 @@ dependencies = [ [[package]] name = "miniz_oxide" -version = "0.5.3" +version = "0.6.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6f5c75688da582b8ffc1f1799e9db273f32133c49e048f614d22ec3256773ccc" +checksum = "b275950c28b37e794e8c55d88aeb5e139d0ce23fdbbeda68f8d7174abdf9e8fa" dependencies = [ "adler", ] [[package]] name = "mio" -version = "0.8.4" +version = "0.8.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "57ee1c23c7c63b0c9250c339ffdc69255f110b298b901b9f6c82547b7b87caaf" +checksum = "e5d732bc30207a6423068df043e3d02e0735b155ad7ce1a6f76fe2baa5b158de" dependencies = [ "libc", "log", "wasi", - "windows-sys", + "windows-sys 0.42.0", ] [[package]] @@ -730,7 +729,7 @@ dependencies = [ "jni-sys", "ndk-sys", "num_enum", - "raw-window-handle", + "raw-window-handle 0.5.0", "thiserror", ] @@ -771,21 +770,20 @@ dependencies = [ [[package]] name = "ndk-sys" -version = "0.4.0" +version = "0.4.1+23.1.7779620" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "21d83ec9c63ec5bf950200a8e508bdad6659972187b625469f58ef8c08e29046" +checksum = "3cf2aae958bd232cac5069850591667ad422d263686d75b52a065f9badeee5a3" dependencies = [ "jni-sys", ] [[package]] name = "nix" -version = "0.22.3" +version = "0.24.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e4916f159ed8e5de0082076562152a76b7a1f64a01fd9d1e0fea002c37624faf" +checksum = "fa52e972a9a719cecb6864fb88568781eb706bac2cd1d4f04a648542dbf78069" dependencies = [ "bitflags", - "cc", "cfg-if", "libc", "memoffset", @@ -793,10 +791,11 @@ dependencies = [ [[package]] name = "nix" -version = "0.24.2" +version = "0.25.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "195cdbc1741b8134346d515b3a56a1c94b0912758009cfd53f99ea0f57b065fc" +checksum = "f346ff70e7dbfd675fe90590b92d59ef2de15a8779ae305ebcbfd3f0caf59be4" dependencies = [ + "autocfg", "bitflags", "cfg-if", "libc", @@ -851,18 +850,9 @@ dependencies = [ [[package]] name = "once_cell" -version = "1.13.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "18a6dbe30758c9f83eb00cbea4ac95966305f5a7772f3f42ebfc7fc7eddbd8e1" - -[[package]] -name = "osmesa-sys" -version = "0.1.2" +version = "1.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "88cfece6e95d2e717e0872a7f53a8684712ad13822a7979bc760b9c77ec0013b" -dependencies = [ - "shared_library", -] +checksum = "86f0b0d4bf799edbc74508c1e8bf170ff5f41238e5f8225603ca7caaae2b7860" [[package]] name = "owned_ttf_parser" @@ -893,14 +883,14 @@ dependencies = [ "libc", "redox_syscall", "smallvec", - "windows-sys", + "windows-sys 0.36.1", ] [[package]] name = "percent-encoding" -version = "2.1.0" +version = "2.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d4fd5641d01c8f18a23da7b6fe29298ff4b55afcccdf78973b24cf3175fee32e" +checksum = "478c572c3d73181ff3c2539045f6eb99e5491218eae919370993b890cdbdd98e" [[package]] name = "pkg-config" @@ -910,13 +900,13 @@ checksum = "1df8c4ec4b0627e53bdf214615ad287367e482558cf84b109250b37464dc03ae" [[package]] name = "png" -version = "0.17.5" +version = "0.17.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dc38c0ad57efb786dd57b9864e5b18bae478c00c824dc55a38bbc9da95dde3ba" +checksum = "5d708eaf860a19b19ce538740d2b4bdeeb8337fa53f7738455e706623ad5c638" dependencies = [ "bitflags", "crc32fast", - "deflate", + "flate2", "miniz_oxide", ] @@ -949,6 +939,15 @@ dependencies = [ "proc-macro2", ] +[[package]] +name = "raw-window-handle" +version = "0.4.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b800beb9b6e7d2df1fe337c9e3d04e3af22a124460fb4c30fcc22c9117cefb41" +dependencies = [ + "cty", +] + [[package]] name = "raw-window-handle" version = "0.5.0" @@ -984,9 +983,9 @@ dependencies = [ [[package]] name = "scoped-tls" -version = "1.0.0" +version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ea6a9290e3c9cf0f18145ef7ffa62d68ee0bf5fcd651017e586dc7fd5da448c2" +checksum = "e1cf6437eb19a8f4a6cc0f7dca544973b0b78843adbfeb3683d1a94a0024a294" [[package]] name = "scopeguard" @@ -996,9 +995,9 @@ checksum = "d29ab0c6d3fc0ee92fe66e2d99f700eab17a8d57d1c1d3b748380fb20baa78cd" [[package]] name = "sctk-adwaita" -version = "0.4.1" +version = "0.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b8cdeb3fbbd384de045d5683bfc3cadfc4c6ed1e6471f201ede801f31571581a" +checksum = "61270629cc6b4d77ec1907db1033d5c2e1a404c412743621981a871dc9c12339" dependencies = [ "crossfont", "log", @@ -1008,15 +1007,15 @@ dependencies = [ [[package]] name = "serde" -version = "1.0.143" +version = "1.0.150" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "53e8e5d5b70924f74ff5c6d64d9a5acd91422117c60f48c4e07855238a254553" +checksum = "e326c9ec8042f1b5da33252c8a37e9ffbd2c9bef0155215b6e6c80c790e05f91" [[package]] name = "serde_derive" -version = "1.0.143" +version = "1.0.147" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d3d8e8de557aee63c26b85b947f5e59b690d0454c753f3adeb5cd7835ab88391" +checksum = "4f1d362ca8fc9c3e3a7484440752472d68a6caa98f1ab81d99b5dfe517cec852" dependencies = [ "proc-macro2", "quote", @@ -1044,16 +1043,6 @@ dependencies = [ "pkg-config", ] -[[package]] -name = "shared_library" -version = "0.1.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5a9e7e0f2bfae24d8a5b5a66c5b257a83c7412304311512a0c054cd5e619da11" -dependencies = [ - "lazy_static", - "libc", -] - [[package]] name = "slotmap" version = "1.0.6" @@ -1081,7 +1070,7 @@ dependencies = [ "lazy_static", "log", "memmap2", - "nix 0.24.2", + "nix 0.24.3", "pkg-config", "wayland-client", "wayland-cursor", @@ -1107,18 +1096,18 @@ dependencies = [ [[package]] name = "thiserror" -version = "1.0.32" +version = "1.0.37" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f5f6586b7f764adc0231f4c79be7b920e766bb2f3e51b3661cdb263828f19994" +checksum = "10deb33631e3c9018b9baf9dcbbc4f737320d2b576bac10f6aefa048fa407e3e" dependencies = [ "thiserror-impl", ] [[package]] name = "thiserror-impl" -version = "1.0.32" +version = "1.0.37" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "12bafc5b54507e0149cdf1b145a5d80ab80a90bcd9275df43d4fff68460f6c21" +checksum = "982d17546b47146b28f7c22e3d08465f6b8903d0ea13c1660d9d84a6e7adcdbb" dependencies = [ "proc-macro2", "quote", @@ -1127,9 +1116,9 @@ dependencies = [ [[package]] name = "tiny-skia" -version = "0.6.6" +version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d049bfef0eaa2521e75d9ffb5ce86ad54480932ae19b85f78bec6f52c4d30d78" +checksum = "642680569bb895b16e4b9d181c60be1ed136fa0c9c7f11d004daf053ba89bf82" dependencies = [ "arrayref", "arrayvec", @@ -1137,6 +1126,17 @@ dependencies = [ "cfg-if", "png", "safe_arch", + "tiny-skia-path", +] + +[[package]] +name = "tiny-skia-path" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c114d32f0c2ee43d585367cb013dfaba967ab9f62b90d9af0d696e955e70fa6c" +dependencies = [ + "arrayref", + "bytemuck", ] [[package]] @@ -1180,9 +1180,9 @@ checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" [[package]] name = "wasm-bindgen" -version = "0.2.82" +version = "0.2.83" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fc7652e3f6c4706c8d9cd54832c4a4ccb9b5336e2c3bd154d5cccfbf1c1f5f7d" +checksum = "eaf9f5aceeec8be17c128b2e93e031fb8a4d469bb9c4ae2d7dc1888b26887268" dependencies = [ "cfg-if", "wasm-bindgen-macro", @@ -1190,9 +1190,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-backend" -version = "0.2.82" +version = "0.2.83" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "662cd44805586bd52971b9586b1df85cdbbd9112e4ef4d8f41559c334dc6ac3f" +checksum = "4c8ffb332579b0557b52d268b91feab8df3615f265d5270fec2a8c95b17c1142" dependencies = [ "bumpalo", "log", @@ -1205,9 +1205,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro" -version = "0.2.82" +version = "0.2.83" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b260f13d3012071dfb1512849c033b1925038373aea48ced3012c09df952c602" +checksum = "052be0f94026e6cbc75cdefc9bae13fd6052cdcaf532fa6c45e7ae33a1e6c810" dependencies = [ "quote", "wasm-bindgen-macro-support", @@ -1215,9 +1215,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro-support" -version = "0.2.82" +version = "0.2.83" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5be8e654bdd9b79216c2929ab90721aa82faf65c48cdf08bdc4e7f51357b80da" +checksum = "07bc0c051dc5f23e307b13285f9d75df86bfdf816c5721e573dec1f9b8aa193c" dependencies = [ "proc-macro2", "quote", @@ -1228,64 +1228,54 @@ dependencies = [ [[package]] name = "wasm-bindgen-shared" -version = "0.2.82" +version = "0.2.83" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6598dd0bd3c7d51095ff6531a5b23e02acdc81804e30d8f07afb77b7215a140a" +checksum = "1c38c045535d93ec4f0b4defec448e4291638ee608530863b1e2ba115d4fff7f" [[package]] name = "wayland-client" -version = "0.29.4" +version = "0.29.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "91223460e73257f697d9e23d401279123d36039a3f7a449e983f123292d4458f" +checksum = "3f3b068c05a039c9f755f881dc50f01732214f5685e379829759088967c46715" dependencies = [ "bitflags", "downcast-rs", "libc", - "nix 0.22.3", + "nix 0.24.3", "scoped-tls", "wayland-commons", "wayland-scanner", - "wayland-sys", + "wayland-sys 0.29.5", ] [[package]] name = "wayland-commons" -version = "0.29.4" +version = "0.29.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "94f6e5e340d7c13490eca867898c4cec5af56c27a5ffe5c80c6fc4708e22d33e" +checksum = "8691f134d584a33a6606d9d717b95c4fa20065605f798a3f350d78dced02a902" dependencies = [ - "nix 0.22.3", + "nix 0.24.3", "once_cell", "smallvec", - "wayland-sys", + "wayland-sys 0.29.5", ] [[package]] name = "wayland-cursor" -version = "0.29.4" +version = "0.29.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c52758f13d5e7861fc83d942d3d99bf270c83269575e52ac29e5b73cb956a6bd" +checksum = "6865c6b66f13d6257bef1cd40cbfe8ef2f150fb8ebbdb1e8e873455931377661" dependencies = [ - "nix 0.22.3", + "nix 0.24.3", "wayland-client", "xcursor", ] -[[package]] -name = "wayland-egl" -version = "0.29.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "83281d69ee162b59031c666385e93bde4039ec553b90c4191cdb128ceea29a3a" -dependencies = [ - "wayland-client", - "wayland-sys", -] - [[package]] name = "wayland-protocols" -version = "0.29.4" +version = "0.29.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "60147ae23303402e41fe034f74fb2c35ad0780ee88a1c40ac09a3be1e7465741" +checksum = "b950621f9354b322ee817a23474e479b34be96c2e909c14f7bc0100e9a970bc6" dependencies = [ "bitflags", "wayland-client", @@ -1295,9 +1285,9 @@ dependencies = [ [[package]] name = "wayland-scanner" -version = "0.29.4" +version = "0.29.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "39a1ed3143f7a143187156a2ab52742e89dac33245ba505c17224df48939f9e0" +checksum = "8f4303d8fa22ab852f789e75a967f0a2cdc430a607751c0499bada3e451cbd53" dependencies = [ "proc-macro2", "quote", @@ -1306,20 +1296,32 @@ dependencies = [ [[package]] name = "wayland-sys" -version = "0.29.4" +version = "0.29.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "be12ce1a3c39ec7dba25594b97b42cb3195d54953ddb9d3d95a7c3902bc6e9d4" +dependencies = [ + "dlib", + "lazy_static", + "pkg-config", +] + +[[package]] +name = "wayland-sys" +version = "0.30.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d9341df79a8975679188e37dab3889bfa57c44ac2cb6da166f519a81cbe452d4" +checksum = "96b2a02ac608e07132978689a6f9bf4214949c85998c247abadd4f4129b1aa06" dependencies = [ "dlib", "lazy_static", + "log", "pkg-config", ] [[package]] name = "web-sys" -version = "0.3.59" +version = "0.3.60" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ed055ab27f941423197eb86b2035720b1a3ce40504df082cac2ecc6ed73335a1" +checksum = "bcda906d8be16e728fd5adc5b729afad4e444e106ab28cd1c7256e54fa61510f" dependencies = [ "js-sys", "wasm-bindgen", @@ -1349,15 +1351,17 @@ checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" [[package]] name = "windows" -version = "0.39.0" +version = "0.43.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f1c4bd0a50ac6020f65184721f758dba47bb9fbc2133df715ec74a237b26794a" +checksum = "04662ed0e3e5630dfa9b26e4cb823b817f1a9addda855d973a9458c236556244" dependencies = [ - "windows_aarch64_msvc 0.39.0", - "windows_i686_gnu 0.39.0", - "windows_i686_msvc 0.39.0", - "windows_x86_64_gnu 0.39.0", - "windows_x86_64_msvc 0.39.0", + "windows_aarch64_gnullvm", + "windows_aarch64_msvc 0.42.0", + "windows_i686_gnu 0.42.0", + "windows_i686_msvc 0.42.0", + "windows_x86_64_gnu 0.42.0", + "windows_x86_64_gnullvm", + "windows_x86_64_msvc 0.42.0", ] [[package]] @@ -1373,6 +1377,27 @@ dependencies = [ "windows_x86_64_msvc 0.36.1", ] +[[package]] +name = "windows-sys" +version = "0.42.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5a3e1820f08b8513f676f7ab6c1f99ff312fb97b553d30ff4dd86f9f15728aa7" +dependencies = [ + "windows_aarch64_gnullvm", + "windows_aarch64_msvc 0.42.0", + "windows_i686_gnu 0.42.0", + "windows_i686_msvc 0.42.0", + "windows_x86_64_gnu 0.42.0", + "windows_x86_64_gnullvm", + "windows_x86_64_msvc 0.42.0", +] + +[[package]] +name = "windows_aarch64_gnullvm" +version = "0.42.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "41d2aa71f6f0cbe00ae5167d90ef3cfe66527d6f613ca78ac8024c3ccab9a19e" + [[package]] name = "windows_aarch64_msvc" version = "0.36.1" @@ -1381,9 +1406,9 @@ checksum = "9bb8c3fd39ade2d67e9874ac4f3db21f0d710bee00fe7cab16949ec184eeaa47" [[package]] name = "windows_aarch64_msvc" -version = "0.39.0" +version = "0.42.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ec7711666096bd4096ffa835238905bb33fb87267910e154b18b44eaabb340f2" +checksum = "dd0f252f5a35cac83d6311b2e795981f5ee6e67eb1f9a7f64eb4500fbc4dcdb4" [[package]] name = "windows_i686_gnu" @@ -1393,9 +1418,9 @@ checksum = "180e6ccf01daf4c426b846dfc66db1fc518f074baa793aa7d9b9aaeffad6a3b6" [[package]] name = "windows_i686_gnu" -version = "0.39.0" +version = "0.42.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "763fc57100a5f7042e3057e7e8d9bdd7860d330070251a73d003563a3bb49e1b" +checksum = "fbeae19f6716841636c28d695375df17562ca208b2b7d0dc47635a50ae6c5de7" [[package]] name = "windows_i686_msvc" @@ -1405,9 +1430,9 @@ checksum = "e2e7917148b2812d1eeafaeb22a97e4813dfa60a3f8f78ebe204bcc88f12f024" [[package]] name = "windows_i686_msvc" -version = "0.39.0" +version = "0.42.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7bc7cbfe58828921e10a9f446fcaaf649204dcfe6c1ddd712c5eebae6bda1106" +checksum = "84c12f65daa39dd2babe6e442988fc329d6243fdce47d7d2d155b8d874862246" [[package]] name = "windows_x86_64_gnu" @@ -1417,9 +1442,15 @@ checksum = "4dcd171b8776c41b97521e5da127a2d86ad280114807d0b2ab1e462bc764d9e1" [[package]] name = "windows_x86_64_gnu" -version = "0.39.0" +version = "0.42.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bf7b1b21b5362cbc318f686150e5bcea75ecedc74dd157d874d754a2ca44b0ed" + +[[package]] +name = "windows_x86_64_gnullvm" +version = "0.42.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6868c165637d653ae1e8dc4d82c25d4f97dd6605eaa8d784b5c6e0ab2a252b65" +checksum = "09d525d2ba30eeb3297665bd434a54297e4170c7f1a44cad4ef58095b4cd2028" [[package]] name = "windows_x86_64_msvc" @@ -1429,15 +1460,15 @@ checksum = "c811ca4a8c853ef420abd8592ba53ddbbac90410fab6903b3e79972a631f7680" [[package]] name = "windows_x86_64_msvc" -version = "0.39.0" +version = "0.42.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5e4d40883ae9cae962787ca76ba76390ffa29214667a111db9e0a1ad8377e809" +checksum = "f40009d85759725a34da6d89a94e63d7bdc50a862acf0dbc7c8e488f1edcb6f5" [[package]] name = "winit" -version = "0.27.1" +version = "0.27.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b9b91360f15eb89d0bfee05d3c5981408320fe709f84953d3d90b276fc5962c7" +checksum = "bb796d6fbd86b2fd896c9471e6f04d39d750076ebe5680a3958f00f5ab97657c" dependencies = [ "bitflags", "cocoa", @@ -1454,14 +1485,15 @@ dependencies = [ "once_cell", "parking_lot", "percent-encoding", - "raw-window-handle", + "raw-window-handle 0.4.3", + "raw-window-handle 0.5.0", "sctk-adwaita", "smithay-client-toolkit", "wasm-bindgen", "wayland-client", "wayland-protocols", "web-sys", - "windows-sys", + "windows-sys 0.36.1", "x11-dl", ] @@ -1476,9 +1508,9 @@ dependencies = [ [[package]] name = "x11-dl" -version = "2.19.1" +version = "2.20.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ea26926b4ce81a6f5d9d0f3a0bc401e5a37c6ae14a1bfaa8ff6099ca80038c59" +checksum = "b1536d6965a5d4e573c7ef73a2c15ebcd0b2de3347bdf526c34c297c00ac40f0" dependencies = [ "lazy_static", "libc", diff --git a/Cargo.toml b/Cargo.toml index 6a77e9b..d6a374e 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -6,13 +6,16 @@ edition = "2021" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [dependencies] -glutin = "0.29.0" +glutin = "0.30.3" +glutin-winit = "0.2.1" +winit = "0.27.5" +raw-window-handle = "0.5.0" +egui = "0.20.1" gl = "0.14.0" -egui = "0.18.1" miniserde = "0.1.24" [dependencies.windows] -version = "0.39.0" +version = "0.43.0" features = [ "Data_Xml_Dom", "Win32_Foundation", diff --git a/README.md b/README.md index 227806c..040255e 100644 --- a/README.md +++ b/README.md @@ -23,4 +23,5 @@ Super Pang | 0.246 - [x] allow window resizing - [ ] add some cool example screenshot - [ ] support for gradius 1 arcade -- [ ] support for smash tv snes (enemy type/count) \ No newline at end of file +- [ ] support for smash tv snes (enemy type/count) +gradius 3 (arcade) can extend the rank range (0-16 -> 0-31). maybe a loop 2 thing? consider supporting this. \ No newline at end of file diff --git a/src/egui_glutin.rs b/src/egui_glutin.rs index 11438cc..87c55b9 100644 --- a/src/egui_glutin.rs +++ b/src/egui_glutin.rs @@ -1,13 +1,20 @@ use egui::{Modifiers, RawInput}; -use glutin::{ContextWrapper, PossiblyCurrent}; -use glutin::event_loop::ControlFlow; -use glutin::event::*; +use glutin::{context::PossiblyCurrentContext, surface::{Surface, WindowSurface, SurfaceAttributesBuilder, GlSurface}, prelude::{GlConfig, GlDisplay, NotCurrentGlContextSurfaceAccessor}, display::GetGlDisplay}; +use raw_window_handle::HasRawWindowHandle; +use winit::{event::{VirtualKeyCode, Event, WindowEvent, ElementState}, event_loop::ControlFlow}; use std::{ffi::{CString, c_void}, ptr, str::from_utf8}; use crate::GuiState; +pub struct GlutinState { + pub window: winit::window::Window, + pub gl_ctx: PossiblyCurrentContext, + pub gl_display: glutin::display::Display, + pub gl_surface: Surface, +} + pub struct EguiState { - pub windowed_context: ContextWrapper, + pub glutin_state: GlutinState, pub ctx: egui::Context, pub pos_in_points: Option, @@ -23,15 +30,52 @@ pub struct EguiState { window_size: (u32, u32), } -pub fn setup_egui_glutin(el: &glutin::event_loop::EventLoop<()>, window_size: (u32, u32)) -> EguiState { - let wb = glutin::window::WindowBuilder::new() - .with_inner_size(glutin::dpi::LogicalSize::new(window_size.0, window_size.1)) - .with_title("Game data reader 0.8"); +pub fn setup_egui_glutin(el: &winit::event_loop::EventLoop<()>, window_size: (u32, u32)) -> EguiState { + let wb = winit::window::WindowBuilder::new() + .with_inner_size(winit::dpi::LogicalSize::new(window_size.0, window_size.1)) + .with_title("Game data reader 0.9"); + + let (window, gl_config) = glutin_winit::DisplayBuilder::new() + .with_window_builder(Some(wb)) + .build(&el, <_>::default(), |configs| { + configs + .filter(|c| c.srgb_capable()) + .max_by_key(|c| c.num_samples()) + .unwrap() + }).unwrap(); + + let window = window.unwrap(); + let raw_window_handle = window.raw_window_handle(); + let gl_display = gl_config.display(); + + let context_attributes = glutin::context::ContextAttributesBuilder::new() + .with_profile(glutin::context::GlProfile::Core) + .with_context_api(glutin::context::ContextApi::OpenGl(Some( + glutin::context::Version::new(4, 5), + ))) + .build(Some(raw_window_handle)); + + let (gl_surface, gl_ctx) = { + let attrs = SurfaceAttributesBuilder::::new().build( + raw_window_handle, + std::num::NonZeroU32::new(window_size.0).unwrap(), + std::num::NonZeroU32::new(window_size.1).unwrap(), + ); + + let surface = unsafe { match gl_display.create_window_surface(&gl_config, &attrs) { + Ok(o) => o, + Err(_) => todo!("omg"), + }}; + + let context = unsafe { match gl_display.create_context(&gl_config, &context_attributes) { + Ok(o) => o, + Err(_) => todo!("omg"), + }}.make_current(&surface).unwrap(); + (surface, context) + }; - let windowed_context = glutin::ContextBuilder::new().build_windowed(wb, &el).unwrap(); - let windowed_context = unsafe{windowed_context.make_current().unwrap()}; + gl::load_with(|symbol| (gl_display.get_proc_address(&CString::new(symbol).unwrap()) as _)); - gl::load_with(|symbol| windowed_context.get_proc_address(symbol)); unsafe { gl::Enable(gl::BLEND); gl::Disable(gl::DEPTH_TEST); @@ -45,7 +89,12 @@ pub fn setup_egui_glutin(el: &glutin::event_loop::EventLoop<()>, window_size: (u let frag_e = include_str!("shader_e.frag"); EguiState { - windowed_context: windowed_context, + glutin_state: GlutinState { + window: window, + gl_ctx: gl_ctx, + gl_display: gl_display, + gl_surface: gl_surface, + }, ctx: egui::Context::default(), pos_in_points: None, @@ -274,7 +323,7 @@ fn compile_shader(source: &str, shader_type: u32) -> u32 { } } -pub fn update_textures(tex_set: egui::epaint::ahash::AHashMap, tex_e: u32) { +pub fn update_textures(tex_set: Vec<(egui::TextureId, egui::epaint::ImageDelta)>, tex_e: u32) { for (id, image_delta) in &tex_set { let pixels: Vec<(u8, u8, u8, u8)> = match &image_delta.image { egui::ImageData::Color(image) => { @@ -283,7 +332,7 @@ pub fn update_textures(tex_set: egui::epaint::ahash::AHashMap { let gamma = 1.0; - image.srgba_pixels(gamma).map(|color| color.to_tuple()).collect() + image.srgba_pixels(Some(gamma)).map(|color| color.to_tuple()).collect() } }; @@ -448,9 +497,9 @@ pub fn event_handling(event: Event<()>, control_flow: &mut ControlFlow, egui_sta WindowEvent::MouseInput{state, button, ..} => { if let Some(pos_in_points_temp) = egui_state.pos_in_points { if let Some(button) = match button { - glutin::event::MouseButton::Left => Some(egui::PointerButton::Primary), - glutin::event::MouseButton::Right => Some(egui::PointerButton::Secondary), - glutin::event::MouseButton::Middle => Some(egui::PointerButton::Middle), + winit::event::MouseButton::Left => Some(egui::PointerButton::Primary), + winit::event::MouseButton::Right => Some(egui::PointerButton::Secondary), + winit::event::MouseButton::Middle => Some(egui::PointerButton::Middle), _ => None, } { @@ -459,8 +508,8 @@ pub fn event_handling(event: Event<()>, control_flow: &mut ControlFlow, egui_sta pos: pos_in_points_temp, button, pressed: match state { - glutin::event::ElementState::Pressed => true, - glutin::event::ElementState::Released => false, + winit::event::ElementState::Pressed => true, + winit::event::ElementState::Released => false, }, modifiers: Modifiers::default(), } @@ -469,8 +518,20 @@ pub fn event_handling(event: Event<()>, control_flow: &mut ControlFlow, egui_sta } } + WindowEvent::MouseWheel {delta, ..} => { + if let winit::event::MouseScrollDelta::LineDelta(_, y) = delta { + egui_state.raw_input.events.push( + egui::Event::Scroll(egui::vec2(0.0, y * 35.0)) + ); + } + } + WindowEvent::Resized(physical_size) => { - egui_state.windowed_context.resize(physical_size); + egui_state.glutin_state.gl_surface.resize( + &egui_state.glutin_state.gl_ctx, + std::num::NonZeroU32::new(physical_size.width).unwrap(), + std::num::NonZeroU32::new(physical_size.width).unwrap(), + ); egui_state.window_size = (physical_size.width, physical_size.height); unsafe { diff --git a/src/game_data.rs b/src/game_data.rs index d50516e..c6b85ff 100644 --- a/src/game_data.rs +++ b/src/game_data.rs @@ -184,7 +184,9 @@ impl Games { Rank { data_points: std::collections::VecDeque::new(), offset: 0x041D, - steps: 16, + steps: 17, + //todo: what's the valid range? starting rank on normal difficulty is 2, demo 0. + // max rank appears to be 16. 0-16? unusual } ), }, @@ -195,7 +197,9 @@ impl Games { Rank { data_points: std::collections::VecDeque::new(), offset: 0x39C0, - steps: 16, + steps: 17, + //todo: valid range? 0-16? + // if 39C3 != 0, then the range is 0-31! } ), }, diff --git a/src/main.rs b/src/main.rs index 2be5cf7..a222e60 100644 --- a/src/main.rs +++ b/src/main.rs @@ -1,8 +1,9 @@ #![windows_subsystem = "windows"] -use egui::{Context, plot::{Plot, Line, Values as EguiValues, LineStyle}, Color32, RichText}; -use glutin::event_loop::{ControlFlow, EventLoop}; +use egui::{Context, plot::{Plot, Line, LineStyle, PlotPoints}, Color32, RichText}; +use glutin::surface::GlSurface; use update::CurrentGame; +use winit::event_loop::{EventLoop, ControlFlow}; mod egui_glutin; mod game_data; @@ -89,6 +90,8 @@ fn main() { }, }; + egui_state.ctx.set_pixels_per_point(2.0); + let mut current_game = None; el.run(move |event, _, control_flow| { @@ -130,6 +133,7 @@ fn main() { } } + egui_state.ctx.begin_frame(egui_state.raw_input.take()); create_ui(&mut egui_state.ctx, &mut gui_state, &mut current_game); // add panels, windows and widgets to `egui_ctx` here @@ -144,7 +148,7 @@ fn main() { todo!(); } - egui_state.windowed_context.swap_buffers().unwrap(); + egui_state.glutin_state.gl_surface.swap_buffers(&egui_state.glutin_state.gl_ctx).unwrap(); } }); } @@ -212,7 +216,7 @@ fn rank_graph(ctx: &mut Context, gui_state: &mut GuiState, rank: &mut update::Ra } plot_ui.line( - Line::new(EguiValues::from_ys_f32(rank.data_points.as_slices().0)) + Line::new(PlotPoints::from_ys_f32(rank.data_points.as_slices().0)) .color(Color32::from_rgb(rgb[0], rgb[1], rgb[2])) .style(LineStyle::Solid) ) diff --git a/src/shader_e.frag b/src/shader_e.frag index 9782659..c8506ea 100644 --- a/src/shader_e.frag +++ b/src/shader_e.frag @@ -13,7 +13,18 @@ out vec4 color_out; //----- -void main() -{ - color_out = color * texture(tex_sampler, uv); +vec3 srgb_gamma_from_linear(vec3 rgb) { // 0-1 sRGB gamma from 0-1 linear + bvec3 cutoff = lessThan(rgb, vec3(0.0031308)); + vec3 lower = rgb * vec3(12.92); + vec3 higher = vec3(1.055) * pow(rgb, vec3(1.0 / 2.4)) - vec3(0.055); + return mix(higher, lower, vec3(cutoff)); +} + +vec4 srgba_gamma_from_linear(vec4 rgba) { // 0-1 sRGBA gamma from 0-1 linear + return vec4(srgb_gamma_from_linear(rgba.rgb), rgba.a); +} + +void main() { + vec4 texture_in_gamma = srgba_gamma_from_linear(texture2D(tex_sampler, uv)); + color_out = color * texture_in_gamma; } diff --git a/src/shader_e.vert b/src/shader_e.vert index 1772006..cf6246e 100644 --- a/src/shader_e.vert +++ b/src/shader_e.vert @@ -13,21 +13,7 @@ out vec4 color; //----- -vec3 linear_from_srgb(vec3 srgb) // 0-1 linear from 0-255 sRGB -{ - bvec3 cutoff = lessThan(srgb, vec3(10.31475)); - vec3 lower = srgb / vec3(3294.6); - vec3 higher = pow((srgb + vec3(14.025)) / vec3(269.025), vec3(2.4)); - return mix(higher, lower, cutoff); -} - -vec4 linear_from_srgba(vec4 srgba) -{ - return vec4(linear_from_srgb(srgba.rgb), srgba.a / 255.0); -} - -void main() -{ +void main() { gl_Position = vec4( 2.0 * vertices.x / size.x - 1.0, 1.0 - 2.0 * vertices.y / size.y, @@ -36,5 +22,5 @@ void main() ); uv = uv_in; - color = linear_from_srgba(color_in); + color = color_in / 255.0; } diff --git a/src/update.rs b/src/update.rs index a7b407b..335ac1e 100644 --- a/src/update.rs +++ b/src/update.rs @@ -143,8 +143,7 @@ fn get_game_name(handle: HANDLE, info: &MODULEINFO, emu: &game_data::Emulator) - unsafe { let p_raw_str = raw_str.as_mut_ptr() as *mut _ as *mut c_void; - let mut count = 0; - ReadProcessMemory(handle, game_name_offset, p_raw_str, raw_str.len() - 1, &mut count); + ReadProcessMemory(handle, game_name_offset, p_raw_str, raw_str.len() - 1, None); } let terminator = raw_str.into_iter().position(|x| x == 0).unwrap(); @@ -164,8 +163,7 @@ fn get_mame_offset(handle: HANDLE, dll_base: u64, offset_list: Vec) -> u64 for offset in offset_list { let base = (address + offset) as *const c_void; let p_address = &mut address as *mut _ as *mut c_void; - let mut count = 0; - ReadProcessMemory(handle, base, p_address, 8, &mut count); + ReadProcessMemory(handle, base, p_address, 8, None); } address @@ -194,8 +192,7 @@ fn update_rank(rank: &mut Rank, game: &game_data::Games, handle: HANDLE, base_of unsafe { let base = (base_offset + rank.offset as u64) as *const c_void; let p_rank = &mut temp_rank as *mut _ as *mut c_void; - let mut count = 0; - ReadProcessMemory(handle, base, p_rank, 1, &mut count); + ReadProcessMemory(handle, base, p_rank, 1, None); } temp_rank = game.format_rank(temp_rank); @@ -217,8 +214,7 @@ fn update_smash_tv(smash_tv: &mut SmashTV, handle: HANDLE, base_offset: u64) { unsafe { let base = (base_offset + 0x1902) as *const c_void; let p_rank = temp.as_mut_ptr() as *mut _ as *mut c_void; - let mut count = 0; - ReadProcessMemory(handle, base, p_rank, LIST_COUNT, &mut count); + ReadProcessMemory(handle, base, p_rank, LIST_COUNT, None); } let mut temp2 = 0; @@ -226,8 +222,7 @@ fn update_smash_tv(smash_tv: &mut SmashTV, handle: HANDLE, base_offset: u64) { unsafe { let base = (base_offset + 0x18E4) as *const c_void; let p_rank = &mut temp2 as *mut _ as *mut c_void; - let mut count = 0; - ReadProcessMemory(handle, base, p_rank, 1, &mut count); + ReadProcessMemory(handle, base, p_rank, 1, None); } smash_tv.active_enemies[0] = temp2;