add comment header to function to pretend that I care
authorsheepluva
Fri, 25 Jun 2021 22:34:26 +0200
changeset 15808 1fa2f38c5700
parent 15807 67f83b7dfc6c
child 15809 c3971b38bbfa
add comment header to function to pretend that I care
rust/hedgewars-engine/src/main.rs
--- a/rust/hedgewars-engine/src/main.rs	Fri Jun 25 22:16:41 2021 +0200
+++ b/rust/hedgewars-engine/src/main.rs	Fri Jun 25 22:34:26 2021 +0200
@@ -36,6 +36,14 @@
 const SCALE_FACTOR: u32 = 16;
 const VALUE_PER_INPIXEL: u8 = 1;
 
+/// Resizes the land preview from the library into appropriate format for --preview command.
+///
+/// # Arguments
+///
+/// * `mono_pixels` - Raw pixels of a land preview (monochrome, 0 = empty, else = filled)
+/// * `in_width` - Width of the preview stored in `mono_pixels`
+/// * `in_height` - Height of the preview stored in `mono_pixels`
+/// * `preview_pixels` - Used as **output** for a resized and (kinda) anti-aliased grayscale preview
 fn resize_mono_preview(mono_pixels: &[u8], in_width: u32, in_height: u32, preview_pixels: &mut [u8]) {
 
     assert!(mono_pixels.len() == (in_width * in_height) as usize);