Added support for Dance Magic/Battle on Techno Motion 8-panel. Kind of hacky, but perhaps it will inspire others.

This commit is contained in:
Geoff Benson
2004-06-23 22:18:22 +00:00
parent 99b2abd1d3
commit 9609f5303a
3 changed files with 13 additions and 3 deletions
+3 -1
View File
@@ -421,7 +421,9 @@ float ArrowGetZoom( PlayerNumber pn )
{
/* Hack: make STYLE_TECHNO_VERSUS8 fit. */
if( GAMESTATE->m_CurGame == GAME_TECHNO &&
GAMESTATE->m_CurStyle == STYLE_TECHNO_VERSUS8 )
( GAMESTATE->m_CurStyle == STYLE_TECHNO_VERSUS8
|| GAMESTATE->m_PlayMode == PLAY_MODE_BATTLE
|| GAMESTATE->m_PlayMode == PLAY_MODE_RAVE ) )
return 0.6f;
return 1.0f;
}
+7
View File
@@ -780,6 +780,13 @@ GameDef* GameState::GetCurrentGameDef()
const StyleDef* GameState::GetCurrentStyleDef() const
{
ASSERT( m_CurStyle != STYLE_INVALID ); // the style must be set before calling this
// HACK: if we're in TM doing PLAY_MODE_BATTLE or PLAY_MODE_RAVE,
// pretend that we're doing STYLE_TECHNO_VERSUS8 instead.
if( m_CurGame == GAME_TECHNO &&
( m_PlayMode == PLAY_MODE_BATTLE || m_PlayMode == PLAY_MODE_RAVE ) )
return GAMEMAN->GetStyleDefForStyle( STYLE_TECHNO_VERSUS8 );
return GAMEMAN->GetStyleDefForStyle( m_CurStyle );
}
+3 -2
View File
@@ -268,7 +268,8 @@ static bool AreStyleAndPlayModeCompatible( Style style, PlayMode pm )
// Can't play rave if there isn't enough room for two players.
// This is correct for dance (ie, no rave for solo and doubles),
// and should be okay for pump .. not sure about other game types.
if( GAMEMAN->GetStyleDefForStyle(style)->m_iColsPerPlayer >= 6 )
// Techno Motion scales down versus arrows, though, so allow this.
if( GAMEMAN->GetStyleDefForStyle(style)->m_iColsPerPlayer >= 6 && GAMESTATE->m_CurGame != GAME_TECHNO )
return false;
/* Don't allow battle modes if the style takes both sides. */
@@ -407,6 +408,7 @@ void ModeChoice::Apply( PlayerNumber pn ) const
GAMESTATE->m_CurGame = m_game;
if( m_pm != PLAY_MODE_INVALID )
GAMESTATE->m_PlayMode = m_pm;
if( m_style != STYLE_INVALID )
{
GAMESTATE->m_CurStyle = m_style;
@@ -479,7 +481,6 @@ void ModeChoice::Apply( PlayerNumber pn ) const
{
GAMESTATE->PlayersFinalized();
}
}
bool ModeChoice::IsZero() const