let pc = self.program_counter_reg; let higher_order = self.memory[pc as usize] as u16; let lower_order = self.memory[(pc + 1) as usize] as u16; RawInstruction::new( (higher_order << 8) + lower_order ).to_instruction() } // ... }
graphics); for (y, row) in display_buffer.iter().enumerate() { for (x, &val) in row.iter().enumerate() { if val { let dimensions = [(x * ENLARGEMENT_FACTOR) as f64, (y * ENLARGEMENT_FACTOR) as f64, ENLARGEMENT_FACTOR as f64, ENLARGEMENT_FACTOR as f64]; Rectangle::new(color::WHITE) .draw( dimensions, &context.draw_state, context.transform, graphics ); } } } }) }