Mivik / prpr

Yet another phigros chart player.
GNU General Public License v3.0
109 stars 17 forks source link

还会更新这个仓库吗?似乎无法编译prpr-render #20

Open wms26 opened 5 months ago

wms26 commented 5 months ago
本人从未使用过rust语言,所以在简单安装了rust的编译环境后就在代码目录下运行了cargo run -r -j 4 --bin prpr-render命令,但是会出现编译错误: error[E0050]: method touch_event has 6 parameters but the declaration in trait touch_event has 7 --> prpr\src\judge.rs:840:20 840 fn touchevent(&mut self, : &mut miniquad::Context, phase: miniquad::TouchPhase, id: u64, x: f32, y: f32) { ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected 7 parameters, found 6
= note: `touch_event` from trait: `fn(&mut Self, &mut GraphicsContext, miniquad::TouchPhase, u64, f32, f32, f64)`
error[E0308]: mismatched types --> prpr\src\ext.rs:129:16 129 if that == (0, 0, screenwidth() as , screenheight() as ) { ---- ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected Option<(i32, i32, i32, i32)>, found ({integer}, {integer}, _, _)
expected because this is std::option::Option<(i32, i32, i32, i32)>
= note: expected enum `std::option::Option<(i32, i32, i32, i32)>`
          found tuple `({integer}, {integer}, _, _)`

help: try wrapping the expression in Some | 129 | if that == Some((0, 0, screenwidth() as , screenheight() as )) { | +++++ +

error[E0308]: mismatched types --> prpr\src\ext.rs:130:52 130 gl.quad_gl.get_active_render_pass().map_or(that, it { ------ ^^^^ expected (i32, i32, i32, i32), found Option<(i32, i32, i32, i32)>
arguments to this method are incorrect
= note: expected tuple `(i32, i32, i32, i32)`
            found enum `std::option::Option<(i32, i32, i32, i32)>`
help: the return type of this call is std::option::Option<(i32, i32, i32, i32)> due to the type of the argument passed --> prpr\src\ext.rs:130:9 130 gl.quad_gl.get_active_render_pass().map_or(that, it { ^ ---- this argument influences the return type of map_or _____
131 let tex = it.texture(gl.quad_context);
132 (0, 0, tex.width as i32, tex.height as i32)
133 })
__^

note: method defined here --> /rustc/9b00956e56009bab2aa15d7bff10916599e3d6d6\library\core\src\option.rs:1127:12 help: consider using Option::expect to unwrap the std::option::Option<(i32, i32, i32, i32)> value, panicking if the value is an Option::None | 130 | gl.quad_gl.get_active_render_pass().map_or(that.expect("REASON"), |it| { | +++++++++++++++++

error[E0308]: mismatched types --> prpr\src\ext.rs:135:9 126 pub fn get_viewport() -> (i32, i32, i32, i32) { -------------------- expected (i32, i32, i32, i32) because of return type ... 135 that ^^^^ expected (i32, i32, i32, i32), found Option<(i32, i32, i32, i32)>
= note: expected tuple `(i32, i32, i32, i32)`
            found enum `std::option::Option<(i32, i32, i32, i32)>`

help: consider using Option::expect to unwrap the std::option::Option<(i32, i32, i32, i32)> value, panicking if the value is an Option::None | 135 | that.expect("REASON") | +++++++++++++++++

error[E0063]: missing field time in initializer of macroquad::input::Touch --> prpr\src\judge.rs:348:30 | 348 | touches.push(Touch { | ^^^^^ missing time

error[E0063]: missing field time in initializer of macroquad::input::Touch --> prpr\src\judge.rs:355:30 | 355 | touches.push(Touch { | ^^^^^ missing time

error[E0063]: missing field time in initializer of macroquad::input::Touch --> prpr\src\judge.rs:362:30 | 362 | touches.push(Touch { | ^^^^^ missing time

error[E0027]: pattern does not mention field time --> prpr\src\judge.rs:388:17 388 for Touch { id, phase, position: p } in events.into_iter() { ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ missing field time
help: include the missing field in the pattern 388 for Touch { id, phase, position: p, time } in events.into_iter() { ~~~~ help: if you don't care about this missing field, you can explicitly ignore it
388 for Touch { id, phase, position: p, .. } in events.into_iter() {
~~

error[E0063]: missing field time in initializer of macroquad::input::Touch --> prpr\src\judge.rs:397:48 | 397 | ... .or_insert_with(|| Touch { | ^^^^^ missing time

error[E0063]: missing field time in initializer of macroquad::input::Touch --> prpr\src\judge.rs:818:25 | 818 | self.0.push(Touch { | ^^^^^ missing time

error[E0063]: missing field time in initializer of macroquad::input::Touch --> prpr\src\judge.rs:841:21 | 841 | self.0.push(Touch { | ^^^^^ missing time

error[E0063]: missing field time in initializer of macroquad::input::Touch --> prpr\src\judge.rs:849:21 | 849 | self.0.push(Touch { | ^^^^^ missing time

error[E0063]: missing field time in initializer of macroquad::input::Touch --> prpr\src\judge.rs:857:21 | 857 | self.0.push(Touch { | ^^^^^ missing time

error[E0308]: mismatched types --> prpr\src\particle.rs:758:13 758 let (x, y, w, h) = quad_gl.get_viewport(); ^^^^^^^^^^^^ ---------------------- this expression has type std::option::Option<(i32, i32, i32, i32)>
expected Option<(i32, i32, i32, i32)>, found (_, _, _, _)
= note: expected enum `std::option::Option<(i32, i32, i32, i32)>`
          found tuple `(_, _, _, _)`

help: try wrapping the pattern in Some | 758 | let Some((x, y, w, h)) = quad_gl.get_viewport(); | +++++ +

error[E0308]: mismatched types --> prpr\src\particle.rs:774:17 774 let (x, y, w, h) = quad_gl.get_viewport(); ^^^^^^^^^^^^ ---------------------- this expression has type std::option::Option<(i32, i32, i32, i32)>
expected Option<(i32, i32, i32, i32)>, found (_, _, _, _)
= note: expected enum `std::option::Option<(i32, i32, i32, i32)>`
          found tuple `(_, _, _, _)`

help: try wrapping the pattern in Some | 774 | let Some((x, y, w, h)) = quad_gl.get_viewport(); | +++++ +

error[E0560]: struct MusicParams has no field named loop_ --> prpr\src\scene\ending.rs:76:17 76 loop_: true, ^^^^^ MusicParams does not have this field

= note: available fields are: loop_mix_time, playback_rate, command_buffer_size

Some errors have detailed explanations: E0027, E0050, E0063, E0308, E0560. For more information about an error, try rustc --explain E0027. error: could not compile prpr (lib) due to 16 previous errors