summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
author hap <happppp@users.noreply.github.com>2020-10-06 11:13:25 +0200
committer hap <happppp@users.noreply.github.com>2020-10-06 11:13:25 +0200
commita25dbaad04c89b39e3cd43afe59ecc0611e4d0e9 (patch)
tree21bd697e28bd89794731bd38db6fabed4dd215b5
parentbd25c625599d568e980ab8c907936494dbe74025 (diff)
cgang: bit smoother animation
-rw-r--r--src/mame/drivers/cgang.cpp12
-rw-r--r--src/mame/layout/cgang.lay8
2 files changed, 9 insertions, 11 deletions
diff --git a/src/mame/drivers/cgang.cpp b/src/mame/drivers/cgang.cpp
index 094cef0f10c..851f021bf4e 100644
--- a/src/mame/drivers/cgang.cpp
+++ b/src/mame/drivers/cgang.cpp
@@ -9,14 +9,12 @@ It is an electromechanical arcade lightgun game. There is no screen, feedback
is with motorized elements, lamps and 7segs, and of course sounds and music.
To shoot the targets in MAME, either enable -mouse and click on one of the
-cosmogang lanes(left mouse button doubles as gun trigger by default).
+pink aliens(left mouse button doubles as gun trigger by default).
Or, configure the gun aim inputs and share them with the trigger. For example
use Z,X,C,V,B for the gun aims, and "Z or X or C or V or B" for the trigger.
TODO:
- dump/add Japanese version
-- game can't be played properly within MAME's constraints (mechanical stuff,
- and the lightguns linked to it)
- shot target is sometimes ignored, maybe a BTANB? since it's easy to dismiss
on the real thing as a missed aim. It turns on the lightgun lamp but then
doesn't read the lightsensor.
@@ -346,14 +344,14 @@ TIMER_DEVICE_CALLBACK_MEMBER(cgang_state::door_motor_tick)
void cgang_state::refresh_motor_output()
{
- // output motor positions in range 0-100
+ // output motor positions in range 0-255
for (int i = 0; i < 5; i++)
{
- m_cg_count[i] = int((m_cg_motor_pos[i] / float(CG_MOTOR_LIMIT)) * 100.0 + 0.5);
- m_en_count[i] = int((m_en_pos[i] / float(CG_MOTOR_LIMIT)) * 100.0 + 0.5);
+ m_cg_count[i] = int((m_cg_motor_pos[i] / float(CG_MOTOR_LIMIT)) * 255.0 + 0.5);
+ m_en_count[i] = int((m_en_pos[i] / float(CG_MOTOR_LIMIT)) * 255.0 + 0.5);
}
- m_door_count = (m_conf->read() & 1) ? int((m_door_motor_pos / float(DOOR_MOTOR_LIMIT)) * 100.0 + 0.5) : 0;
+ m_door_count = (m_conf->read() & 1) ? int((m_door_motor_pos / float(DOOR_MOTOR_LIMIT)) * 255.0 + 0.5) : 0;
}
diff --git a/src/mame/layout/cgang.lay b/src/mame/layout/cgang.lay
index e2ea154637c..314292d0b19 100644
--- a/src/mame/layout/cgang.lay
+++ b/src/mame/layout/cgang.lay
@@ -339,13 +339,13 @@ license:CC0
<element name="cg_sol~i~" ref="cosmo">
<animate name="cg_count~i~" />
<bounds state="0" x="~x~" y="10" width="6" height="7" />
- <bounds state="100" x="~x~" y="48.5" width="6" height="7" />
+ <bounds state="255" x="~x~" y="48.5" width="6" height="7" />
</element>
<element ref="nothing" inputtag="FAKE1" inputmask="~mask~">
<animate name="cg_count~i~" />
<bounds state="0" x="~x~" y="10" width="6" height="7" />
- <bounds state="100" x="~x~" y="48.5" width="6" height="7" />
+ <bounds state="255" x="~x~" y="48.5" width="6" height="7" />
</element>
</repeat>
@@ -356,14 +356,14 @@ license:CC0
<element ref="crate">
<animate name="en_count~i~" />
<bounds state="0" x="~x~" y="13.5" width="3.6" height="3.5" />
- <bounds state="100" x="~x~" y="52" width="3.6" height="3.5" />
+ <bounds state="255" x="~x~" y="52" width="3.6" height="3.5" />
</element>
</repeat>
<element ref="door">
<animate name="door_count" />
<bounds state="0" x="8.5" y="8" width="45" height="0" />
- <bounds state="100" x="8.5" y="8" width="45" height="9" />
+ <bounds state="255" x="8.5" y="8" width="45" height="9" />
<color alpha="0.6" />
</element>
</group>