From 05d99b412931408d0be4b8d14d078bacf8a10e5d Mon Sep 17 00:00:00 2001 From: Glenn Maynard Date: Mon, 1 Mar 2004 02:25:41 +0000 Subject: [PATCH] lua: GetNumPlayersEnabled, PlayerUsingBothSides --- stepmania/src/GameState.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/stepmania/src/GameState.cpp b/stepmania/src/GameState.cpp index 8ceaf322bb..c031c496c2 100644 --- a/stepmania/src/GameState.cpp +++ b/stepmania/src/GameState.cpp @@ -1425,6 +1425,13 @@ LuaFunction_NoArgs( IsExtraStage, GAMESTATE->IsExtraStage() ) LuaFunction_NoArgs( IsExtraStage2, GAMESTATE->IsExtraStage2() ) LuaFunction_NoArgs( CourseSongIndex, GAMESTATE->GetCourseSongIndex() ) LuaFunction_NoArgs( CurStyle, GAMESTATE->m_CurStyle ) +LuaFunction_NoArgs( GetNumPlayersEnabled, GAMESTATE->GetNumPlayersEnabled() ) + +static bool PlayerUsingBothSides() +{ + return GAMESTATE->GetCurrentStyleDef()->m_StyleType==StyleDef::ONE_PLAYER_TWO_CREDITS; +} +LuaFunction_NoArgs( PlayerUsingBothSides, PlayerUsingBothSides() ) /* Return an integer into SONGMAN->m_pSongs. This lets us do input checking, which we * can't easily do if we return pointers. */