core/gpu: Remove panic when ObjMode is "Forbidden"
Former-commit-id: 90380761357fa7df0769cb487980a405ae2e8265 Former-commit-id: 1cddcb9030b03f3da35a98d56c7a21a6b8eb7530
This commit is contained in:
parent
f6d7b9ff4d
commit
96b1e0d844
|
@ -93,6 +93,10 @@ impl Gpu {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if attrs.0.objmode() == ObjMode::Forbidden {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
let tile_base = OVRAM + 0x20 * (attrs.2.tile() as u32);
|
let tile_base = OVRAM + 0x20 * (attrs.2.tile() as u32);
|
||||||
|
|
||||||
let (tile_size, pixel_format) = attrs.tile_format();
|
let (tile_size, pixel_format) = attrs.tile_format();
|
||||||
|
@ -182,6 +186,10 @@ impl Gpu {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if attrs.0.objmode() == ObjMode::Forbidden {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
let tile_base = OVRAM + 0x20 * (attrs.2.tile() as u32);
|
let tile_base = OVRAM + 0x20 * (attrs.2.tile() as u32);
|
||||||
|
|
||||||
let (tile_size, pixel_format) = attrs.tile_format();
|
let (tile_size, pixel_format) = attrs.tile_format();
|
||||||
|
@ -273,9 +281,7 @@ impl Gpu {
|
||||||
ObjMode::Window => {
|
ObjMode::Window => {
|
||||||
current_obj.window = true;
|
current_obj.window = true;
|
||||||
}
|
}
|
||||||
ObjMode::Forbidden => {
|
ObjMode::Forbidden => unreachable!(),
|
||||||
panic!("Forbidden sprite mode!");
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Reference in a new issue