Files
itgmania212121/stepmania/src/GameCommand.h
T

122 lines
3.6 KiB
C++
Raw Normal View History

2004-12-02 06:29:20 +00:00
/* GameCommand */
2004-05-31 22:42:12 +00:00
2004-12-02 06:29:20 +00:00
#ifndef GameCommand_H
#define GameCommand_H
2003-03-02 01:43:33 +00:00
#include "GameConstantsAndTypes.h"
#include "PlayerNumber.h"
2005-01-22 19:36:39 +00:00
#include "Difficulty.h"
2005-02-22 03:34:56 +00:00
#include "LuaReference.h"
#include "Command.h"
#include <map>
2004-01-25 16:48:09 +00:00
class Song;
2004-01-14 05:10:24 +00:00
class Steps;
2004-04-30 07:46:46 +00:00
class Course;
2004-06-03 08:22:02 +00:00
class Trail;
2004-01-14 05:10:24 +00:00
class Character;
2004-06-28 07:26:00 +00:00
class Style;
2004-07-25 17:07:32 +00:00
class Game;
2005-07-07 22:08:05 +00:00
struct lua_State;
2004-01-14 05:10:24 +00:00
2005-07-16 02:59:35 +00:00
class GameCommand
{
2005-07-16 02:59:35 +00:00
public:
2004-12-02 06:29:20 +00:00
GameCommand() { Init(); }
void Init();
void Load( int iIndex, const Commands& cmds );
void LoadOne( const Command& cmd );
2003-09-27 19:23:34 +00:00
void ApplyToAllPlayers() const;
void Apply( PlayerNumber pn ) const;
private:
void Apply( const vector<PlayerNumber> &vpns ) const;
void ApplySelf( const vector<PlayerNumber> &vpns ) const;
public:
2003-09-27 19:23:34 +00:00
bool DescribesCurrentMode( PlayerNumber pn ) const;
bool DescribesCurrentModeForAllPlayers() const;
2003-09-27 03:06:35 +00:00
bool IsPlayable( CString *why = NULL ) const;
2003-09-29 08:56:33 +00:00
bool IsZero() const;
CString GetAndClearScreen();
// Same as what was passed to Load. We need to keep the original commands
// so that we know the order of commands when it comes time to Apply.
Commands m_Commands;
CString m_sName; // choice name
CString m_sText; // display text
2003-09-25 05:56:38 +00:00
bool m_bInvalid;
2004-04-30 07:46:46 +00:00
CString m_sInvalidReason;
2003-09-25 05:56:38 +00:00
int m_iIndex;
MultiPlayer m_MultiPlayer;
2004-07-25 17:07:32 +00:00
const Game* m_pGame;
2004-06-28 07:26:00 +00:00
const Style* m_pStyle;
2003-09-25 05:56:38 +00:00
PlayMode m_pm;
Difficulty m_dc;
2004-06-03 08:22:02 +00:00
CourseDifficulty m_CourseDifficulty;
2003-09-25 05:56:38 +00:00
CString m_sAnnouncer;
2003-09-27 08:01:17 +00:00
CString m_sModifiers;
2003-09-27 01:45:46 +00:00
CString m_sScreen;
2005-02-22 03:34:56 +00:00
LuaExpression m_LuaFunction;
2004-01-25 16:48:09 +00:00
Song* m_pSong;
2004-01-14 05:10:24 +00:00
Steps* m_pSteps;
2004-04-30 07:46:46 +00:00
Course* m_pCourse;
2004-06-03 08:22:02 +00:00
Trail* m_pTrail;
2004-01-14 05:10:24 +00:00
Character* m_pCharacter;
std::map<CString,CString> m_SetEnv;
CString m_sSongGroup;
2004-12-04 22:33:55 +00:00
SortOrder m_SortOrder;
2004-12-05 11:54:43 +00:00
int m_iUnlockIndex; // -1 for no unlock
CString m_sSoundPath; // "" for no sound
vector<CString> m_vsScreensToPrepare;
2005-01-31 02:00:00 +00:00
int m_iWeightPounds; // -1 == none specified
2005-02-15 22:08:42 +00:00
int m_iGoalCalories; // -1 == none specified
2005-02-17 19:36:10 +00:00
GoalType m_GoalType;
2005-07-07 22:08:05 +00:00
CString m_sProfileID;
2004-12-04 23:24:14 +00:00
bool m_bClearBookkeepingData;
bool m_bClearMachineStats;
2005-04-28 06:17:17 +00:00
bool m_bClearMachineEdits;
bool m_bFillMachineStats; // for testing
2005-01-01 10:27:16 +00:00
bool m_bTransferStatsFromMachine;
bool m_bTransferStatsToMachine;
2005-04-28 06:17:17 +00:00
bool m_bCopyEditsFromMachine;
bool m_bCopyEditsToMachine;
2004-12-04 23:24:14 +00:00
bool m_bInsertCredit;
bool m_bResetToFactoryDefaults;
2004-12-30 01:17:52 +00:00
bool m_bStopMusic;
bool m_bApplyDefaultOptions;
2005-07-07 22:08:05 +00:00
// Lua
2005-07-19 00:46:48 +00:00
void PushSelf( lua_State *L );
};
#endif
2004-05-31 22:42:12 +00:00
/*
* (c) 2001-2004 Chris Danford, Glenn Maynard
* All rights reserved.
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the
* "Software"), to deal in the Software without restriction, including
* without limitation the rights to use, copy, modify, merge, publish,
* distribute, and/or sell copies of the Software, and to permit persons to
* whom the Software is furnished to do so, provided that the above
* copyright notice(s) and this permission notice appear in all copies of
* the Software and that both the above copyright notice(s) and this
* permission notice appear in supporting documentation.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF
* THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR HOLDERS
* INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL INDIRECT
* OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS
* OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
* OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
* PERFORMANCE OF THIS SOFTWARE.
*/