Mercurial > touhou
changeset 716:5016c09e5d7c
Fix some warnings.
author | Emmanuel Gil Peyrot <linkmauve@linkmauve.fr> |
---|---|
date | Mon, 23 Sep 2019 13:49:07 +0200 |
parents | 2b2376811f46 |
children | d5d5496e4e53 |
files | examples/anmrenderer.rs examples/eclrenderer.rs src/th06/ecl.rs src/th06/ecl_vm.rs src/th06/interpolator.rs src/th06/std_vm.rs |
diffstat | 6 files changed, 12 insertions(+), 14 deletions(-) [+] |
line wrap: on
line diff
--- a/examples/anmrenderer.rs +++ b/examples/anmrenderer.rs @@ -1,6 +1,5 @@ use luminance::blending::{Equation, Factor}; use luminance::context::GraphicsContext; -use luminance::framebuffer::Framebuffer; use luminance::pipeline::BoundTexture; use luminance::pixel::NormUnsigned; use luminance::render_state::RenderState;
--- a/examples/eclrenderer.rs +++ b/examples/eclrenderer.rs @@ -1,6 +1,5 @@ use luminance::blending::{Equation, Factor}; use luminance::context::GraphicsContext; -use luminance::framebuffer::Framebuffer; use luminance::pipeline::BoundTexture; use luminance::pixel::NormUnsigned; use luminance::render_state::RenderState;
--- a/src/th06/ecl.rs +++ b/src/th06/ecl.rs @@ -284,7 +284,7 @@ declare_sub_instructions!{ 95 => fn SpawnEnemy(sub: i32, x: f32, y: f32, z: f32, life: i16, bonus_dropped: i16, die_score: i32), 96 => fn KillAllEnemies(), 97 => fn SetAnim(script: i32), - 98 => fn SetMultipleAnims(default: i16, end_left: i16, end_right: i16, left: i16, right: i16, UNUSED: i16), + 98 => fn SetMultipleAnims(default: i16, end_left: i16, end_right: i16, left: i16, right: i16, _unused: i16), 99 => fn SetAuxAnm(number: i32, script: i32), 100 => fn SetDeathAnim(sprite_index: i32), 101 => fn SetBossMode(value: i32), @@ -314,17 +314,17 @@ declare_sub_instructions!{ 125 => fn UNK_ins125(), 126 => fn SetRemainingLives(lives: i32), // TODO: Found in stage 4. - 127 => fn UNK_ins127(TODO: i32), + 127 => fn UNK_ins127(UNK1: i32), 128 => fn Interrupt(event: i32), 129 => fn InterruptAux(number: i32, event: i32), // TODO: Found in stage 4. - 130 => fn UNK_ins130(TODO: i32), + 130 => fn UNK_ins130(UNK1: i32), 131 => fn SetDifficultyCoeffs(speed_a: f32, speed_b: f32, nb_a: i32, nb_b: i32, shots_a: i32, shots_b: i32), 132 => fn SetInvisible(invisible: i32), 133 => fn CopyCallbacks(), // TODO: Found in stage 4. 134 => fn UNK_ins134(), - 135 => fn EnableSpellcardBonus(UNKNOW: i32), + 135 => fn EnableSpellcardBonus(UNK1: i32), } fn parse_sub_instruction(input: &[u8]) -> IResult<&[u8], CallSub> {
--- a/src/th06/ecl_vm.rs +++ b/src/th06/ecl_vm.rs @@ -1,7 +1,7 @@ //! ECL runner. use crate::th06::ecl::{Ecl, SubInstruction}; -use crate::th06::enemy::{Enemy, BulletAttributes, Offset}; +use crate::th06::enemy::{Enemy, Offset}; use crate::util::prng::Prng; use std::cell::RefCell; use std::rc::Rc; @@ -733,7 +733,7 @@ impl EclRunner { // 91 // wat SubInstruction::LaserSetCompare(laser_id) => { - let mut enemy = self.enemy.borrow_mut(); + let enemy = self.enemy.borrow_mut(); // in game it checks if either the laser exists OR if one of its member is set to 0 // which, uhhhh, we are not going to reimplement for obvious reasons // the correct implementation would be: if this laser does not exist have a @@ -829,7 +829,7 @@ impl EclRunner { } // 101 SubInstruction::SetBossMode(value) => { - let mut enemy = self.enemy.borrow_mut(); + let enemy = self.enemy.borrow_mut(); if value < 0 { enemy.set_boss(false); } @@ -872,7 +872,7 @@ impl EclRunner { // 106 SubInstruction::PlaySound(index) => { - let mut enemy = self.enemy.borrow_mut(); + let enemy = self.enemy.borrow_mut(); enemy.play_sound(index); }
--- a/src/th06/interpolator.rs +++ b/src/th06/interpolator.rs @@ -93,4 +93,4 @@ macro_rules! generate_interpolator { generate_interpolator!(Interpolator1, 1); generate_interpolator!(Interpolator2, 2); generate_interpolator!(Interpolator3, 3); -generate_interpolator!(Interpolator4, 4); +//generate_interpolator!(Interpolator4, 4);
--- a/src/th06/std_vm.rs +++ b/src/th06/std_vm.rs @@ -1,8 +1,8 @@ //! Interpreter of STD files. -use crate::th06::std::{Stage, Position, Call, Instruction}; -use crate::th06::interpolator::{Interpolator1, Interpolator3, Interpolator4, Formula}; -use crate::util::math::{Mat4, perspective, setup_camera}; +use crate::th06::std::{Stage, Call, Instruction}; +use crate::th06::interpolator::{Interpolator3, Formula}; +use crate::util::math::{Mat4, setup_camera}; use std::cell::RefCell; use std::rc::Rc;