From 3e98f3acba5abf5a23703890339992d4b9af7033 Mon Sep 17 00:00:00 2001 From: Max Bradbury Date: Fri, 10 Apr 2020 16:52:53 +0100 Subject: [PATCH] fix sprite_to_string() --- src/main.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main.rs b/src/main.rs index c3d9392..abff873 100644 --- a/src/main.rs +++ b/src/main.rs @@ -561,18 +561,18 @@ fn test_sprite_from_string() { fn sprite_to_string(sprite: Sprite) -> String { format!( - "SPR {}\n{}{}{}\nPOS {}", + "SPR {}\n{}{}{}\nPOS {} {}", sprite.id, animation_frames_to_string(sprite.animation_frames), if sprite.name.is_some() {format!("\nNAME {}", sprite.name.unwrap())} else {"".to_string()}, if sprite.dialogue.is_some() {format!("\nDLG {}", sprite.dialogue.unwrap())} else {"".to_string()}, + sprite.room, position_to_string(sprite.position), ) } #[test] fn test_sprite_to_string() { - // todo this fails let output = sprite_to_string(test_sprite()); let expected = "SPR a\n00000000\n01111000\n01001000\n00111100\n00111100\n01011110\n01011110\n01101111\nNAME hatch\nDLG SPR_0\nPOS 4 9,7".to_string();