fix tile image

This commit is contained in:
Max Bradbury 2020-07-18 22:09:24 +01:00
parent 48706c35f9
commit 6ad5ceebc6
1 changed files with 2 additions and 2 deletions

View File

@ -50,8 +50,8 @@ pub fn add_tiles(game_data: String, image: String, prefix: String) -> String {
for row in 0..rows {
let mut pixels = Vec::with_capacity(64);
for x in (column * SD)..((column + 1) * SD) {
for y in (row * SD)..((row + 1) * SD) {
for y in (row * SD)..((row + 1) * SD) {
for x in (column * SD)..((column + 1) * SD) {
let pixel = image.get_pixel(x, y).to_rgb();
let total: u32 = (pixel[0] as u32 + pixel[1] as u32 + pixel[2] as u32) as u32;
// is each channel brighter than 128/255 on average?