Make palette OOBs not fatal
This commit is contained in:
parent
2fb40e7b10
commit
cd48f4c4c8
@ -372,7 +372,8 @@ impl Display {
|
|||||||
if idx < 64 {
|
if idx < 64 {
|
||||||
self.background_palette_cgb[idx / 8].0[idx % 8] = val;
|
self.background_palette_cgb[idx / 8].0[idx % 8] = val;
|
||||||
} else {
|
} else {
|
||||||
panic!("OOB palette w/ autoinc");
|
println!("OOB palette w/ autoinc");
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
if self.background_palette_autoinc {
|
if self.background_palette_autoinc {
|
||||||
self.background_palette_index += 1;
|
self.background_palette_index += 1;
|
||||||
@ -387,7 +388,8 @@ impl Display {
|
|||||||
if idx < 64 {
|
if idx < 64 {
|
||||||
self.object_palette_cgb[idx / 8].0[idx % 8] = val;
|
self.object_palette_cgb[idx / 8].0[idx % 8] = val;
|
||||||
} else {
|
} else {
|
||||||
panic!("OOB obj palette w/ autoinc");
|
println!("OOB obj palette w/ autoinc");
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
if self.object_palette_autoinc {
|
if self.object_palette_autoinc {
|
||||||
self.object_palette_index += 1;
|
self.object_palette_index += 1;
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user