Files
itgmania212121/stepmania/src/Character.h
T

91 lines
2.7 KiB
C++
Raw Normal View History

2004-05-31 22:42:12 +00:00
/* Character - An persona that defines attacks for use in battle. */
#ifndef Character_H
#define Character_H
#include "GameConstantsAndTypes.h"
2005-08-15 15:12:52 +00:00
#include "RageTexturePreloader.h"
struct lua_State;
typedef lua_State Lua;
class Character
{
public:
Character();
2005-07-06 23:40:17 +00:00
~Character() { }
2006-01-22 01:00:06 +00:00
bool Load( RString sCharDir ); // return true if success
2006-01-22 01:00:06 +00:00
RString GetTakingABreakPath() const;
RString GetCardPath() const { return m_sCardPath; }
RString GetIconPath() const { return m_sIconPath; }
2006-01-22 01:00:06 +00:00
RString GetModelPath() const;
RString GetRestAnimationPath() const;
RString GetWarmUpAnimationPath() const;
RString GetDanceAnimationPath() const;
RString GetSongSelectIconPath() const;
RString GetStageIconPath() const;
2003-12-04 04:28:19 +00:00
bool Has2DElems();
2005-08-14 01:51:09 +00:00
bool IsDefaultCharacter() const
{
return m_sCharacterID.CompareNoCase("default") == 0;
}
void DemandGraphics();
void UndemandGraphics();
//
// Lua
//
2005-07-06 23:40:17 +00:00
void PushSelf( Lua *L );
2005-08-14 01:51:09 +00:00
// smart accessor
2006-01-22 01:00:06 +00:00
const RString &GetDisplayName() { return !m_sDisplayName.empty() ? m_sDisplayName : m_sCharacterID; }
2005-08-14 01:51:09 +00:00
2006-01-22 01:00:06 +00:00
RString m_sCharDir;
RString m_sCharacterID;
2005-08-14 01:51:09 +00:00
private:
2006-01-22 01:00:06 +00:00
RString m_sDisplayName;
RString m_sCardPath;
RString m_sIconPath;
2005-08-26 21:48:53 +00:00
2005-08-14 01:51:09 +00:00
public:
2003-12-04 04:28:19 +00:00
2003-06-30 18:08:27 +00:00
// All the stuff below will be filled in if this character is playable in Rave mode
bool m_bUsableInRave;
2006-01-22 01:00:06 +00:00
RString m_sAttacks[NUM_ATTACK_LEVELS][NUM_ATTACKS_PER_LEVEL];
2005-08-15 15:12:52 +00:00
RageTexturePreloader m_Preload;
int m_iPreloadRefcount;
};
#endif
2004-05-31 22:42:12 +00:00
/*
* (c) 2003 Chris Danford
* 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.
*/