# HG changeset patch # User Emmanuel Gil Peyrot # Date 1577567903 -3600 # Node ID ff9651cfe1b063e82d875742f972f42bfd898af9 # Parent b9928db975e1c02ef843398f4478cc7524da2b52 ecl_vm: Remove trailing whitespace. diff --git a/src/th06/ecl_vm.rs b/src/th06/ecl_vm.rs --- a/src/th06/ecl_vm.rs +++ b/src/th06/ecl_vm.rs @@ -634,7 +634,7 @@ impl EclRunner { enemy.set_bullet_launch_interval(rand_start, interval); } - // 78-79 are more interpolation flags + // 78-79 are more interpolation flags // 78 SubInstruction::DelayAttack() => { let mut enemy = self.enemy.borrow_mut(); @@ -702,7 +702,7 @@ impl EclRunner { } // 88 - /* + /* SubInstruction::AlterLaserAngle(laser_id, delta) => { let mut enemy = self.enemy.borrow_mut(); if enemy.laser_by_id.contains_key(&laser_id) { @@ -711,7 +711,7 @@ impl EclRunner { } } */ - + // 89 /* SubInstruction::AlterLaserAnglePlayer(laser_id, delta) => { @@ -743,9 +743,9 @@ impl EclRunner { // the correct implementation would be: if this laser does not exist have a // 1/100000 chance to continue, otherwise crash if enemy.laser_by_id.contains_key(&laser_id) { - // let's assume we gud + // let's assume we gud self.frame.comparison_reg = 1; - } + } else{ self.frame.comparison_reg = 0; } @@ -785,8 +785,8 @@ impl EclRunner { */ - // 96 - /* + // 96 + /* SubInstruction::KillEnemies() => { let mut game = self.game.borrow_mut(); game.kill_enemies(); @@ -837,7 +837,7 @@ impl EclRunner { } else { // the boss pointer is written somewhere in memory and overwrote by a 0 when - // the boss mode is false, might want to look into that + // the boss mode is false, might want to look into that enemy.set_boss(true); } } @@ -894,7 +894,7 @@ impl EclRunner { unimplemented!("not again that damn foe corrupted my ret\\x41\\x41\\x41\\x41"); } - // 110 + // 110 /* SubInstruction::KillEnemy(enemy) => { let mut game = self.game.borrow_mut(); @@ -1132,7 +1132,7 @@ impl EclRunner { self._setval(-10004, n) */ } - + 9 => { let mut rnd = self.get_prng().borrow_mut().get_f64(); //TODO: the game does that @@ -1147,10 +1147,10 @@ impl EclRunner { new_effect(GAME_OBJECT,(sprite *)bullet, (int)bullet->sprites[0].sometimes_copy_of_UNK1 + (int)bullet->field_0x5ba); bullet.speed=0.01; bullet.frame=0x78; - + let mut dx = bullet.x - enemy.x; let mut distance = dx.hypot(bullet.y - enemy.y); - + if distance > 0.01 { distance = sqrt(distance); }else{distance = 0.;}