summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
author cam900 <dbtlrchl@naver.com>2023-09-04 01:01:11 +0900
committer GitHub <noreply@github.com>2023-09-04 02:01:11 +1000
commitcb09c70bcb82d0309c83aeb45bdab2dcdc198240 (patch)
treefb44cd0aff0d43f425ea9c97f72b3a267827d794
parent7a9a815a83def0b4a9984f737ffe536c0cbab8fd (diff)
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.
-rw-r--r--src/mame/igs/pgm_v.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/mame/igs/pgm_v.cpp b/src/mame/igs/pgm_v.cpp
index 8b73553a6c8..ca4113b51b4 100644
--- a/src/mame/igs/pgm_v.cpp
+++ b/src/mame/igs/pgm_v.cpp
@@ -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++;