set up visual comparison graphics tests for indexed+rgb versions
the rgb versions are not yet present, however
This commit is contained in:
parent
07f2b13f68
commit
c1dcc39bc1
|
@ -1,4 +1,5 @@
|
|||
use std::path::Path;
|
||||
use std::ops::Add;
|
||||
use std::path::{Path, PathBuf};
|
||||
use std::rc::Rc;
|
||||
|
||||
use ggdt::prelude::*;
|
||||
|
@ -26,6 +27,11 @@ fn verify_visual(screen: &IndexedBitmap, palette: &Palette, source: &Path) -> bo
|
|||
*screen == source_bmp && *palette == source_pal
|
||||
}
|
||||
|
||||
fn make_ref_path(ref_filename: &str) -> PathBuf {
|
||||
let path = String::from("tests/ref/indexed/").add(ref_filename);
|
||||
PathBuf::from(&path)
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn pixel_addressing() {
|
||||
let (mut screen, palette) = setup();
|
||||
|
@ -67,8 +73,8 @@ fn pixel_addressing() {
|
|||
}
|
||||
}
|
||||
|
||||
let path = Path::new("tests/ref/pixel_addressing.pcx");
|
||||
//screen.to_pcx_file(path, &palette).unwrap();
|
||||
let path = make_ref_path("pixel_addressing.pcx");
|
||||
//screen.to_pcx_file(path.as_path(), &palette).unwrap();
|
||||
assert!(verify_visual(&screen, &palette, &path), "bitmap differs from source image: {:?}", path);
|
||||
}
|
||||
|
||||
|
@ -119,8 +125,8 @@ fn pixel_drawing() {
|
|||
screen.set_pixel(160, i + 234, 15);
|
||||
}
|
||||
|
||||
let path = Path::new("tests/ref/pixel_drawing.pcx");
|
||||
//screen.to_pcx_file(path, &palette).unwrap();
|
||||
let path = make_ref_path("pixel_drawing.pcx");
|
||||
//screen.to_pcx_file(path.as_path(), &palette).unwrap();
|
||||
assert!(verify_visual(&screen, &palette, &path), "bitmap differs from source image: {:?}", path);
|
||||
}
|
||||
|
||||
|
@ -144,8 +150,8 @@ fn blended_pixel_drawing() {
|
|||
screen.set_blended_pixel(160, i + 234, 15, &blend_map);
|
||||
}
|
||||
|
||||
let path = Path::new("tests/ref/blended_pixel_drawing.pcx");
|
||||
screen.to_pcx_file(path, &palette).unwrap();
|
||||
let path = make_ref_path("blended_pixel_drawing.pcx");
|
||||
//screen.to_pcx_file(path.as_path(), &palette).unwrap();
|
||||
assert!(verify_visual(&screen, &palette, &path), "bitmap differs from source image: {:?}", path);
|
||||
}
|
||||
|
||||
|
@ -165,8 +171,8 @@ fn horiz_line_drawing() {
|
|||
screen.horiz_line(100, 200, -10, 6);
|
||||
screen.horiz_line(20, 80, 250, 7);
|
||||
|
||||
let path = Path::new("tests/ref/horiz_line_drawing.pcx");
|
||||
//screen.to_pcx_file(path, &palette).unwrap();
|
||||
let path = make_ref_path("horiz_line_drawing.pcx");
|
||||
//screen.to_pcx_file(path.as_path(), &palette).unwrap();
|
||||
assert!(verify_visual(&screen, &palette, &path), "bitmap differs from source image: {:?}", path);
|
||||
}
|
||||
|
||||
|
@ -185,8 +191,8 @@ fn blended_horiz_line_drawing() {
|
|||
screen.blended_horiz_line(100, 200, -10, 6, &blend_map);
|
||||
screen.blended_horiz_line(20, 80, 250, 7, &blend_map);
|
||||
|
||||
let path = Path::new("tests/ref/blended_horiz_line_drawing.pcx");
|
||||
//screen.to_pcx_file(path, &palette).unwrap();
|
||||
let path = make_ref_path("blended_horiz_line_drawing.pcx");
|
||||
//screen.to_pcx_file(path.as_path(), &palette).unwrap();
|
||||
assert!(verify_visual(&screen, &palette, &path), "bitmap differs from source image: {:?}", path);
|
||||
}
|
||||
|
||||
|
@ -205,8 +211,8 @@ fn vert_line_drawing() {
|
|||
screen.vert_line(-17, 10, 20, 6);
|
||||
screen.vert_line(400, 100, 300, 7);
|
||||
|
||||
let path = Path::new("tests/ref/vert_line_drawing.pcx");
|
||||
//screen.to_pcx_file(path, &palette).unwrap();
|
||||
let path = make_ref_path("vert_line_drawing.pcx");
|
||||
//screen.to_pcx_file(path.as_path(), &palette).unwrap();
|
||||
assert!(verify_visual(&screen, &palette, &path), "bitmap differs from source image: {:?}", path);
|
||||
}
|
||||
|
||||
|
@ -225,8 +231,8 @@ fn blended_vert_line_drawing() {
|
|||
screen.blended_vert_line(-17, 10, 20, 6, &blend_map);
|
||||
screen.blended_vert_line(400, 100, 300, 7, &blend_map);
|
||||
|
||||
let path = Path::new("tests/ref/blended_vert_line_drawing.pcx");
|
||||
//screen.to_pcx_file(path, &palette).unwrap();
|
||||
let path = make_ref_path("blended_vert_line_drawing.pcx");
|
||||
//screen.to_pcx_file(path.as_path(), &palette).unwrap();
|
||||
assert!(verify_visual(&screen, &palette, &path), "bitmap differs from source image: {:?}", path);
|
||||
}
|
||||
|
||||
|
@ -262,8 +268,8 @@ fn line_drawing() {
|
|||
screen.line(-100, 120, -100, 239, 3);
|
||||
screen.line(320, 99, 320, 199, 5);
|
||||
|
||||
let path = Path::new("tests/ref/line_drawing.pcx");
|
||||
//screen.to_pcx_file(path, &palette).unwrap();
|
||||
let path = make_ref_path("line_drawing.pcx");
|
||||
//screen.to_pcx_file(path.as_path(), &palette).unwrap();
|
||||
assert!(verify_visual(&screen, &palette, &path), "bitmap differs from source image: {:?}", path);
|
||||
}
|
||||
|
||||
|
@ -299,8 +305,8 @@ fn blended_line_drawing() {
|
|||
screen.blended_line(-100, 120, -100, 239, 3, &blend_map);
|
||||
screen.blended_line(320, 99, 320, 199, 5, &blend_map);
|
||||
|
||||
let path = Path::new("tests/ref/blended_line_drawing.pcx");
|
||||
//screen.to_pcx_file(path, &palette).unwrap();
|
||||
let path = make_ref_path("blended_line_drawing.pcx");
|
||||
//screen.to_pcx_file(path.as_path(), &palette).unwrap();
|
||||
assert!(verify_visual(&screen, &palette, &path), "bitmap differs from source image: {:?}", path);
|
||||
}
|
||||
|
||||
|
@ -327,8 +333,8 @@ fn rect_drawing() {
|
|||
screen.rect(300, 20, 340, -20, 13);
|
||||
screen.rect(20, 220, -20, 260, 14);
|
||||
|
||||
let path = Path::new("tests/ref/rect_drawing.pcx");
|
||||
//screen.to_pcx_file(path, &palette).unwrap();
|
||||
let path = make_ref_path("rect_drawing.pcx");
|
||||
//screen.to_pcx_file(path.as_path(), &palette).unwrap();
|
||||
assert!(verify_visual(&screen, &palette, &path), "bitmap differs from source image: {:?}", path);
|
||||
}
|
||||
|
||||
|
@ -355,8 +361,8 @@ fn blended_rect_drawing() {
|
|||
screen.blended_rect(300, 20, 340, -20, 13, &blend_map);
|
||||
screen.blended_rect(20, 220, -20, 260, 14, &blend_map);
|
||||
|
||||
let path = Path::new("tests/ref/blended_rect_drawing.pcx");
|
||||
//screen.to_pcx_file(path, &palette).unwrap();
|
||||
let path = make_ref_path("blended_rect_drawing.pcx");
|
||||
//screen.to_pcx_file(path.as_path(), &palette).unwrap();
|
||||
assert!(verify_visual(&screen, &palette, &path), "bitmap differs from source image: {:?}", path);
|
||||
}
|
||||
|
||||
|
@ -383,8 +389,8 @@ fn filled_rect_drawing() {
|
|||
screen.filled_rect(300, 20, 340, -20, 13);
|
||||
screen.filled_rect(20, 220, -20, 260, 14);
|
||||
|
||||
let path = Path::new("tests/ref/filled_rect_drawing.pcx");
|
||||
//screen.to_pcx_file(path, &palette).unwrap();
|
||||
let path = make_ref_path("filled_rect_drawing.pcx");
|
||||
//screen.to_pcx_file(path.as_path(), &palette).unwrap();
|
||||
assert!(verify_visual(&screen, &palette, &path), "bitmap differs from source image: {:?}", path);
|
||||
}
|
||||
|
||||
|
@ -411,8 +417,8 @@ fn blended_filled_rect_drawing() {
|
|||
screen.blended_filled_rect(300, 20, 340, -20, 13, &blend_map);
|
||||
screen.blended_filled_rect(20, 220, -20, 260, 14, &blend_map);
|
||||
|
||||
let path = Path::new("tests/ref/blended_filled_rect_drawing.pcx");
|
||||
//screen.to_pcx_file(path, &palette).unwrap();
|
||||
let path = make_ref_path("blended_filled_rect_drawing.pcx");
|
||||
//screen.to_pcx_file(path.as_path(), &palette).unwrap();
|
||||
assert!(verify_visual(&screen, &palette, &path), "bitmap differs from source image: {:?}", path);
|
||||
}
|
||||
|
||||
|
@ -434,8 +440,8 @@ fn circle_drawing() {
|
|||
screen.circle(319, 1, 22, 9);
|
||||
screen.circle(2, 242, 19, 10);
|
||||
|
||||
let path = Path::new("tests/ref/circle_drawing.pcx");
|
||||
//screen.to_pcx_file(path, &palette).unwrap();
|
||||
let path = make_ref_path("circle_drawing.pcx");
|
||||
//screen.to_pcx_file(path.as_path(), &palette).unwrap();
|
||||
assert!(verify_visual(&screen, &palette, &path), "bitmap differs from source image: {:?}", path);
|
||||
}
|
||||
|
||||
|
@ -457,8 +463,8 @@ fn filled_circle_drawing() {
|
|||
screen.filled_circle(319, 1, 22, 9);
|
||||
screen.filled_circle(2, 242, 19, 10);
|
||||
|
||||
let path = Path::new("tests/ref/filled_circle_drawing.pcx");
|
||||
//screen.to_pcx_file(path, &palette).unwrap();
|
||||
let path = make_ref_path("filled_circle_drawing.pcx");
|
||||
//screen.to_pcx_file(path.as_path(), &palette).unwrap();
|
||||
assert!(verify_visual(&screen, &palette, &path), "bitmap differs from source image: {:?}", path);
|
||||
}
|
||||
|
||||
|
@ -508,8 +514,8 @@ fn text_drawing() {
|
|||
screen.print_string(message, 360, 120, FontRenderOpts::Color(7), &font);
|
||||
screen.print_string(message, 200, 250, FontRenderOpts::Color(8), &font);
|
||||
|
||||
let path = Path::new("tests/ref/text_drawing.pcx");
|
||||
//screen.to_pcx_file(path, &palette).unwrap();
|
||||
let path = make_ref_path("text_drawing.pcx");
|
||||
//screen.to_pcx_file(path.as_path(), &palette).unwrap();
|
||||
assert!(verify_visual(&screen, &palette, &path), "bitmap differs from source image: {:?}", path);
|
||||
}
|
||||
|
||||
|
@ -591,8 +597,8 @@ fn solid_blits() {
|
|||
screen.blit(Solid, &bmp16, 196, 238);
|
||||
screen.blit(Solid, &bmp16, 226, 240);
|
||||
|
||||
let path = Path::new("tests/ref/solid_blits.pcx");
|
||||
//screen.to_pcx_file(path, &palette).unwrap();
|
||||
let path = make_ref_path("solid_blits.pcx");
|
||||
//screen.to_pcx_file(path.as_path(), &palette).unwrap();
|
||||
assert!(verify_visual(&screen, &palette, &path), "bitmap differs from source image: {:?}", path);
|
||||
}
|
||||
|
||||
|
@ -658,8 +664,8 @@ fn blended_solid_blits() {
|
|||
screen.blit(SolidBlended { blend_map: blend_map.clone() }, &bmp16, 196, 238);
|
||||
screen.blit(SolidBlended { blend_map: blend_map.clone() }, &bmp16, 226, 240);
|
||||
|
||||
let path = Path::new("tests/ref/blended_solid_blits.pcx");
|
||||
//screen.to_pcx_file(path, &palette).unwrap();
|
||||
let path = make_ref_path("blended_solid_blits.pcx");
|
||||
//screen.to_pcx_file(path.as_path(), &palette).unwrap();
|
||||
assert!(verify_visual(&screen, &palette, &path), "bitmap differs from source image: {:?}", path);
|
||||
}
|
||||
|
||||
|
@ -722,8 +728,8 @@ fn solid_flipped_blits() {
|
|||
screen.blit(SolidFlipped { horizontal_flip: true, vertical_flip: false }, &bmp, 196, 238);
|
||||
screen.blit(SolidFlipped { horizontal_flip: false, vertical_flip: true }, &bmp, 226, 240);
|
||||
|
||||
let path = Path::new("tests/ref/solid_flipped_blits.pcx");
|
||||
//screen.to_pcx_file(path, &palette).unwrap();
|
||||
let path = make_ref_path("solid_flipped_blits.pcx");
|
||||
//screen.to_pcx_file(path.as_path(), &palette).unwrap();
|
||||
assert!(verify_visual(&screen, &palette, &path), "bitmap differs from source image: {:?}", path);
|
||||
}
|
||||
|
||||
|
@ -786,8 +792,8 @@ fn blended_solid_flipped_blits() {
|
|||
screen.blit(SolidFlippedBlended { horizontal_flip: true, vertical_flip: false, blend_map: blend_map.clone() }, &bmp, 196, 238);
|
||||
screen.blit(SolidFlippedBlended { horizontal_flip: false, vertical_flip: true, blend_map: blend_map.clone() }, &bmp, 226, 240);
|
||||
|
||||
let path = Path::new("tests/ref/blended_solid_flipped_blits.pcx");
|
||||
//screen.to_pcx_file(path, &palette).unwrap();
|
||||
let path = make_ref_path("blended_solid_flipped_blits.pcx");
|
||||
//screen.to_pcx_file(path.as_path(), &palette).unwrap();
|
||||
assert!(verify_visual(&screen, &palette, &path), "bitmap differs from source image: {:?}", path);
|
||||
}
|
||||
|
||||
|
@ -850,8 +856,8 @@ fn solid_offset_blits() {
|
|||
screen.blit(SolidOffset(22), &bmp, 196, 238);
|
||||
screen.blit(SolidOffset(22), &bmp, 226, 240);
|
||||
|
||||
let path = Path::new("tests/ref/solid_offset_blits.pcx");
|
||||
//screen.to_pcx_file(path, &palette).unwrap();
|
||||
let path = make_ref_path("solid_offset_blits.pcx");
|
||||
//screen.to_pcx_file(path.as_path(), &palette).unwrap();
|
||||
assert!(verify_visual(&screen, &palette, &path), "bitmap differs from source image: {:?}", path);
|
||||
}
|
||||
|
||||
|
@ -914,8 +920,8 @@ fn solid_flipped_offset_blits() {
|
|||
screen.blit(SolidFlippedOffset { offset: 22, horizontal_flip: true, vertical_flip: false }, &bmp, 196, 238);
|
||||
screen.blit(SolidFlippedOffset { offset: 22, horizontal_flip: false, vertical_flip: true }, &bmp, 226, 240);
|
||||
|
||||
let path = Path::new("tests/ref/solid_flipped_offset_blits.pcx");
|
||||
//screen.to_pcx_file(path, &palette).unwrap();
|
||||
let path = make_ref_path("solid_flipped_offset_blits.pcx");
|
||||
//screen.to_pcx_file(path.as_path(), &palette).unwrap();
|
||||
assert!(verify_visual(&screen, &palette, &path), "bitmap differs from source image: {:?}", path);
|
||||
}
|
||||
|
||||
|
@ -981,8 +987,8 @@ fn transparent_blits() {
|
|||
screen.blit(Transparent(0), &bmp16, 196, 238);
|
||||
screen.blit(Transparent(0), &bmp16, 226, 240);
|
||||
|
||||
let path = Path::new("tests/ref/transparent_blits.pcx");
|
||||
//screen.to_pcx_file(path, &palette).unwrap();
|
||||
let path = make_ref_path("transparent_blits.pcx");
|
||||
//screen.to_pcx_file(path.as_path(), &palette).unwrap();
|
||||
assert!(verify_visual(&screen, &palette, &path), "bitmap differs from source image: {:?}", path);
|
||||
}
|
||||
|
||||
|
@ -1048,8 +1054,8 @@ fn blended_transparent_blits() {
|
|||
screen.blit(TransparentBlended { transparent_color: 0, blend_map: blend_map.clone() }, &bmp16, 196, 238);
|
||||
screen.blit(TransparentBlended { transparent_color: 0, blend_map: blend_map.clone() }, &bmp16, 226, 240);
|
||||
|
||||
let path = Path::new("tests/ref/blended_transparent_blits.pcx");
|
||||
//screen.to_pcx_file(path, &palette).unwrap();
|
||||
let path = make_ref_path("blended_transparent_blits.pcx");
|
||||
//screen.to_pcx_file(path.as_path(), &palette).unwrap();
|
||||
assert!(verify_visual(&screen, &palette, &path), "bitmap differs from source image: {:?}", path);
|
||||
}
|
||||
|
||||
|
@ -1112,8 +1118,8 @@ fn transparent_flipped_blits() {
|
|||
screen.blit(TransparentFlipped { transparent_color: 0, horizontal_flip: true, vertical_flip: false }, &bmp, 196, 238);
|
||||
screen.blit(TransparentFlipped { transparent_color: 0, horizontal_flip: false, vertical_flip: true }, &bmp, 226, 240);
|
||||
|
||||
let path = Path::new("tests/ref/transparent_flipped_blits.pcx");
|
||||
//screen.to_pcx_file(path, &palette).unwrap();
|
||||
let path = make_ref_path("transparent_flipped_blits.pcx");
|
||||
//screen.to_pcx_file(path.as_path(), &palette).unwrap();
|
||||
assert!(verify_visual(&screen, &palette, &path), "bitmap differs from source image: {:?}", path);
|
||||
}
|
||||
|
||||
|
@ -1176,8 +1182,8 @@ fn blended_transparent_flipped_blits() {
|
|||
screen.blit(TransparentFlippedBlended { transparent_color: 0, horizontal_flip: true, vertical_flip: false, blend_map: blend_map.clone() }, &bmp, 196, 238);
|
||||
screen.blit(TransparentFlippedBlended { transparent_color: 0, horizontal_flip: false, vertical_flip: true, blend_map: blend_map.clone() }, &bmp, 226, 240);
|
||||
|
||||
let path = Path::new("tests/ref/blended_transparent_flipped_blits.pcx");
|
||||
//screen.to_pcx_file(path, &palette).unwrap();
|
||||
let path = make_ref_path("blended_transparent_flipped_blits.pcx");
|
||||
//screen.to_pcx_file(path.as_path(), &palette).unwrap();
|
||||
assert!(verify_visual(&screen, &palette, &path), "bitmap differs from source image: {:?}", path);
|
||||
}
|
||||
|
||||
|
@ -1240,8 +1246,8 @@ fn transparent_offset_blits() {
|
|||
screen.blit(TransparentOffset { transparent_color: 0, offset: 22 }, &bmp, 196, 238);
|
||||
screen.blit(TransparentOffset { transparent_color: 0, offset: 22 }, &bmp, 226, 240);
|
||||
|
||||
let path = Path::new("tests/ref/transparent_offset_blits.pcx");
|
||||
//screen.to_pcx_file(path, &palette).unwrap();
|
||||
let path = make_ref_path("transparent_offset_blits.pcx");
|
||||
//screen.to_pcx_file(path.as_path(), &palette).unwrap();
|
||||
assert!(verify_visual(&screen, &palette, &path), "bitmap differs from source image: {:?}", path);
|
||||
}
|
||||
|
||||
|
@ -1304,8 +1310,8 @@ fn transparent_flipped_offset_blits() {
|
|||
screen.blit(TransparentFlippedOffset { transparent_color: 0, offset: 22, horizontal_flip: true, vertical_flip: false }, &bmp, 196, 238);
|
||||
screen.blit(TransparentFlippedOffset { transparent_color: 0, offset: 22, horizontal_flip: false, vertical_flip: true }, &bmp, 226, 240);
|
||||
|
||||
let path = Path::new("tests/ref/transparent_flipped_offset_blits.pcx");
|
||||
//screen.to_pcx_file(path, &palette).unwrap();
|
||||
let path = make_ref_path("transparent_flipped_offset_blits.pcx");
|
||||
//screen.to_pcx_file(path.as_path(), &palette).unwrap();
|
||||
assert!(verify_visual(&screen, &palette, &path), "bitmap differs from source image: {:?}", path);
|
||||
}
|
||||
|
||||
|
@ -1368,8 +1374,8 @@ fn transparent_single_blits() {
|
|||
screen.blit(TransparentSingle { transparent_color: 0, draw_color: 22 }, &bmp, 196, 238);
|
||||
screen.blit(TransparentSingle { transparent_color: 0, draw_color: 22 }, &bmp, 226, 240);
|
||||
|
||||
let path = Path::new("tests/ref/transparent_single_blits.pcx");
|
||||
//screen.to_pcx_file(path, &palette).unwrap();
|
||||
let path = make_ref_path("transparent_single_blits.pcx");
|
||||
//screen.to_pcx_file(path.as_path(), &palette).unwrap();
|
||||
assert!(verify_visual(&screen, &palette, &path), "bitmap differs from source image: {:?}", path);
|
||||
}
|
||||
|
||||
|
@ -1432,8 +1438,8 @@ fn transparent_flipped_single_blits() {
|
|||
screen.blit(TransparentFlippedSingle { transparent_color: 0, draw_color: 22, horizontal_flip: true, vertical_flip: false }, &bmp, 196, 238);
|
||||
screen.blit(TransparentFlippedSingle { transparent_color: 0, draw_color: 22, horizontal_flip: false, vertical_flip: true }, &bmp, 226, 240);
|
||||
|
||||
let path = Path::new("tests/ref/transparent_flipped_single_blits.pcx");
|
||||
//screen.to_pcx_file(path, &palette).unwrap();
|
||||
let path = make_ref_path("transparent_flipped_single_blits.pcx");
|
||||
//screen.to_pcx_file(path.as_path(), &palette).unwrap();
|
||||
assert!(verify_visual(&screen, &palette, &path), "bitmap differs from source image: {:?}", path);
|
||||
}
|
||||
|
||||
|
@ -1496,8 +1502,8 @@ fn rotozoom_blits() {
|
|||
screen.blit(RotoZoom { angle: 1.3, scale_x: 1.0, scale_y: 1.0 }, &bmp, 196, 238);
|
||||
screen.blit(RotoZoom { angle: 1.3, scale_x: 1.0, scale_y: 1.0 }, &bmp, 226, 240);
|
||||
|
||||
let path = Path::new("tests/ref/rotozoom_blits.pcx");
|
||||
//screen.to_pcx_file(path, &palette).unwrap();
|
||||
let path = make_ref_path("rotozoom_blits.pcx");
|
||||
//screen.to_pcx_file(path.as_path(), &palette).unwrap();
|
||||
assert!(verify_visual(&screen, &palette, &path), "bitmap differs from source image: {:?}", path);
|
||||
}
|
||||
|
||||
|
@ -1560,8 +1566,8 @@ fn blended_rotozoom_blits() {
|
|||
screen.blit(RotoZoomBlended { angle: 1.3, scale_x: 1.0, scale_y: 1.0, blend_map: blend_map.clone() }, &bmp, 196, 238);
|
||||
screen.blit(RotoZoomBlended { angle: 1.3, scale_x: 1.0, scale_y: 1.0, blend_map: blend_map.clone() }, &bmp, 226, 240);
|
||||
|
||||
let path = Path::new("tests/ref/blended_rotozoom_blits.pcx");
|
||||
//screen.to_pcx_file(path, &palette).unwrap();
|
||||
let path = make_ref_path("blended_rotozoom_blits.pcx");
|
||||
//screen.to_pcx_file(path.as_path(), &palette).unwrap();
|
||||
assert!(verify_visual(&screen, &palette, &path), "bitmap differs from source image: {:?}", path);
|
||||
}
|
||||
|
||||
|
@ -1624,8 +1630,8 @@ fn rotozoom_offset_blits() {
|
|||
screen.blit(RotoZoomOffset { angle: 1.3, scale_x: 1.0, scale_y: 1.0, offset: 22 }, &bmp, 196, 238);
|
||||
screen.blit(RotoZoomOffset { angle: 1.3, scale_x: 1.0, scale_y: 1.0, offset: 22 }, &bmp, 226, 240);
|
||||
|
||||
let path = Path::new("tests/ref/rotozoom_offset_blits.pcx");
|
||||
//screen.to_pcx_file(path, &palette).unwrap();
|
||||
let path = make_ref_path("rotozoom_offset_blits.pcx");
|
||||
//screen.to_pcx_file(path.as_path(), &palette).unwrap();
|
||||
assert!(verify_visual(&screen, &palette, &path), "bitmap differs from source image: {:?}", path);
|
||||
}
|
||||
|
||||
|
@ -1688,8 +1694,8 @@ fn rotozoom_transparent_blits() {
|
|||
screen.blit(RotoZoomTransparent { transparent_color: 0, angle: 1.3, scale_x: 1.0, scale_y: 1.0 }, &bmp, 196, 238);
|
||||
screen.blit(RotoZoomTransparent { transparent_color: 0, angle: 1.3, scale_x: 1.0, scale_y: 1.0 }, &bmp, 226, 240);
|
||||
|
||||
let path = Path::new("tests/ref/rotozoom_transparent_blits.pcx");
|
||||
//screen.to_pcx_file(path, &palette).unwrap();
|
||||
let path = make_ref_path("rotozoom_transparent_blits.pcx");
|
||||
//screen.to_pcx_file(path.as_path(), &palette).unwrap();
|
||||
assert!(verify_visual(&screen, &palette, &path), "bitmap differs from source image: {:?}", path);
|
||||
}
|
||||
|
||||
|
@ -1752,8 +1758,8 @@ fn blended_rotozoom_transparent_blits() {
|
|||
screen.blit(RotoZoomTransparentBlended { transparent_color: 0, angle: 1.3, scale_x: 1.0, scale_y: 1.0, blend_map: blend_map.clone() }, &bmp, 196, 238);
|
||||
screen.blit(RotoZoomTransparentBlended { transparent_color: 0, angle: 1.3, scale_x: 1.0, scale_y: 1.0, blend_map: blend_map.clone() }, &bmp, 226, 240);
|
||||
|
||||
let path = Path::new("tests/ref/blended_rotozoom_transparent_blits.pcx");
|
||||
//screen.to_pcx_file(path, &palette).unwrap();
|
||||
let path = make_ref_path("blended_rotozoom_transparent_blits.pcx");
|
||||
//screen.to_pcx_file(path.as_path(), &palette).unwrap();
|
||||
assert!(verify_visual(&screen, &palette, &path), "bitmap differs from source image: {:?}", path);
|
||||
}
|
||||
|
||||
|
@ -1816,8 +1822,8 @@ fn rotozoom_transparent_offset_blits() {
|
|||
screen.blit(RotoZoomTransparentOffset { transparent_color: 0, offset: 22, angle: 1.3, scale_x: 1.0, scale_y: 1.0 }, &bmp, 196, 238);
|
||||
screen.blit(RotoZoomTransparentOffset { transparent_color: 0, offset: 22, angle: 1.3, scale_x: 1.0, scale_y: 1.0 }, &bmp, 226, 240);
|
||||
|
||||
let path = Path::new("tests/ref/rotozoom_transparent_offset_blits.pcx");
|
||||
//screen.to_pcx_file(path, &palette).unwrap();
|
||||
let path = make_ref_path("rotozoom_transparent_offset_blits.pcx");
|
||||
//screen.to_pcx_file(path.as_path(), &palette).unwrap();
|
||||
assert!(verify_visual(&screen, &palette, &path), "bitmap differs from source image: {:?}", path);
|
||||
}
|
||||
|
Loading…
Reference in a new issue