core/gpu: Remove panic when ObjMode is "Forbidden"

Former-commit-id: 90380761357fa7df0769cb487980a405ae2e8265
Former-commit-id: 1cddcb9030b03f3da35a98d56c7a21a6b8eb7530
This commit is contained in:
Michel Heily 2020-05-20 20:19:56 +03:00
parent f6d7b9ff4d
commit 96b1e0d844

View file

@ -93,6 +93,10 @@ impl Gpu {
return;
}
if attrs.0.objmode() == ObjMode::Forbidden {
return;
}
let tile_base = OVRAM + 0x20 * (attrs.2.tile() as u32);
let (tile_size, pixel_format) = attrs.tile_format();
@ -182,6 +186,10 @@ impl Gpu {
return;
}
if attrs.0.objmode() == ObjMode::Forbidden {
return;
}
let tile_base = OVRAM + 0x20 * (attrs.2.tile() as u32);
let (tile_size, pixel_format) = attrs.tile_format();
@ -273,9 +281,7 @@ impl Gpu {
ObjMode::Window => {
current_obj.window = true;
}
ObjMode::Forbidden => {
panic!("Forbidden sprite mode!");
}
ObjMode::Forbidden => unreachable!(),
}
}