igs/pgm_v.cpp: Hard-code sprite zoom table entry 0x0f to 1. (#11524)

ddp3 has zero in this entry, but expects it to behave like 1.
This commit is contained in:
cam900 2023-09-04 01:01:11 +09:00 committed by GitHub
parent 7a9a815a83
commit cb09c70bcb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -548,8 +548,10 @@ void pgm_state::get_sprites()
yzom = 0x10 - yzom;
}
m_sprite_ptr_pre->xzoom = (sprite_zoomtable[xzom * 2] << 16) | sprite_zoomtable[xzom * 2 + 1];
m_sprite_ptr_pre->yzoom = (sprite_zoomtable[yzom * 2] << 16) | sprite_zoomtable[yzom * 2 + 1];
// some games (e.g. ddp3) have zero in last zoom table entry but expect 1
// is the last entry hard-coded to 1, or does zero have the same effect as 1?
m_sprite_ptr_pre->xzoom = (xzom == 0xf) ? 1 : ((u32(sprite_zoomtable[xzom * 2]) << 16) | sprite_zoomtable[xzom * 2 + 1]);
m_sprite_ptr_pre->yzoom = (yzom == 0xf) ? 1 : ((u32(sprite_zoomtable[yzom * 2]) << 16) | sprite_zoomtable[yzom * 2 + 1]);
m_sprite_ptr_pre->xgrow = xgrow;
m_sprite_ptr_pre->ygrow = ygrow;
m_sprite_ptr_pre++;