The big NULL replacement party part 5.
Right. ' = NULL' would get a lot of these.
This commit is contained in:
+2
-2
@@ -542,7 +542,7 @@ StyledWriter::normalizeEOL( const std::string &text )
|
||||
// //////////////////////////////////////////////////////////////////
|
||||
|
||||
StyledStreamWriter::StyledStreamWriter( std::string indentation )
|
||||
: document_(NULL)
|
||||
: document_(nullptr)
|
||||
, rightMargin_( 74 )
|
||||
, indentation_( indentation )
|
||||
{
|
||||
@@ -559,7 +559,7 @@ StyledStreamWriter::write( std::ostream &out, const Value &root )
|
||||
writeValue( root );
|
||||
writeCommentAfterValueOnSameLine( root );
|
||||
*document_ << "\n";
|
||||
document_ = NULL; // Forget the stream, for safety.
|
||||
document_ = nullptr; // Forget the stream, for safety.
|
||||
}
|
||||
|
||||
|
||||
|
||||
+6
-6
@@ -86,7 +86,7 @@ void Actor::InitState()
|
||||
{
|
||||
StopTweening();
|
||||
|
||||
m_pTempState = NULL;
|
||||
m_pTempState = nullptr;
|
||||
|
||||
m_baseRotation = RageVector3( 0, 0, 0 );
|
||||
m_baseScale = RageVector3( 1, 1, 1 );
|
||||
@@ -161,7 +161,7 @@ Actor::Actor()
|
||||
|
||||
m_size = RageVector2( 1, 1 );
|
||||
InitState();
|
||||
m_pParent = NULL;
|
||||
m_pParent = nullptr;
|
||||
m_bFirstUpdate = true;
|
||||
}
|
||||
|
||||
@@ -176,7 +176,7 @@ Actor::Actor( const Actor &cpy ):
|
||||
{
|
||||
/* Don't copy an Actor in the middle of rendering. */
|
||||
ASSERT( cpy.m_pTempState == nullptr );
|
||||
m_pTempState = NULL;
|
||||
m_pTempState = nullptr;
|
||||
|
||||
#define CPY(x) x = cpy.x
|
||||
CPY( m_sName );
|
||||
@@ -569,7 +569,7 @@ void Actor::SetTextureRenderStates()
|
||||
void Actor::EndDraw()
|
||||
{
|
||||
DISPLAY->PopMatrix();
|
||||
m_pTempState = NULL;
|
||||
m_pTempState = nullptr;
|
||||
}
|
||||
|
||||
void Actor::UpdateTweening( float fDeltaTime )
|
||||
@@ -1298,7 +1298,7 @@ void Actor::SetParent( Actor *pParent )
|
||||
|
||||
Actor::TweenInfo::TweenInfo()
|
||||
{
|
||||
m_pTween = NULL;
|
||||
m_pTween = nullptr;
|
||||
}
|
||||
|
||||
Actor::TweenInfo::~TweenInfo()
|
||||
@@ -1308,7 +1308,7 @@ Actor::TweenInfo::~TweenInfo()
|
||||
|
||||
Actor::TweenInfo::TweenInfo( const TweenInfo &cpy )
|
||||
{
|
||||
m_pTween = NULL;
|
||||
m_pTween = nullptr;
|
||||
*this = cpy;
|
||||
}
|
||||
|
||||
|
||||
+4
-4
@@ -591,11 +591,11 @@ public:
|
||||
void PlayCommandNoRecurse( const Message &msg );
|
||||
|
||||
// Commands by reference
|
||||
virtual void RunCommands( const LuaReference& cmds, const LuaReference *pParamTable = NULL );
|
||||
void RunCommands( const apActorCommands& cmds, const LuaReference *pParamTable = NULL ) { this->RunCommands( *cmds, pParamTable ); } // convenience
|
||||
virtual void RunCommandsRecursively( const LuaReference& cmds, const LuaReference *pParamTable = NULL ) { RunCommands(cmds, pParamTable); }
|
||||
virtual void RunCommands( const LuaReference& cmds, const LuaReference *pParamTable = nullptr );
|
||||
void RunCommands( const apActorCommands& cmds, const LuaReference *pParamTable = nullptr ) { this->RunCommands( *cmds, pParamTable ); } // convenience
|
||||
virtual void RunCommandsRecursively( const LuaReference& cmds, const LuaReference *pParamTable = nullptr ) { RunCommands(cmds, pParamTable); }
|
||||
// If we're a leaf, then execute this command.
|
||||
virtual void RunCommandsOnLeaves( const LuaReference& cmds, const LuaReference *pParamTable = NULL ) { RunCommands(cmds, pParamTable); }
|
||||
virtual void RunCommandsOnLeaves( const LuaReference& cmds, const LuaReference *pParamTable = nullptr ) { RunCommands(cmds, pParamTable); }
|
||||
|
||||
// Messages
|
||||
virtual void HandleMessage( const Message &msg );
|
||||
|
||||
+8
-8
@@ -55,13 +55,13 @@ public:
|
||||
// Commands
|
||||
virtual void PushSelf( lua_State *L );
|
||||
void PushChildrenTable( lua_State *L );
|
||||
void PlayCommandOnChildren( const RString &sCommandName, const LuaReference *pParamTable = NULL );
|
||||
void PlayCommandOnLeaves( const RString &sCommandName, const LuaReference *pParamTable = NULL );
|
||||
void PlayCommandOnChildren( const RString &sCommandName, const LuaReference *pParamTable = nullptr );
|
||||
void PlayCommandOnLeaves( const RString &sCommandName, const LuaReference *pParamTable = nullptr );
|
||||
|
||||
virtual void RunCommandsRecursively( const LuaReference& cmds, const LuaReference *pParamTable = NULL );
|
||||
virtual void RunCommandsOnChildren( const LuaReference& cmds, const LuaReference *pParamTable = NULL ); /* but not on self */
|
||||
void RunCommandsOnChildren( const apActorCommands& cmds, const LuaReference *pParamTable = NULL ) { this->RunCommandsOnChildren( *cmds, pParamTable ); } // convenience
|
||||
virtual void RunCommandsOnLeaves( const LuaReference& cmds, const LuaReference *pParamTable = NULL ); /* but not on self */
|
||||
virtual void RunCommandsRecursively( const LuaReference& cmds, const LuaReference *pParamTable = nullptr );
|
||||
virtual void RunCommandsOnChildren( const LuaReference& cmds, const LuaReference *pParamTable = nullptr ); /* but not on self */
|
||||
void RunCommandsOnChildren( const apActorCommands& cmds, const LuaReference *pParamTable = nullptr ) { this->RunCommandsOnChildren( *cmds, pParamTable ); } // convenience
|
||||
virtual void RunCommandsOnLeaves( const LuaReference& cmds, const LuaReference *pParamTable = nullptr ); /* but not on self */
|
||||
|
||||
virtual void UpdateInternal( float fDeltaTime );
|
||||
virtual void BeginDraw();
|
||||
@@ -93,8 +93,8 @@ public:
|
||||
virtual float GetTweenTimeLeft() const;
|
||||
|
||||
virtual void HandleMessage( const Message &msg );
|
||||
virtual void RunCommands( const LuaReference& cmds, const LuaReference *pParamTable = NULL );
|
||||
void RunCommands( const apActorCommands& cmds, const LuaReference *pParamTable = NULL ) { this->RunCommands( *cmds, pParamTable ); } // convenience
|
||||
virtual void RunCommands( const LuaReference& cmds, const LuaReference *pParamTable = nullptr );
|
||||
void RunCommands( const apActorCommands& cmds, const LuaReference *pParamTable = nullptr ) { this->RunCommands( *cmds, pParamTable ); } // convenience
|
||||
|
||||
protected:
|
||||
void LoadChildrenFromNode( const XNode* pNode );
|
||||
|
||||
@@ -17,7 +17,7 @@ ActorFrameTexture::ActorFrameTexture()
|
||||
++i;
|
||||
m_sTextureName = ssprintf( ConvertI64FormatString("ActorFrameTexture %lli"), i );
|
||||
|
||||
m_pRenderTarget = NULL;
|
||||
m_pRenderTarget = nullptr;
|
||||
}
|
||||
|
||||
ActorFrameTexture::ActorFrameTexture( const ActorFrameTexture &cpy ):
|
||||
|
||||
@@ -35,7 +35,7 @@ private:
|
||||
EffectMode m_EffectMode;
|
||||
struct TextureUnitState
|
||||
{
|
||||
TextureUnitState(): m_pTexture(NULL), m_TextureMode(TextureMode_Modulate) {}
|
||||
TextureUnitState(): m_pTexture(nullptr), m_TextureMode(TextureMode_Modulate) {}
|
||||
RageTexture *m_pTexture;
|
||||
TextureMode m_TextureMode;
|
||||
};
|
||||
|
||||
+1
-1
@@ -6,7 +6,7 @@ REGISTER_ACTOR_CLASS( ActorProxy );
|
||||
|
||||
ActorProxy::ActorProxy()
|
||||
{
|
||||
m_pActorTarget = NULL;
|
||||
m_pActorTarget = nullptr;
|
||||
}
|
||||
|
||||
bool ActorProxy::EarlyAbortDraw() const
|
||||
|
||||
+2
-2
@@ -14,7 +14,7 @@
|
||||
|
||||
|
||||
// Actor registration
|
||||
static map<RString,CreateActorFn> *g_pmapRegistrees = NULL;
|
||||
static map<RString,CreateActorFn> *g_pmapRegistrees = nullptr;
|
||||
|
||||
static bool IsRegistered( const RString& sClassName )
|
||||
{
|
||||
@@ -158,7 +158,7 @@ namespace
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
XNode *pRet = NULL;
|
||||
XNode *pRet = nullptr;
|
||||
if( ActorUtil::LoadTableFromStackShowErrors(L) )
|
||||
pRet = XmlFileUtil::XNodeFromTable( L );
|
||||
|
||||
|
||||
+2
-2
@@ -108,8 +108,8 @@ namespace ActorUtil
|
||||
inline void LoadAllCommandsAndSetXYAndOnCommand( Actor* pActor, const RString &sMetricsGroup ) { if(pActor) LoadAllCommandsAndSetXYAndOnCommand( *pActor, sMetricsGroup ); }
|
||||
|
||||
// Return a Sprite, BitmapText, or Model depending on the file type
|
||||
Actor* LoadFromNode( const XNode* pNode, Actor *pParentActor = NULL );
|
||||
Actor* MakeActor( const RString &sPath, Actor *pParentActor = NULL );
|
||||
Actor* LoadFromNode( const XNode* pNode, Actor *pParentActor = nullptr );
|
||||
Actor* MakeActor( const RString &sPath, Actor *pParentActor = nullptr );
|
||||
RString GetSourcePath( const XNode *pNode );
|
||||
RString GetWhere( const XNode *pNode );
|
||||
bool GetAttrPath( const XNode *pNode, const RString &sName, RString &sOut );
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
#include "RageFile.h"
|
||||
#include <cstring>
|
||||
|
||||
AnnouncerManager* ANNOUNCER = NULL; // global object accessable from anywhere in the program
|
||||
AnnouncerManager* ANNOUNCER = nullptr; // global object accessable from anywhere in the program
|
||||
|
||||
|
||||
const RString EMPTY_ANNOUNCER_NAME = "Empty";
|
||||
|
||||
+2
-2
@@ -13,7 +13,7 @@ void AutoActor::Unload()
|
||||
AutoActor::AutoActor( const AutoActor &cpy )
|
||||
{
|
||||
if( cpy.m_pActor == nullptr )
|
||||
m_pActor = NULL;
|
||||
m_pActor = nullptr;
|
||||
else
|
||||
m_pActor = cpy.m_pActor->Copy();
|
||||
}
|
||||
@@ -23,7 +23,7 @@ AutoActor &AutoActor::operator=( const AutoActor &cpy )
|
||||
Unload();
|
||||
|
||||
if( cpy.m_pActor == nullptr )
|
||||
m_pActor = NULL;
|
||||
m_pActor = nullptr;
|
||||
else
|
||||
m_pActor = cpy.m_pActor->Copy();
|
||||
return *this;
|
||||
|
||||
+1
-1
@@ -12,7 +12,7 @@ class XNode;
|
||||
class AutoActor
|
||||
{
|
||||
public:
|
||||
AutoActor(): m_pActor(NULL) {}
|
||||
AutoActor(): m_pActor(nullptr) {}
|
||||
~AutoActor() { Unload(); }
|
||||
AutoActor( const AutoActor &cpy );
|
||||
AutoActor &operator =( const AutoActor &cpy );
|
||||
|
||||
@@ -122,9 +122,9 @@ void AutoKeysounds::LoadTracks( const Song *pSong, RageSoundReader *&pShared, Ra
|
||||
// two-track sound.
|
||||
//bool bTwoPlayers = GAMESTATE->GetNumPlayersEnabled() == 2;
|
||||
|
||||
pPlayer1 = NULL;
|
||||
pPlayer2 = NULL;
|
||||
pShared = NULL;
|
||||
pPlayer1 = nullptr;
|
||||
pPlayer2 = nullptr;
|
||||
pShared = nullptr;
|
||||
|
||||
vector<RString> vsMusicFile;
|
||||
const RString sMusicPath = pSong->GetMusicPath();
|
||||
|
||||
+9
-9
@@ -147,15 +147,15 @@ static RageColor GetBrightnessColor( float fBrightnessPercent )
|
||||
BackgroundImpl::BackgroundImpl()
|
||||
{
|
||||
m_bInitted = false;
|
||||
m_pDancingCharacters = NULL;
|
||||
m_pSong = NULL;
|
||||
m_pDancingCharacters = nullptr;
|
||||
m_pSong = nullptr;
|
||||
}
|
||||
|
||||
BackgroundImpl::Layer::Layer()
|
||||
{
|
||||
m_iCurBGChangeIndex = -1;
|
||||
m_pCurrentBGA = NULL;
|
||||
m_pFadingBGA = NULL;
|
||||
m_pCurrentBGA = nullptr;
|
||||
m_pFadingBGA = nullptr;
|
||||
}
|
||||
|
||||
void BackgroundImpl::Init()
|
||||
@@ -242,7 +242,7 @@ void BackgroundImpl::Unload()
|
||||
{
|
||||
FOREACH_BackgroundLayer( i )
|
||||
m_Layer[i].Unload();
|
||||
m_pSong = NULL;
|
||||
m_pSong = nullptr;
|
||||
m_fLastMusicSeconds = -9999;
|
||||
m_RandomBGAnimations.clear();
|
||||
}
|
||||
@@ -254,8 +254,8 @@ void BackgroundImpl::Layer::Unload()
|
||||
m_BGAnimations.clear();
|
||||
m_aBGChanges.clear();
|
||||
|
||||
m_pCurrentBGA = NULL;
|
||||
m_pFadingBGA = NULL;
|
||||
m_pCurrentBGA = nullptr;
|
||||
m_pFadingBGA = nullptr;
|
||||
m_iCurBGChangeIndex = -1;
|
||||
}
|
||||
|
||||
@@ -743,7 +743,7 @@ void BackgroundImpl::Layer::UpdateCurBGChange( const Song *pSong, float fLastMus
|
||||
|
||||
if( m_pFadingBGA == m_pCurrentBGA )
|
||||
{
|
||||
m_pFadingBGA = NULL;
|
||||
m_pFadingBGA = nullptr;
|
||||
//LOG->Trace( "bg didn't actually change. Ignoring." );
|
||||
}
|
||||
else
|
||||
@@ -779,7 +779,7 @@ void BackgroundImpl::Layer::UpdateCurBGChange( const Song *pSong, float fLastMus
|
||||
if( m_pFadingBGA )
|
||||
{
|
||||
if( m_pFadingBGA->GetTweenTimeLeft() == 0 )
|
||||
m_pFadingBGA = NULL;
|
||||
m_pFadingBGA = nullptr;
|
||||
}
|
||||
|
||||
/* This is unaffected by the music rate. */
|
||||
|
||||
+6
-6
@@ -248,13 +248,13 @@ public:
|
||||
static int ScaleToClipped( T* p, lua_State *L ) { p->ScaleToClipped(FArg(1),FArg(2)); return 0; }
|
||||
static int LoadFromSong( T* p, lua_State *L )
|
||||
{
|
||||
if( lua_isnil(L,1) ) { p->LoadFromSong( NULL ); }
|
||||
if( lua_isnil(L,1) ) { p->LoadFromSong(nullptr); }
|
||||
else { Song *pS = Luna<Song>::check(L,1); p->LoadFromSong( pS ); }
|
||||
return 0;
|
||||
}
|
||||
static int LoadFromCourse( T* p, lua_State *L )
|
||||
{
|
||||
if( lua_isnil(L,1) ) { p->LoadFromCourse( NULL ); }
|
||||
if( lua_isnil(L,1) ) { p->LoadFromCourse(nullptr); }
|
||||
else { Course *pC = Luna<Course>::check(L,1); p->LoadFromCourse( pC ); }
|
||||
return 0;
|
||||
}
|
||||
@@ -265,25 +265,25 @@ public:
|
||||
}
|
||||
static int LoadIconFromCharacter( T* p, lua_State *L )
|
||||
{
|
||||
if( lua_isnil(L,1) ) { p->LoadIconFromCharacter( NULL ); }
|
||||
if( lua_isnil(L,1) ) { p->LoadIconFromCharacter(nullptr); }
|
||||
else { Character *pC = Luna<Character>::check(L,1); p->LoadIconFromCharacter( pC ); }
|
||||
return 0;
|
||||
}
|
||||
static int LoadCardFromCharacter( T* p, lua_State *L )
|
||||
{
|
||||
if( lua_isnil(L,1) ) { p->LoadIconFromCharacter( NULL ); }
|
||||
if( lua_isnil(L,1) ) { p->LoadIconFromCharacter(nullptr); }
|
||||
else { Character *pC = Luna<Character>::check(L,1); p->LoadIconFromCharacter( pC ); }
|
||||
return 0;
|
||||
}
|
||||
static int LoadBannerFromUnlockEntry( T* p, lua_State *L )
|
||||
{
|
||||
if( lua_isnil(L,1) ) { p->LoadBannerFromUnlockEntry( NULL ); }
|
||||
if( lua_isnil(L,1) ) { p->LoadBannerFromUnlockEntry(nullptr); }
|
||||
else { UnlockEntry *pUE = Luna<UnlockEntry>::check(L,1); p->LoadBannerFromUnlockEntry( pUE ); }
|
||||
return 0;
|
||||
}
|
||||
static int LoadBackgroundFromUnlockEntry( T* p, lua_State *L )
|
||||
{
|
||||
if( lua_isnil(L,1) ) { p->LoadBackgroundFromUnlockEntry( NULL ); }
|
||||
if( lua_isnil(L,1) ) { p->LoadBackgroundFromUnlockEntry(nullptr); }
|
||||
else { UnlockEntry *pUE = Luna<UnlockEntry>::check(L,1); p->LoadBackgroundFromUnlockEntry( pUE ); }
|
||||
return 0;
|
||||
}
|
||||
|
||||
+5
-5
@@ -42,7 +42,7 @@ BitmapText::BitmapText()
|
||||
}
|
||||
iReloadCounter++;
|
||||
|
||||
m_pFont = NULL;
|
||||
m_pFont = nullptr;
|
||||
m_bUppercase = false;
|
||||
|
||||
m_bRainbowScroll = false;
|
||||
@@ -98,7 +98,7 @@ BitmapText & BitmapText::operator=(const BitmapText &cpy)
|
||||
if( cpy.m_pFont != nullptr )
|
||||
m_pFont = FONT->CopyFont( cpy.m_pFont );
|
||||
else
|
||||
m_pFont = NULL;
|
||||
m_pFont = nullptr;
|
||||
|
||||
return *this;
|
||||
}
|
||||
@@ -106,7 +106,7 @@ BitmapText & BitmapText::operator=(const BitmapText &cpy)
|
||||
BitmapText::BitmapText( const BitmapText &cpy ):
|
||||
Actor( cpy )
|
||||
{
|
||||
m_pFont = NULL;
|
||||
m_pFont = nullptr;
|
||||
|
||||
*this = cpy;
|
||||
}
|
||||
@@ -143,7 +143,7 @@ bool BitmapText::LoadFromFont( const RString& sFontFilePath )
|
||||
if( m_pFont )
|
||||
{
|
||||
FONT->UnloadFont( m_pFont );
|
||||
m_pFont = NULL;
|
||||
m_pFont = nullptr;
|
||||
}
|
||||
|
||||
m_pFont = FONT->LoadFont( sFontFilePath );
|
||||
@@ -162,7 +162,7 @@ bool BitmapText::LoadFromTextureAndChars( const RString& sTexturePath, const RSt
|
||||
if( m_pFont )
|
||||
{
|
||||
FONT->UnloadFont( m_pFont );
|
||||
m_pFont = NULL;
|
||||
m_pFont = nullptr;
|
||||
}
|
||||
|
||||
m_pFont = FONT->LoadFont( sTexturePath, sChars );
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
|
||||
#define CHARACTERS_DIR "/Characters/"
|
||||
|
||||
CharacterManager* CHARMAN = NULL; // global object accessable from anywhere in the program
|
||||
CharacterManager* CHARMAN = nullptr; // global object accessable from anywhere in the program
|
||||
|
||||
CharacterManager::CharacterManager()
|
||||
{
|
||||
|
||||
+4
-4
@@ -14,16 +14,16 @@ ComboGraph::ComboGraph()
|
||||
{
|
||||
DeleteChildrenWhenDone( true );
|
||||
|
||||
m_pNormalCombo = NULL;
|
||||
m_pMaxCombo = NULL;
|
||||
m_pComboNumber = NULL;
|
||||
m_pNormalCombo = nullptr;
|
||||
m_pMaxCombo = nullptr;
|
||||
m_pComboNumber = nullptr;
|
||||
}
|
||||
|
||||
void ComboGraph::Load( RString sMetricsGroup )
|
||||
{
|
||||
BODY_WIDTH.Load( sMetricsGroup, "BodyWidth" );
|
||||
|
||||
Actor *pActor = NULL;
|
||||
Actor *pActor = nullptr;
|
||||
|
||||
m_pBacking = ActorUtil::MakeActor( THEME->GetPathG(sMetricsGroup,"Backing") );
|
||||
m_pBacking->ZoomToWidth( BODY_WIDTH );
|
||||
|
||||
@@ -250,7 +250,7 @@ bool CourseLoaderCRS::LoadFromMsd( const RString &sPath, const MsdFile &msd, Cou
|
||||
vector<RString> bits;
|
||||
split( sSong, "/", bits );
|
||||
|
||||
Song *pSong = NULL;
|
||||
Song *pSong = nullptr;
|
||||
if( bits.size() == 2 )
|
||||
{
|
||||
new_entry.songCriteria.m_sGroupName = bits[0];
|
||||
|
||||
+3
-3
@@ -450,7 +450,7 @@ void EditCourseUtil::UpdateAndSetTrail()
|
||||
{
|
||||
ASSERT( GAMESTATE->m_pCurStyle != nullptr );
|
||||
StepsType st = GAMESTATE->m_pCurStyle->m_StepsType;
|
||||
Trail *pTrail = NULL;
|
||||
Trail *pTrail = nullptr;
|
||||
if( GAMESTATE->m_pCurCourse )
|
||||
pTrail = GAMESTATE->m_pCurCourse->GetTrailForceRegenCache( st );
|
||||
GAMESTATE->m_pCurTrail[PLAYER_1].Set( pTrail );
|
||||
@@ -458,7 +458,7 @@ void EditCourseUtil::UpdateAndSetTrail()
|
||||
|
||||
void EditCourseUtil::PrepareForPlay()
|
||||
{
|
||||
GAMESTATE->m_pCurSong.Set( NULL ); // CurSong will be set if we back out. Set it back to NULL so that ScreenStage won't show the last song.
|
||||
GAMESTATE->m_pCurSong.Set(nullptr); // CurSong will be set if we back out. Set it back to NULL so that ScreenStage won't show the last song.
|
||||
GAMESTATE->m_PlayMode.Set( PLAY_MODE_ENDLESS );
|
||||
GAMESTATE->m_bSideIsJoined[0] = true;
|
||||
|
||||
@@ -549,7 +549,7 @@ Course *CourseID::ToCourse() const
|
||||
if( sPath2.Left(1) != "/" )
|
||||
sPath2 = "/" + sPath2;
|
||||
|
||||
Course *pCourse = NULL;
|
||||
Course *pCourse = nullptr;
|
||||
if( m_Cache.Get(&pCourse) )
|
||||
return pCourse;
|
||||
if( pCourse == nullptr && !sPath2.empty() )
|
||||
|
||||
+1
-1
@@ -73,7 +73,7 @@ class CourseID
|
||||
{
|
||||
public:
|
||||
CourseID(): sPath(""), sFullTitle(""), m_Cache() { Unset(); }
|
||||
void Unset() { FromCourse(NULL); }
|
||||
void Unset() { FromCourse(nullptr); }
|
||||
void FromCourse( const Course *p );
|
||||
Course *ToCourse() const;
|
||||
const RString &GetPath() const { return sPath; }
|
||||
|
||||
+2
-2
@@ -543,7 +543,7 @@ ulg crc32(ulg crc, const uch *buf, size_t len)
|
||||
class TZip
|
||||
{
|
||||
public:
|
||||
TZip() : pfout(NULL),ooffset(0),oerr(false),writ(0),hasputcen(false),zfis(0),hfin(0)
|
||||
TZip() : pfout(nullptr),ooffset(0),oerr(false),writ(0),hasputcen(false),zfis(0),hfin(0)
|
||||
{
|
||||
}
|
||||
~TZip()
|
||||
@@ -717,7 +717,7 @@ ZRESULT TZip::set_times()
|
||||
|
||||
unsigned short dosdate,dostime;
|
||||
filetime2dosdatetime(*ptm,&dosdate,&dostime);
|
||||
times.atime = time(NULL);
|
||||
times.atime = time(nullptr);
|
||||
times.mtime = times.atime;
|
||||
times.ctime = times.atime;
|
||||
timestamp = (unsigned short)dostime | (((unsigned long)dosdate)<<16);
|
||||
|
||||
@@ -79,7 +79,7 @@ static const int KEY_LENGTH = 1024;
|
||||
*
|
||||
*/
|
||||
|
||||
static PRNGWrapper *g_pPRNG = NULL;
|
||||
static PRNGWrapper *g_pPRNG = nullptr;
|
||||
|
||||
|
||||
CryptManager::CryptManager()
|
||||
|
||||
+1
-1
@@ -58,7 +58,7 @@ bool DateTime::operator>( const DateTime& other ) const
|
||||
|
||||
DateTime DateTime::GetNowDateTime()
|
||||
{
|
||||
time_t now = time(NULL);
|
||||
time_t now = time(nullptr);
|
||||
tm tNow;
|
||||
localtime_r( &now, &tNow );
|
||||
DateTime dtNow;
|
||||
|
||||
@@ -45,7 +45,7 @@ void StepsDisplayList::LoadFromNode( const XNode* pNode )
|
||||
MOVE_COMMAND.Load( m_sName, "MoveCommand" );
|
||||
|
||||
m_Lines.resize( MAX_METERS );
|
||||
m_CurSong = NULL;
|
||||
m_CurSong = nullptr;
|
||||
|
||||
FOREACH_ENUM( PlayerNumber, pn )
|
||||
{
|
||||
|
||||
@@ -56,7 +56,7 @@ private:
|
||||
{
|
||||
Row()
|
||||
{
|
||||
m_Steps = NULL;
|
||||
m_Steps = nullptr;
|
||||
m_dc = Difficulty_Invalid;
|
||||
m_fY = 0;
|
||||
m_bHidden = false;
|
||||
|
||||
+1
-1
@@ -429,7 +429,7 @@ void EditMenu::OnRowValueChanged( EditMenuRow row )
|
||||
{
|
||||
Steps *pSteps = SongUtil::GetStepsByDifficulty( GetSelectedSong(), GetSelectedStepsType(), dc );
|
||||
if( pSteps && UNLOCKMAN->StepsIsLocked( GetSelectedSong(), pSteps ) )
|
||||
pSteps = NULL;
|
||||
pSteps = nullptr;
|
||||
|
||||
EditMode mode = EDIT_MODE.GetValue();
|
||||
switch( EDIT_MODE.GetValue() )
|
||||
|
||||
@@ -272,25 +272,25 @@ public:
|
||||
static int ScaleToClipped( T* p, lua_State *L ) { p->ScaleToClipped(FArg(1),FArg(2)); return 0; }
|
||||
static int LoadFromSong( T* p, lua_State *L )
|
||||
{
|
||||
if( lua_isnil(L,1) ) { p->LoadFromSong( NULL ); }
|
||||
if( lua_isnil(L,1) ) { p->LoadFromSong(nullptr); }
|
||||
else { Song *pS = Luna<Song>::check(L,1); p->LoadFromSong( pS ); }
|
||||
return 0;
|
||||
}
|
||||
static int LoadFromCourse( T* p, lua_State *L )
|
||||
{
|
||||
if( lua_isnil(L,1) ) { p->LoadFromCourse( NULL ); }
|
||||
if( lua_isnil(L,1) ) { p->LoadFromCourse(nullptr); }
|
||||
else { Course *pC = Luna<Course>::check(L,1); p->LoadFromCourse( pC ); }
|
||||
return 0;
|
||||
}
|
||||
static int LoadIconFromCharacter( T* p, lua_State *L )
|
||||
{
|
||||
if( lua_isnil(L,1) ) { p->LoadIconFromCharacter( NULL ); }
|
||||
if( lua_isnil(L,1) ) { p->LoadIconFromCharacter(nullptr); }
|
||||
else { Character *pC = Luna<Character>::check(L,1); p->LoadIconFromCharacter( pC ); }
|
||||
return 0;
|
||||
}
|
||||
static int LoadCardFromCharacter( T* p, lua_State *L )
|
||||
{
|
||||
if( lua_isnil(L,1) ) { p->LoadIconFromCharacter( NULL ); }
|
||||
if( lua_isnil(L,1) ) { p->LoadIconFromCharacter(nullptr); }
|
||||
else { Character *pC = Luna<Character>::check(L,1); p->LoadIconFromCharacter( pC ); }
|
||||
return 0;
|
||||
}
|
||||
|
||||
+4
-4
@@ -190,12 +190,12 @@ FontPage::~FontPage()
|
||||
if( m_FontPageTextures.m_pTextureMain != nullptr )
|
||||
{
|
||||
TEXTUREMAN->UnloadTexture( m_FontPageTextures.m_pTextureMain );
|
||||
m_FontPageTextures.m_pTextureMain = NULL;
|
||||
m_FontPageTextures.m_pTextureMain = nullptr;
|
||||
}
|
||||
if( m_FontPageTextures.m_pTextureStroke != nullptr )
|
||||
{
|
||||
TEXTUREMAN->UnloadTexture( m_FontPageTextures.m_pTextureStroke );
|
||||
m_FontPageTextures.m_pTextureStroke = NULL;
|
||||
m_FontPageTextures.m_pTextureStroke = nullptr;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -221,7 +221,7 @@ int Font::GetLineHeightInSourcePixels( const wstring &szLine ) const
|
||||
}
|
||||
|
||||
|
||||
Font::Font(): m_iRefCount(1), path(""), m_apPages(), m_pDefault(NULL),
|
||||
Font::Font(): m_iRefCount(1), path(""), m_apPages(), m_pDefault(nullptr),
|
||||
m_iCharToGlyph(), m_bRightToLeft(false),
|
||||
// strokes aren't shown by default, hence the Color.
|
||||
m_DefaultStrokeColor(RageColor(0,0,0,0)), m_sChars("") {}
|
||||
@@ -238,7 +238,7 @@ void Font::Unload()
|
||||
m_apPages.clear();
|
||||
|
||||
m_iCharToGlyph.clear();
|
||||
m_pDefault = NULL;
|
||||
m_pDefault = nullptr;
|
||||
|
||||
/* Don't clear the refcount. We've unloaded, but that doesn't mean things
|
||||
* aren't still pointing to us. */
|
||||
|
||||
+2
-2
@@ -23,7 +23,7 @@ struct FontPageTextures
|
||||
RageTexture *m_pTextureStroke;
|
||||
|
||||
/** @brief Set up the initial textures. */
|
||||
FontPageTextures(): m_pTextureMain(NULL), m_pTextureStroke(NULL) {}
|
||||
FontPageTextures(): m_pTextureMain(nullptr), m_pTextureStroke(nullptr) {}
|
||||
};
|
||||
|
||||
/** @brief The components of a glyph (not technically a character). */
|
||||
@@ -50,7 +50,7 @@ struct glyph
|
||||
RectF m_TexRect;
|
||||
|
||||
/** @brief Set up the glyph with default values. */
|
||||
glyph() : m_pPage(NULL), m_FontPageTextures(), m_iHadvance(0),
|
||||
glyph() : m_pPage(nullptr), m_FontPageTextures(), m_iHadvance(0),
|
||||
m_fWidth(0), m_fHeight(0), m_fHshift(0), m_TexRect() {}
|
||||
};
|
||||
|
||||
|
||||
+1
-1
@@ -20,7 +20,7 @@ void Foreground::Unload()
|
||||
m_BGAnimations.clear();
|
||||
m_SubActors.clear();
|
||||
m_fLastMusicSeconds = -9999;
|
||||
m_pSong = NULL;
|
||||
m_pSong = nullptr;
|
||||
}
|
||||
|
||||
void Foreground::LoadFromSong( const Song *pSong )
|
||||
|
||||
+6
-6
@@ -36,7 +36,7 @@ void GameCommand::Init()
|
||||
m_bInvalid = true;
|
||||
m_iIndex = -1;
|
||||
m_MultiPlayer = MultiPlayer_Invalid;
|
||||
m_pStyle = NULL;
|
||||
m_pStyle = nullptr;
|
||||
m_pm = PlayMode_Invalid;
|
||||
m_dc = Difficulty_Invalid;
|
||||
m_CourseDifficulty = Difficulty_Invalid;
|
||||
@@ -45,11 +45,11 @@ void GameCommand::Init()
|
||||
m_sAnnouncer = "";
|
||||
m_sScreen = "";
|
||||
m_LuaFunction.Unset();
|
||||
m_pSong = NULL;
|
||||
m_pSteps = NULL;
|
||||
m_pCourse = NULL;
|
||||
m_pTrail = NULL;
|
||||
m_pCharacter = NULL;
|
||||
m_pSong = nullptr;
|
||||
m_pSteps = nullptr;
|
||||
m_pCourse = nullptr;
|
||||
m_pTrail = nullptr;
|
||||
m_pCharacter = nullptr;
|
||||
m_SortOrder = SortOrder_Invalid;
|
||||
m_sSoundPath = "";
|
||||
m_vsScreensToPrepare.clear();
|
||||
|
||||
+4
-4
@@ -25,13 +25,13 @@ public:
|
||||
GameCommand(): m_Commands(), m_sName(""), m_sText(""),
|
||||
m_bInvalid(true), m_sInvalidReason(""),
|
||||
m_iIndex(-1), m_MultiPlayer(MultiPlayer_Invalid),
|
||||
m_pStyle(NULL), m_pm(PlayMode_Invalid),
|
||||
m_pStyle(nullptr), m_pm(PlayMode_Invalid),
|
||||
m_dc(Difficulty_Invalid),
|
||||
m_CourseDifficulty(Difficulty_Invalid),
|
||||
m_sAnnouncer(""), m_sPreferredModifiers(""),
|
||||
m_sStageModifiers(""), m_sScreen(""), m_LuaFunction(),
|
||||
m_pSong(NULL), m_pSteps(NULL), m_pCourse(NULL),
|
||||
m_pTrail(NULL), m_pCharacter(NULL), m_SetEnv(),
|
||||
m_pSong(nullptr), m_pSteps(nullptr), m_pCourse(nullptr),
|
||||
m_pTrail(nullptr), m_pCharacter(nullptr), m_SetEnv(),
|
||||
m_sSongGroup(""), m_SortOrder(SortOrder_Invalid),
|
||||
m_sSoundPath(""), m_vsScreensToPrepare(), m_iWeightPounds(-1),
|
||||
m_iGoalCalories(-1), m_GoalType(GoalType_Invalid),
|
||||
@@ -56,7 +56,7 @@ public:
|
||||
|
||||
bool DescribesCurrentMode( PlayerNumber pn ) const;
|
||||
bool DescribesCurrentModeForAllPlayers() const;
|
||||
bool IsPlayable( RString *why = NULL ) const;
|
||||
bool IsPlayable( RString *why = nullptr ) const;
|
||||
bool IsZero() const;
|
||||
|
||||
/* If true, Apply() will apply m_sScreen. If false, it won't, and you need
|
||||
|
||||
+1
-1
@@ -234,7 +234,7 @@ private:
|
||||
enum State { RENDERING_IDLE, RENDERING_START, RENDERING_ACTIVE, RENDERING_END };
|
||||
State m_State;
|
||||
};
|
||||
static ConcurrentRenderer *g_pConcurrentRenderer = NULL;
|
||||
static ConcurrentRenderer *g_pConcurrentRenderer = nullptr;
|
||||
|
||||
ConcurrentRenderer::ConcurrentRenderer():
|
||||
m_Event("ConcurrentRenderer")
|
||||
|
||||
+2
-2
@@ -12,7 +12,7 @@
|
||||
#include "Style.h"
|
||||
|
||||
|
||||
GameManager* GAMEMAN = NULL; // global and accessable from anywhere in our program
|
||||
GameManager* GAMEMAN = nullptr; // global and accessable from anywhere in our program
|
||||
|
||||
enum
|
||||
{
|
||||
@@ -3028,7 +3028,7 @@ void GameManager::GetEnabledGames( vector<const Game*>& aGamesOut )
|
||||
|
||||
const Game* GameManager::GetDefaultGame()
|
||||
{
|
||||
const Game *pDefault = NULL;
|
||||
const Game *pDefault = nullptr;
|
||||
if( pDefault == nullptr )
|
||||
{
|
||||
for( size_t i=0; pDefault == nullptr && i < ARRAYLEN(g_Games); ++i )
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
#include "SongUtil.h"
|
||||
#include "LuaManager.h"
|
||||
|
||||
GameSoundManager *SOUND = NULL;
|
||||
GameSoundManager *SOUND = nullptr;
|
||||
|
||||
/*
|
||||
* When playing music, automatically search for an SM file for timing data. If one is
|
||||
|
||||
@@ -21,7 +21,7 @@ public:
|
||||
{
|
||||
PlayMusicParams()
|
||||
{
|
||||
pTiming = NULL;
|
||||
pTiming = nullptr;
|
||||
bForceLoop = false;
|
||||
fStartSecond = 0;
|
||||
fLengthSeconds = -1;
|
||||
@@ -44,7 +44,7 @@ public:
|
||||
void PlayMusic( PlayMusicParams params, PlayMusicParams FallbackMusicParams = PlayMusicParams() );
|
||||
void PlayMusic(
|
||||
RString sFile,
|
||||
const TimingData *pTiming = NULL,
|
||||
const TimingData *pTiming = nullptr,
|
||||
bool force_loop = false,
|
||||
float start_sec = 0,
|
||||
float length_sec = -1,
|
||||
|
||||
+18
-18
@@ -41,7 +41,7 @@
|
||||
#include <ctime>
|
||||
#include <set>
|
||||
|
||||
GameState* GAMESTATE = NULL; // global and accessable from anywhere in our program
|
||||
GameState* GAMESTATE = nullptr; // global and accessable from anywhere in our program
|
||||
|
||||
#define NAME_BLACKLIST_FILE "/Data/NamesBlacklist.txt"
|
||||
|
||||
@@ -75,7 +75,7 @@ struct GameStateImpl
|
||||
m_Subscriber.SubscribeToMessage( "RefreshCreditText" );
|
||||
}
|
||||
};
|
||||
static GameStateImpl *g_pImpl = NULL;
|
||||
static GameStateImpl *g_pImpl = nullptr;
|
||||
|
||||
ThemeMetric<bool> ALLOW_LATE_JOIN("GameState","AllowLateJoin");
|
||||
ThemeMetric<bool> USE_NAME_BLACKLIST("GameState","UseNameBlacklist");
|
||||
@@ -106,7 +106,7 @@ static Preference<Premium> g_Premium( "Premium", Premium_DoubleFor1Credit );
|
||||
Preference<bool> GameState::m_bAutoJoin( "AutoJoin", false );
|
||||
|
||||
GameState::GameState() :
|
||||
processedTiming( NULL ),
|
||||
processedTiming(nullptr),
|
||||
m_pCurGame( Message_CurrentGameChanged ),
|
||||
m_pCurStyle( Message_CurrentStyleChanged ),
|
||||
m_PlayMode( Message_PlayModeChanged ),
|
||||
@@ -133,9 +133,9 @@ GameState::GameState() :
|
||||
{
|
||||
g_pImpl = new GameStateImpl;
|
||||
|
||||
SetCurrentStyle( NULL );
|
||||
SetCurrentStyle(nullptr);
|
||||
|
||||
m_pCurGame.Set( NULL );
|
||||
m_pCurGame.Set(nullptr);
|
||||
m_timeGameStarted.SetZero();
|
||||
m_bDemonstrationOrJukebox = false;
|
||||
|
||||
@@ -254,8 +254,8 @@ void GameState::ResetPlayer( PlayerNumber pn )
|
||||
m_PreferredCourseDifficulty[pn].Set( Difficulty_Medium );
|
||||
m_iPlayerStageTokens[pn] = 0;
|
||||
m_iAwardedExtraStages[pn] = 0;
|
||||
m_pCurSteps[pn].Set( NULL );
|
||||
m_pCurTrail[pn].Set( NULL );
|
||||
m_pCurSteps[pn].Set(nullptr);
|
||||
m_pCurTrail[pn].Set(nullptr);
|
||||
m_pPlayerState[pn]->Reset();
|
||||
PROFILEMAN->UnloadProfile( pn );
|
||||
ResetPlayerOptions(pn);
|
||||
@@ -278,7 +278,7 @@ void GameState::Reset()
|
||||
ASSERT( THEME != nullptr );
|
||||
|
||||
m_timeGameStarted.SetZero();
|
||||
SetCurrentStyle( NULL );
|
||||
SetCurrentStyle(nullptr);
|
||||
FOREACH_MultiPlayer( p )
|
||||
m_MultiPlayerStatus[p] = MultiPlayerStatus_NotJoined;
|
||||
FOREACH_PlayerNumber( pn )
|
||||
@@ -307,9 +307,9 @@ void GameState::Reset()
|
||||
m_iStageSeed = rand();
|
||||
|
||||
m_pCurSong.Set( GetDefaultSong() );
|
||||
m_pPreferredSong = NULL;
|
||||
m_pCurCourse.Set( NULL );
|
||||
m_pPreferredCourse = NULL;
|
||||
m_pPreferredSong = nullptr;
|
||||
m_pCurCourse.Set(nullptr);
|
||||
m_pPreferredCourse = nullptr;
|
||||
|
||||
FOREACH_MultiPlayer( p )
|
||||
m_pMultiPlayerState[p]->Reset();
|
||||
@@ -343,7 +343,7 @@ void GameState::Reset()
|
||||
LIGHTSMAN->SetLightsMode( LIGHTSMODE_ATTRACT );
|
||||
|
||||
m_stEdit.Set( StepsType_Invalid );
|
||||
m_pEditSourceSteps.Set( NULL );
|
||||
m_pEditSourceSteps.Set(nullptr);
|
||||
m_stEditSource.Set( StepsType_Invalid );
|
||||
m_iEditCourseEntryIndex.Set( -1 );
|
||||
m_sEditLocalProfileID.Set( "" );
|
||||
@@ -610,7 +610,7 @@ int GameState::GetNumStagesForCurrentSongAndStepsOrCourse() const
|
||||
int numSidesJoined = GetNumSidesJoined();
|
||||
if( pStyle == nullptr )
|
||||
{
|
||||
const Steps *pSteps = NULL;
|
||||
const Steps *pSteps = nullptr;
|
||||
if( this->GetMasterPlayerNumber() != PlayerNumber_Invalid )
|
||||
pSteps = m_pCurSteps[this->GetMasterPlayerNumber()];
|
||||
// Don't call GetFirstCompatibleStyle if numSidesJoined == 0.
|
||||
@@ -2169,7 +2169,7 @@ public:
|
||||
static int GetCurrentSong( T* p, lua_State *L ) { if(p->m_pCurSong) p->m_pCurSong->PushSelf(L); else lua_pushnil(L); return 1; }
|
||||
static int SetCurrentSong( T* p, lua_State *L )
|
||||
{
|
||||
if( lua_isnil(L,1) ) { p->m_pCurSong.Set( NULL ); }
|
||||
if( lua_isnil(L,1) ) { p->m_pCurSong.Set(nullptr); }
|
||||
else { Song *pS = Luna<Song>::check( L, 1, true ); p->m_pCurSong.Set( pS ); }
|
||||
return 0;
|
||||
}
|
||||
@@ -2184,7 +2184,7 @@ public:
|
||||
static int SetCurrentSteps( T* p, lua_State *L )
|
||||
{
|
||||
PlayerNumber pn = Enum::Check<PlayerNumber>(L, 1);
|
||||
if( lua_isnil(L,2) ) { p->m_pCurSteps[pn].Set( NULL ); }
|
||||
if( lua_isnil(L,2) ) { p->m_pCurSteps[pn].Set(nullptr); }
|
||||
else { Steps *pS = Luna<Steps>::check(L,2); p->m_pCurSteps[pn].Set( pS ); }
|
||||
ASSERT(p->m_pCurSteps[pn]->m_StepsType == p->m_pCurStyle->m_StepsType);
|
||||
|
||||
@@ -2195,7 +2195,7 @@ public:
|
||||
static int GetCurrentCourse( T* p, lua_State *L ) { if(p->m_pCurCourse) p->m_pCurCourse->PushSelf(L); else lua_pushnil(L); return 1; }
|
||||
static int SetCurrentCourse( T* p, lua_State *L )
|
||||
{
|
||||
if( lua_isnil(L,1) ) { p->m_pCurCourse.Set( NULL ); }
|
||||
if( lua_isnil(L,1) ) { p->m_pCurCourse.Set(nullptr); }
|
||||
else { Course *pC = Luna<Course>::check(L,1); p->m_pCurCourse.Set( pC ); }
|
||||
return 0;
|
||||
}
|
||||
@@ -2210,7 +2210,7 @@ public:
|
||||
static int SetCurrentTrail( T* p, lua_State *L )
|
||||
{
|
||||
PlayerNumber pn = Enum::Check<PlayerNumber>(L, 1);
|
||||
if( lua_isnil(L,2) ) { p->m_pCurTrail[pn].Set( NULL ); }
|
||||
if( lua_isnil(L,2) ) { p->m_pCurTrail[pn].Set(nullptr); }
|
||||
else { Trail *pS = Luna<Trail>::check(L,2); p->m_pCurTrail[pn].Set( pS ); }
|
||||
MESSAGEMAN->Broadcast( (MessageID)(Message_CurrentTrailP1Changed+pn) );
|
||||
return 0;
|
||||
@@ -2218,7 +2218,7 @@ public:
|
||||
static int GetPreferredSong( T* p, lua_State *L ) { if(p->m_pPreferredSong) p->m_pPreferredSong->PushSelf(L); else lua_pushnil(L); return 1; }
|
||||
static int SetPreferredSong( T* p, lua_State *L )
|
||||
{
|
||||
if( lua_isnil(L,1) ) { p->m_pPreferredSong = NULL; }
|
||||
if( lua_isnil(L,1) ) { p->m_pPreferredSong = nullptr; }
|
||||
else { Song *pS = Luna<Song>::check(L,1); p->m_pPreferredSong = pS; }
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -126,7 +126,7 @@ public:
|
||||
~GraphBody()
|
||||
{
|
||||
TEXTUREMAN->UnloadTexture( m_pTexture );
|
||||
m_pTexture = NULL;
|
||||
m_pTexture = nullptr;
|
||||
}
|
||||
|
||||
void DrawPrimitives()
|
||||
@@ -150,8 +150,8 @@ public:
|
||||
|
||||
GraphDisplay::GraphDisplay()
|
||||
{
|
||||
m_pGraphLine = NULL;
|
||||
m_pGraphBody = NULL;
|
||||
m_pGraphLine = nullptr;
|
||||
m_pGraphBody = nullptr;
|
||||
}
|
||||
|
||||
GraphDisplay::~GraphDisplay()
|
||||
|
||||
+1
-1
@@ -82,7 +82,7 @@ namespace
|
||||
* this won't cause timing problems, because the event timestamp is preserved. */
|
||||
static Preference<float> g_fInputDebounceTime( "InputDebounceTime", 0 );
|
||||
|
||||
InputFilter* INPUTFILTER = NULL; // global and accessable from anywhere in our program
|
||||
InputFilter* INPUTFILTER = nullptr; // global and accessable from anywhere in our program
|
||||
|
||||
static const float TIME_BEFORE_REPEATS = 0.375f;
|
||||
|
||||
|
||||
+3
-3
@@ -61,9 +61,9 @@ public:
|
||||
void RepeatStopKey( const DeviceInput &di );
|
||||
|
||||
// If aButtonState is NULL, use the last reported state.
|
||||
bool IsBeingPressed( const DeviceInput &di, const DeviceInputList *pButtonState = NULL ) const;
|
||||
float GetSecsHeld( const DeviceInput &di, const DeviceInputList *pButtonState = NULL ) const;
|
||||
float GetLevel( const DeviceInput &di, const DeviceInputList *pButtonState = NULL ) const;
|
||||
bool IsBeingPressed( const DeviceInput &di, const DeviceInputList *pButtonState = nullptr ) const;
|
||||
float GetSecsHeld( const DeviceInput &di, const DeviceInputList *pButtonState = nullptr ) const;
|
||||
float GetLevel( const DeviceInput &di, const DeviceInputList *pButtonState = nullptr ) const;
|
||||
RString GetButtonComment( const DeviceInput &di ) const;
|
||||
|
||||
void GetInputEvents( vector<InputEvent> &aEventOut );
|
||||
|
||||
+2
-2
@@ -26,12 +26,12 @@ namespace
|
||||
PlayerNumber g_JoinControllers;
|
||||
};
|
||||
|
||||
InputMapper* INPUTMAPPER = NULL; // global and accessable from anywhere in our program
|
||||
InputMapper* INPUTMAPPER = nullptr; // global and accessable from anywhere in our program
|
||||
|
||||
InputMapper::InputMapper()
|
||||
{
|
||||
g_JoinControllers = PLAYER_INVALID;
|
||||
m_pInputScheme = NULL;
|
||||
m_pInputScheme = nullptr;
|
||||
}
|
||||
|
||||
InputMapper::~InputMapper()
|
||||
|
||||
+1
-1
@@ -173,7 +173,7 @@ public:
|
||||
float GetSecsHeld( const GameInput &GameI, MultiPlayer mp = MultiPlayer_Invalid ) const;
|
||||
float GetSecsHeld( GameButton MenuI, PlayerNumber pn ) const;
|
||||
|
||||
bool IsBeingPressed( const GameInput &GameI, MultiPlayer mp = MultiPlayer_Invalid, const DeviceInputList *pButtonState = NULL ) const;
|
||||
bool IsBeingPressed( const GameInput &GameI, MultiPlayer mp = MultiPlayer_Invalid, const DeviceInputList *pButtonState = nullptr ) const;
|
||||
bool IsBeingPressed( GameButton MenuI, PlayerNumber pn ) const;
|
||||
|
||||
void ResetKeyRepeat( const GameInput &GameI );
|
||||
|
||||
+2
-2
@@ -6,7 +6,7 @@
|
||||
|
||||
#include "InputMapper.h"
|
||||
|
||||
InputQueue* INPUTQUEUE = NULL; // global and accessable from anywhere in our program
|
||||
InputQueue* INPUTQUEUE = nullptr; // global and accessable from anywhere in our program
|
||||
|
||||
const unsigned MAX_INPUT_QUEUE_LENGTH = 32;
|
||||
|
||||
@@ -95,7 +95,7 @@ bool InputQueueCode::EnteredCode( GameController controller ) const
|
||||
int iMinSearchIndexUsed = iQueueIndex;
|
||||
for( int b=0; b<(int) Press.m_aButtonsToPress.size(); ++b )
|
||||
{
|
||||
const InputEventPlus *pIEP = NULL;
|
||||
const InputEventPlus *pIEP = nullptr;
|
||||
int iQueueSearchIndex = iQueueIndex;
|
||||
for( ; iQueueSearchIndex>=0; --iQueueSearchIndex ) // iterate newest to oldest
|
||||
{
|
||||
|
||||
+1
-1
@@ -14,7 +14,7 @@ public:
|
||||
InputQueue();
|
||||
|
||||
void RememberInput( const InputEventPlus &gi );
|
||||
bool WasPressedRecently( GameController c, const GameButton button, const RageTimer &OldestTimeAllowed, InputEventPlus *pIEP = NULL );
|
||||
bool WasPressedRecently( GameController c, const GameButton button, const RageTimer &OldestTimeAllowed, InputEventPlus *pIEP = nullptr );
|
||||
const vector<InputEventPlus> &GetQueue( GameController c ) const { return m_aQueue[c]; }
|
||||
void ClearQueue( GameController c );
|
||||
|
||||
|
||||
@@ -29,7 +29,7 @@ LifeMeterBar::LifeMeterBar()
|
||||
EXTRA_STAGE_LIFE_DIFFICULTY.Load ("LifeMeterBar","ExtraStageLifeDifficulty");
|
||||
m_fLifePercentChange.Load( "LifeMeterBar", LIFE_PERCENT_CHANGE_NAME, NUM_ScoreEvent );
|
||||
|
||||
m_pPlayerState = NULL;
|
||||
m_pPlayerState = nullptr;
|
||||
|
||||
SongOptions::DrainType dtype = GAMESTATE->m_SongOptions.GetStage().m_DrainType;
|
||||
switch( dtype )
|
||||
|
||||
@@ -48,7 +48,7 @@ LifeMeterTime::LifeMeterTime()
|
||||
{
|
||||
m_fLifeTotalGainedSeconds = 0;
|
||||
m_fLifeTotalLostSeconds = 0;
|
||||
m_pStream = NULL;
|
||||
m_pStream = nullptr;
|
||||
}
|
||||
|
||||
LifeMeterTime::~LifeMeterTime()
|
||||
|
||||
@@ -94,7 +94,7 @@ static void GetUsedGameInputs( vector<GameInput> &vGameInputsOut )
|
||||
vGameInputsOut.push_back( input );
|
||||
}
|
||||
|
||||
LightsManager* LIGHTSMAN = NULL; // global and accessable from anywhere in our program
|
||||
LightsManager* LIGHTSMAN = nullptr; // global and accessable from anywhere in our program
|
||||
|
||||
LightsManager::LightsManager()
|
||||
{
|
||||
|
||||
@@ -39,7 +39,7 @@ LocalizedString::LocalizedString( const RString& sGroup, const RString& sName )
|
||||
|
||||
m_sGroup = sGroup;
|
||||
m_sName = sName;
|
||||
m_pImpl = NULL;
|
||||
m_pImpl = nullptr;
|
||||
|
||||
CreateImpl();
|
||||
}
|
||||
|
||||
+4
-4
@@ -16,7 +16,7 @@
|
||||
#include <cassert>
|
||||
#include <map>
|
||||
|
||||
LuaManager *LUA = NULL;
|
||||
LuaManager *LUA = nullptr;
|
||||
struct Impl
|
||||
{
|
||||
Impl(): g_pLock("Lua") {}
|
||||
@@ -25,7 +25,7 @@ struct Impl
|
||||
|
||||
RageMutex g_pLock;
|
||||
};
|
||||
static Impl *pImpl = NULL;
|
||||
static Impl *pImpl = nullptr;
|
||||
|
||||
#if defined(_MSC_VER)
|
||||
/* "interaction between '_setjmp' and C++ object destruction is non-portable"
|
||||
@@ -226,7 +226,7 @@ static int LuaPanic( lua_State *L )
|
||||
}
|
||||
|
||||
// Actor registration
|
||||
static vector<RegisterWithLuaFn> *g_vRegisterActorTypes = NULL;
|
||||
static vector<RegisterWithLuaFn> *g_vRegisterActorTypes = nullptr;
|
||||
|
||||
void LuaManager::Register( RegisterWithLuaFn pfn )
|
||||
{
|
||||
@@ -315,7 +315,7 @@ void LuaManager::Release( Lua *&p )
|
||||
|
||||
if( bDoUnlock )
|
||||
pImpl->g_pLock.Unlock();
|
||||
p = NULL;
|
||||
p = nullptr;
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
#include "arch/MemoryCard/MemoryCardDriver_Null.h"
|
||||
#include "LuaManager.h"
|
||||
|
||||
MemoryCardManager* MEMCARDMAN = NULL; // global and accessable from anywhere in our program
|
||||
MemoryCardManager* MEMCARDMAN = nullptr; // global and accessable from anywhere in our program
|
||||
|
||||
static void MemoryCardOsMountPointInit( size_t /*PlayerNumber*/ i, RString &sNameOut, RString &defaultValueOut )
|
||||
{
|
||||
@@ -253,7 +253,7 @@ bool ThreadedMemoryCardWorker::Unmount( const UsbStorageDevice *pDevice )
|
||||
return true;
|
||||
}
|
||||
|
||||
static ThreadedMemoryCardWorker *g_pWorker = NULL;
|
||||
static ThreadedMemoryCardWorker *g_pWorker = nullptr;
|
||||
|
||||
MemoryCardManager::MemoryCardManager()
|
||||
{
|
||||
|
||||
+1
-1
@@ -19,7 +19,7 @@ MenuTimer::MenuTimer()
|
||||
m_fStallSecondsLeft = 0;
|
||||
m_bPaused = false;
|
||||
m_bSilent = false;
|
||||
WARNING_COMMAND = NULL;
|
||||
WARNING_COMMAND = nullptr;
|
||||
}
|
||||
|
||||
MenuTimer::~MenuTimer()
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
#include <set>
|
||||
#include <map>
|
||||
|
||||
MessageManager* MESSAGEMAN = NULL; // global and accessable from anywhere in our program
|
||||
MessageManager* MESSAGEMAN = nullptr; // global and accessable from anywhere in our program
|
||||
|
||||
|
||||
static const char *MessageIDNames[] = {
|
||||
|
||||
@@ -242,7 +242,7 @@ private:
|
||||
MessageID mSendWhenChanged;
|
||||
T *val;
|
||||
public:
|
||||
explicit BroadcastOnChangePtr( MessageID m ) { mSendWhenChanged = m; val = NULL; }
|
||||
explicit BroadcastOnChangePtr( MessageID m ) { mSendWhenChanged = m; val = nullptr; }
|
||||
T* Get() const { return val; }
|
||||
void Set( T* t ) { val = t; if(MESSAGEMAN) MESSAGEMAN->Broadcast( MessageIDToString(mSendWhenChanged) ); }
|
||||
/* This is only intended to be used for setting temporary values; always
|
||||
|
||||
+7
-7
@@ -24,13 +24,13 @@ Model::Model()
|
||||
m_bTextureWrapping = true;
|
||||
SetUseZBuffer( true );
|
||||
SetCullMode( CULL_BACK );
|
||||
m_pGeometry = NULL;
|
||||
m_pCurAnimation = NULL;
|
||||
m_pGeometry = nullptr;
|
||||
m_pCurAnimation = nullptr;
|
||||
m_fDefaultAnimationRate = 1;
|
||||
m_fCurAnimationRate = 1;
|
||||
m_bLoop = true;
|
||||
m_bDrawCelShaded = false;
|
||||
m_pTempGeometry = NULL;
|
||||
m_pTempGeometry = nullptr;
|
||||
}
|
||||
|
||||
Model::~Model()
|
||||
@@ -43,12 +43,12 @@ void Model::Clear()
|
||||
if( m_pGeometry )
|
||||
{
|
||||
MODELMAN->UnloadModel( m_pGeometry );
|
||||
m_pGeometry = NULL;
|
||||
m_pGeometry = nullptr;
|
||||
}
|
||||
m_vpBones.clear();
|
||||
m_Materials.clear();
|
||||
m_mapNameToAnimation.clear();
|
||||
m_pCurAnimation = NULL;
|
||||
m_pCurAnimation = nullptr;
|
||||
|
||||
if( m_pTempGeometry )
|
||||
DISPLAY->DeleteCompiledGeometry( m_pTempGeometry );
|
||||
@@ -607,7 +607,7 @@ void Model::SetBones( const msAnimation* pAnimation, float fFrame, vector<myBone
|
||||
}
|
||||
|
||||
// search for the adjacent position keys
|
||||
const msPositionKey *pLastPositionKey = NULL, *pThisPositionKey = NULL;
|
||||
const msPositionKey *pLastPositionKey = nullptr, *pThisPositionKey = nullptr;
|
||||
for( size_t j = 0; j < pBone->PositionKeys.size(); ++j )
|
||||
{
|
||||
const msPositionKey *pPositionKey = &pBone->PositionKeys[j];
|
||||
@@ -631,7 +631,7 @@ void Model::SetBones( const msAnimation* pAnimation, float fFrame, vector<myBone
|
||||
vPos = pLastPositionKey->Position;
|
||||
|
||||
// search for the adjacent rotation keys
|
||||
const msRotationKey *pLastRotationKey = NULL, *pThisRotationKey = NULL;
|
||||
const msRotationKey *pLastRotationKey = nullptr, *pThisRotationKey = nullptr;
|
||||
for( size_t j = 0; j < pBone->RotationKeys.size(); ++j )
|
||||
{
|
||||
const msRotationKey *pRotationKey = &pBone->RotationKeys[j];
|
||||
|
||||
+4
-4
@@ -187,7 +187,7 @@ void MusicWheel::BeginScreen()
|
||||
if( GAMESTATE->m_pCurSong != nullptr &&
|
||||
GameState::GetNumStagesMultiplierForSong( GAMESTATE->m_pCurSong ) > GAMESTATE->GetSmallestNumStagesLeftForAnyHumanPlayer() )
|
||||
{
|
||||
GAMESTATE->m_pCurSong.Set( NULL );
|
||||
GAMESTATE->m_pCurSong.Set(nullptr);
|
||||
}
|
||||
|
||||
/* Invalidate current Steps if it can't be played
|
||||
@@ -201,7 +201,7 @@ void MusicWheel::BeginScreen()
|
||||
SongUtil::GetPlayableSteps( GAMESTATE->m_pCurSong, vpPossibleSteps );
|
||||
bool bStepsIsPossible = find( vpPossibleSteps.begin(), vpPossibleSteps.end(), GAMESTATE->m_pCurSteps[p] ) == vpPossibleSteps.end();
|
||||
if( !bStepsIsPossible )
|
||||
GAMESTATE->m_pCurSteps[p].Set( NULL );
|
||||
GAMESTATE->m_pCurSteps[p].Set(nullptr);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -910,7 +910,7 @@ void MusicWheel::FilterWheelItemDatas(vector<MusicWheelItemData *> &aUnFilteredD
|
||||
|
||||
const int iMaxStagesForSong = GAMESTATE->GetSmallestNumStagesLeftForAnyHumanPlayer();
|
||||
|
||||
Song *pExtraStageSong = NULL;
|
||||
Song *pExtraStageSong = nullptr;
|
||||
if( GAMESTATE->IsAnExtraStage() )
|
||||
{
|
||||
Steps *pSteps;
|
||||
@@ -1342,7 +1342,7 @@ void MusicWheel::SetOpenSection( RString group )
|
||||
if ( REMIND_WHEEL_POSITIONS && HIDE_INACTIVE_SECTIONS )
|
||||
m_viWheelPositions.resize( SONGMAN->GetNumSongGroups() );
|
||||
|
||||
const WheelItemBaseData *old = NULL;
|
||||
const WheelItemBaseData *old = nullptr;
|
||||
if( !m_CurWheelItemData.empty() )
|
||||
old = GetCurWheelItemData(m_iSelection);
|
||||
|
||||
|
||||
@@ -75,7 +75,7 @@ MusicWheelItem::MusicWheelItem( RString sType ):
|
||||
|
||||
FOREACH_ENUM( MusicWheelItemType, i )
|
||||
{
|
||||
m_pText[i] = NULL;
|
||||
m_pText[i] = nullptr;
|
||||
|
||||
// Don't init text for Type_Song. It uses a TextBanner.
|
||||
if( i == MusicWheelItemType_Song )
|
||||
@@ -147,7 +147,7 @@ MusicWheelItem::MusicWheelItem( const MusicWheelItem &cpy ):
|
||||
{
|
||||
if( cpy.m_pText[i] == nullptr )
|
||||
{
|
||||
m_pText[i] = NULL;
|
||||
m_pText[i] = nullptr;
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -345,7 +345,7 @@ void MusicWheelItem::RefreshGrades()
|
||||
|
||||
Profile *pProfile = PROFILEMAN->GetProfile(ps);
|
||||
|
||||
HighScoreList *pHSL = NULL;
|
||||
HighScoreList *pHSL = nullptr;
|
||||
if( PROFILEMAN->IsPersistentProfile(ps) && dc != Difficulty_Invalid )
|
||||
{
|
||||
if( pWID->m_pSong )
|
||||
|
||||
@@ -62,7 +62,7 @@ private:
|
||||
|
||||
struct MusicWheelItemData : public WheelItemBaseData
|
||||
{
|
||||
MusicWheelItemData() : m_pCourse(NULL), m_pSong(NULL), m_Flags(),
|
||||
MusicWheelItemData() : m_pCourse(nullptr), m_pSong(nullptr), m_Flags(),
|
||||
m_iSectionCount(0), m_sLabel(""), m_pAction() { }
|
||||
MusicWheelItemData( WheelItemDataType type, Song* pSong,
|
||||
RString sSectionName, Course* pCourse,
|
||||
|
||||
@@ -68,8 +68,8 @@ int NetworkSyncManager::GetSMOnlineSalt()
|
||||
static LocalizedString INITIALIZING_CLIENT_NETWORK ( "NetworkSyncManager", "Initializing Client Network..." );
|
||||
NetworkSyncManager::NetworkSyncManager( LoadingWindow *ld )
|
||||
{
|
||||
LANserver = NULL; //So we know if it has been created yet
|
||||
BroadcastReception = NULL;
|
||||
LANserver = nullptr; //So we know if it has been created yet
|
||||
BroadcastReception = nullptr;
|
||||
|
||||
ld->SetText( INITIALIZING_CLIENT_NETWORK );
|
||||
NetPlayerClient = new EzSockets;
|
||||
|
||||
@@ -109,7 +109,7 @@ public:
|
||||
class NetworkSyncManager
|
||||
{
|
||||
public:
|
||||
NetworkSyncManager( LoadingWindow *ld = NULL );
|
||||
NetworkSyncManager( LoadingWindow *ld = nullptr );
|
||||
~NetworkSyncManager();
|
||||
|
||||
// If "useSMserver" then send score to server
|
||||
|
||||
+1
-1
@@ -255,7 +255,7 @@ public:
|
||||
void GetTracksHeldAtRow( int row, set<int>& addTo );
|
||||
int GetNumTracksHeldAtRow( int row );
|
||||
|
||||
bool IsHoldNoteAtRow( int iTrack, int iRow, int *pHeadRow = NULL ) const;
|
||||
bool IsHoldNoteAtRow( int iTrack, int iRow, int *pHeadRow = nullptr ) const;
|
||||
bool IsHoldHeadOrBodyAtRow( int iTrack, int iRow, int *pHeadRow ) const;
|
||||
|
||||
// statistics
|
||||
|
||||
+4
-4
@@ -119,7 +119,7 @@ struct NoteResource
|
||||
NoteResource( const NoteSkinAndPath &nsap ): m_nsap(nsap)
|
||||
{
|
||||
m_iRefCount = 0;
|
||||
m_pActor = NULL;
|
||||
m_pActor = nullptr;
|
||||
}
|
||||
|
||||
~NoteResource()
|
||||
@@ -173,7 +173,7 @@ static void DeleteNoteResource( NoteResource *pRes )
|
||||
|
||||
NoteColorActor::NoteColorActor()
|
||||
{
|
||||
m_p = NULL;
|
||||
m_p = nullptr;
|
||||
}
|
||||
|
||||
NoteColorActor::~NoteColorActor()
|
||||
@@ -197,7 +197,7 @@ Actor *NoteColorActor::Get()
|
||||
|
||||
NoteColorSprite::NoteColorSprite()
|
||||
{
|
||||
m_p = NULL;
|
||||
m_p = nullptr;
|
||||
}
|
||||
|
||||
NoteColorSprite::~NoteColorSprite()
|
||||
@@ -750,7 +750,7 @@ void NoteDisplay::DrawTap(const TapNote& tn, int iCol, float fBeat,
|
||||
float fDrawDistanceBeforeTargetsPixels,
|
||||
float fFadeInPercentOfDrawFar)
|
||||
{
|
||||
Actor* pActor = NULL;
|
||||
Actor* pActor = nullptr;
|
||||
NotePart part = NotePart_Tap;
|
||||
/*
|
||||
if( tn.source == TapNote::addition )
|
||||
|
||||
+3
-3
@@ -38,8 +38,8 @@ static ThemeMetric1D<RString> ROUTINE_NOTESKIN( "NoteField", RoutineNoteSkinName
|
||||
|
||||
NoteField::NoteField()
|
||||
{
|
||||
m_pNoteData = NULL;
|
||||
m_pCurDisplay = NULL;
|
||||
m_pNoteData = nullptr;
|
||||
m_pCurDisplay = nullptr;
|
||||
|
||||
m_textMeasureNumber.LoadFromFont( THEME->GetPathF("NoteField","MeasureNumber") );
|
||||
m_textMeasureNumber.SetZoom( 1.0f );
|
||||
@@ -77,7 +77,7 @@ void NoteField::Unload()
|
||||
it != m_NoteDisplays.end(); ++it )
|
||||
delete it->second;
|
||||
m_NoteDisplays.clear();
|
||||
m_pCurDisplay = NULL;
|
||||
m_pCurDisplay = nullptr;
|
||||
memset( m_pDisplays, 0, sizeof(m_pDisplays) );
|
||||
}
|
||||
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
#include "SpecialFiles.h"
|
||||
|
||||
/** @brief Have the NoteSkinManager available throughout the program. */
|
||||
NoteSkinManager* NOTESKIN = NULL;
|
||||
NoteSkinManager* NOTESKIN = nullptr;
|
||||
|
||||
const RString GAME_COMMON_NOTESKIN_NAME = "common";
|
||||
const RString GAME_BASE_NOTESKIN_NAME = "default";
|
||||
@@ -47,7 +47,7 @@ namespace
|
||||
|
||||
NoteSkinManager::NoteSkinManager()
|
||||
{
|
||||
m_pCurGame = NULL;
|
||||
m_pCurGame = nullptr;
|
||||
m_PlayerNumber = PlayerNumber_Invalid;
|
||||
m_GameController = GameController_Invalid;
|
||||
|
||||
|
||||
@@ -25,11 +25,12 @@ public:
|
||||
|
||||
void SetCurrentNoteSkin( const RString &sNoteSkin ) { m_sCurrentNoteSkin = sNoteSkin; }
|
||||
const RString &GetCurrentNoteSkin() { return m_sCurrentNoteSkin; }
|
||||
|
||||
void SetPlayerNumber( PlayerNumber pn ) { m_PlayerNumber = pn; }
|
||||
void SetGameController( GameController gc ) { m_GameController = gc; }
|
||||
RString GetPath( const RString &sButtonName, const RString &sElement );
|
||||
bool PushActorTemplate( Lua *L, const RString &sButton, const RString &sElement, bool bSpriteOnly );
|
||||
Actor *LoadActor( const RString &sButton, const RString &sElement, Actor *pParent = NULL, bool bSpriteOnly = false );
|
||||
Actor *LoadActor( const RString &sButton, const RString &sElement, Actor *pParent = nullptr, bool bSpriteOnly = false );
|
||||
|
||||
RString GetMetric( const RString &sButtonName, const RString &sValue );
|
||||
int GetMetricI( const RString &sButtonName, const RString &sValueName );
|
||||
|
||||
@@ -969,7 +969,7 @@ bool SMLoader::LoadEditFromBuffer( const RString &sBuffer, const RString &sEditF
|
||||
|
||||
bool SMLoader::LoadEditFromMsd( const MsdFile &msd, const RString &sEditFilePath, ProfileSlot slot, bool bAddStepsToSong )
|
||||
{
|
||||
Song* pSong = NULL;
|
||||
Song* pSong = nullptr;
|
||||
|
||||
for( unsigned i=0; i<msd.GetNumValues(); i++ )
|
||||
{
|
||||
|
||||
@@ -162,7 +162,7 @@ bool SMALoader::LoadFromSimfile( const RString &sPath, Song &out, bool bFromCach
|
||||
out.m_sSongFileName = sPath;
|
||||
|
||||
int state = SMA_GETTING_SONG_INFO;
|
||||
Steps* pNewNotes = NULL;
|
||||
Steps* pNewNotes = nullptr;
|
||||
int iRowsPerBeat = -1; // Start with an invalid value: needed for checking.
|
||||
|
||||
for( unsigned i=0; i<msd.GetNumValues(); i++ )
|
||||
|
||||
@@ -250,7 +250,7 @@ bool SSCLoader::LoadFromSimfile( const RString &sPath, Song &out, bool bFromCach
|
||||
|
||||
int state = GETTING_SONG_INFO;
|
||||
const unsigned values = msd.GetNumValues();
|
||||
Steps* pNewNotes = NULL;
|
||||
Steps* pNewNotes = nullptr;
|
||||
TimingData stepsTiming;
|
||||
bool bHasOwnTiming = false;
|
||||
|
||||
@@ -836,8 +836,8 @@ bool SSCLoader::LoadEditFromMsd(const MsdFile &msd,
|
||||
ProfileSlot slot,
|
||||
bool bAddStepsToSong )
|
||||
{
|
||||
Song* pSong = NULL;
|
||||
Steps* pNewNotes = NULL;
|
||||
Song* pSong = nullptr;
|
||||
Steps* pNewNotes = nullptr;
|
||||
bool bSSCFormat = false;
|
||||
bool bHasOwnTiming = false;
|
||||
TimingData stepsTiming;
|
||||
|
||||
+2
-2
@@ -33,9 +33,9 @@ RString MOD_ICON_X_NAME( size_t p ) { return ssprintf("ModIconP%dX",int(p+1));
|
||||
OptionRow::OptionRow( const OptionRowType *pSource )
|
||||
{
|
||||
m_pParentType = pSource;
|
||||
m_pHand = NULL;
|
||||
m_pHand = nullptr;
|
||||
|
||||
m_textTitle = NULL;
|
||||
m_textTitle = nullptr;
|
||||
ZERO( m_ModIcons );
|
||||
|
||||
Clear();
|
||||
|
||||
@@ -510,8 +510,8 @@ public:
|
||||
void Init()
|
||||
{
|
||||
OptionRowHandler::Init();
|
||||
m_ppStepsToFill = NULL;
|
||||
m_pDifficultyToFill = NULL;
|
||||
m_ppStepsToFill = nullptr;
|
||||
m_pDifficultyToFill = nullptr;
|
||||
m_vSteps.clear();
|
||||
m_vDifficulties.clear();
|
||||
}
|
||||
@@ -569,7 +569,7 @@ public:
|
||||
|
||||
if( sParam == "EditSteps" )
|
||||
{
|
||||
m_vSteps.push_back( NULL );
|
||||
m_vSteps.push_back(nullptr);
|
||||
m_vDifficulties.push_back( Difficulty_Edit );
|
||||
}
|
||||
|
||||
@@ -596,7 +596,7 @@ public:
|
||||
else
|
||||
{
|
||||
m_vDifficulties.push_back( Difficulty_Edit );
|
||||
m_vSteps.push_back( NULL );
|
||||
m_vSteps.push_back(nullptr);
|
||||
m_Def.m_vsChoices.push_back( "none" );
|
||||
}
|
||||
|
||||
@@ -672,7 +672,7 @@ class OptionRowHandlerListCharacters: public OptionRowHandlerList
|
||||
{
|
||||
m_Def.m_vsChoices.push_back( OFF );
|
||||
GameCommand mc;
|
||||
mc.m_pCharacter = NULL;
|
||||
mc.m_pCharacter = nullptr;
|
||||
m_aListEntries.push_back( mc );
|
||||
}
|
||||
|
||||
@@ -1100,7 +1100,7 @@ public:
|
||||
void Init()
|
||||
{
|
||||
OptionRowHandler::Init();
|
||||
m_pOpt = NULL;
|
||||
m_pOpt = nullptr;
|
||||
}
|
||||
virtual void LoadInternal( const Commands &cmds )
|
||||
{
|
||||
@@ -1180,7 +1180,7 @@ public:
|
||||
void Init()
|
||||
{
|
||||
OptionRowHandler::Init();
|
||||
m_pstToFill = NULL;
|
||||
m_pstToFill = nullptr;
|
||||
m_vStepsTypesToShow.clear();
|
||||
}
|
||||
|
||||
@@ -1320,7 +1320,7 @@ public:
|
||||
|
||||
OptionRowHandler* OptionRowHandlerUtil::Make( const Commands &cmds )
|
||||
{
|
||||
OptionRowHandler* pHand = NULL;
|
||||
OptionRowHandler* pHand = nullptr;
|
||||
|
||||
if( cmds.v.size() == 0 )
|
||||
return nullptr;
|
||||
@@ -1362,7 +1362,7 @@ OptionRowHandler* OptionRowHandlerUtil::Make( const Commands &cmds )
|
||||
|
||||
OptionRowHandler* OptionRowHandlerUtil::MakeNull()
|
||||
{
|
||||
OptionRowHandler* pHand = NULL;
|
||||
OptionRowHandler* pHand = nullptr;
|
||||
Commands cmds;
|
||||
MAKE( OptionRowHandlerNull )
|
||||
return pHand;
|
||||
|
||||
+2
-2
@@ -172,7 +172,7 @@ void OptionListRow::PositionCursor( Actor *pCursor, int iSelection )
|
||||
OptionsList::OptionsList()
|
||||
{
|
||||
m_iCurrentRow = 0;
|
||||
m_pLinked = NULL;
|
||||
m_pLinked = nullptr;
|
||||
}
|
||||
|
||||
OptionsList::~OptionsList()
|
||||
@@ -265,7 +265,7 @@ void OptionsList::Open()
|
||||
Push( TOP_MENU );
|
||||
|
||||
this->FinishTweening();
|
||||
m_Row[!m_iCurrentRow].SetFromHandler( NULL );
|
||||
m_Row[!m_iCurrentRow].SetFromHandler(nullptr);
|
||||
this->PlayCommand( "TweenOn" );
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -179,7 +179,7 @@ void PaneDisplay::GetPaneTextAndLevel( PaneCategory c, RString & sTextOut, float
|
||||
|
||||
{
|
||||
RadarValues rv;
|
||||
HighScoreList *pHSL = NULL;
|
||||
HighScoreList *pHSL = nullptr;
|
||||
ProfileSlot slot = ProfileSlot_Machine;
|
||||
switch( c )
|
||||
{
|
||||
|
||||
@@ -16,8 +16,8 @@ REGISTER_ACTOR_CLASS( PercentageDisplay );
|
||||
|
||||
PercentageDisplay::PercentageDisplay()
|
||||
{
|
||||
m_pPlayerState = NULL;
|
||||
m_pPlayerStageStats = NULL;
|
||||
m_pPlayerState = nullptr;
|
||||
m_pPlayerStageStats = nullptr;
|
||||
|
||||
m_Last = -1;
|
||||
m_LastMax = -1;
|
||||
|
||||
+20
-20
@@ -223,27 +223,27 @@ Player::Player( NoteData &nd, bool bVisibleParts ) : m_NoteData(nd)
|
||||
{
|
||||
m_bLoaded = false;
|
||||
|
||||
m_pPlayerState = NULL;
|
||||
m_pPlayerStageStats = NULL;
|
||||
m_pPlayerState = nullptr;
|
||||
m_pPlayerStageStats = nullptr;
|
||||
m_fNoteFieldHeight = 0;
|
||||
|
||||
m_pLifeMeter = NULL;
|
||||
m_pCombinedLifeMeter = NULL;
|
||||
m_pScoreDisplay = NULL;
|
||||
m_pSecondaryScoreDisplay = NULL;
|
||||
m_pPrimaryScoreKeeper = NULL;
|
||||
m_pSecondaryScoreKeeper = NULL;
|
||||
m_pInventory = NULL;
|
||||
m_pIterNeedsTapJudging = NULL;
|
||||
m_pIterNeedsHoldJudging = NULL;
|
||||
m_pIterUncrossedRows = NULL;
|
||||
m_pIterUnjudgedRows = NULL;
|
||||
m_pIterUnjudgedMineRows = NULL;
|
||||
m_pLifeMeter = nullptr;
|
||||
m_pCombinedLifeMeter = nullptr;
|
||||
m_pScoreDisplay = nullptr;
|
||||
m_pSecondaryScoreDisplay = nullptr;
|
||||
m_pPrimaryScoreKeeper = nullptr;
|
||||
m_pSecondaryScoreKeeper = nullptr;
|
||||
m_pInventory = nullptr;
|
||||
m_pIterNeedsTapJudging = nullptr;
|
||||
m_pIterNeedsHoldJudging = nullptr;
|
||||
m_pIterUncrossedRows = nullptr;
|
||||
m_pIterUnjudgedRows = nullptr;
|
||||
m_pIterUnjudgedMineRows = nullptr;
|
||||
|
||||
m_bPaused = false;
|
||||
m_bDelay = false;
|
||||
|
||||
m_pAttackDisplay = NULL;
|
||||
m_pAttackDisplay = nullptr;
|
||||
if( bVisibleParts )
|
||||
{
|
||||
m_pAttackDisplay = new AttackDisplay;
|
||||
@@ -252,7 +252,7 @@ Player::Player( NoteData &nd, bool bVisibleParts ) : m_NoteData(nd)
|
||||
|
||||
PlayerAI::InitFromDisk();
|
||||
|
||||
m_pNoteField = NULL;
|
||||
m_pNoteField = nullptr;
|
||||
if( bVisibleParts )
|
||||
{
|
||||
m_pNoteField = new NoteField;
|
||||
@@ -504,14 +504,14 @@ void Player::Init(
|
||||
}
|
||||
else
|
||||
{
|
||||
m_pActorWithComboPosition = NULL;
|
||||
m_pActorWithJudgmentPosition = NULL;
|
||||
m_pActorWithComboPosition = nullptr;
|
||||
m_pActorWithJudgmentPosition = nullptr;
|
||||
}
|
||||
|
||||
// Load HoldJudgments
|
||||
m_vpHoldJudgment.resize( GAMESTATE->GetCurrentStyle()->m_iColsPerPlayer );
|
||||
for( int i = 0; i < GAMESTATE->GetCurrentStyle()->m_iColsPerPlayer; ++i )
|
||||
m_vpHoldJudgment[i] = NULL;
|
||||
m_vpHoldJudgment[i] = nullptr;
|
||||
|
||||
if( HasVisibleParts() )
|
||||
{
|
||||
@@ -2209,7 +2209,7 @@ void Player::StepStrumHopo( int col, int row, const RageTimer &tm, bool bHeld, b
|
||||
const float fSecondsFromExact = fabsf( fNoteOffset );
|
||||
|
||||
TapNote tnDummy = TAP_ORIGINAL_TAP;
|
||||
TapNote *pTN = NULL;
|
||||
TapNote *pTN = nullptr;
|
||||
switch( pbt )
|
||||
{
|
||||
DEFAULT_FAIL(pbt);
|
||||
|
||||
+1
-1
@@ -48,7 +48,7 @@ template <class T>
|
||||
class Preference : public IPreference
|
||||
{
|
||||
public:
|
||||
Preference( const RString& sName, const T& defaultValue, void (pfnValidate)(T& val) = NULL ):
|
||||
Preference( const RString& sName, const T& defaultValue, void (pfnValidate)(T& val) = nullptr ):
|
||||
IPreference( sName ),
|
||||
m_currentValue( defaultValue ),
|
||||
m_defaultValue( defaultValue ),
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
//STATIC_INI_PATH = "Data/Static.ini"; // overlay on the 2 above, can't be overridden
|
||||
//TYPE_TXT_FILE = "Data/Type.txt";
|
||||
|
||||
PrefsManager* PREFSMAN = NULL; // global and accessable from anywhere in our program
|
||||
PrefsManager* PREFSMAN = nullptr; // global and accessable from anywhere in our program
|
||||
|
||||
static const char *MusicWheelUsesSectionsNames[] = {
|
||||
"Never",
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
#include "CharacterManager.h"
|
||||
|
||||
|
||||
ProfileManager* PROFILEMAN = NULL; // global and accessable from anywhere in our program
|
||||
ProfileManager* PROFILEMAN = nullptr; // global and accessable from anywhere in our program
|
||||
|
||||
static void DefaultLocalProfileIDInit( size_t /*PlayerNumber*/ i, RString &sNameOut, RString &defaultValueOut )
|
||||
{
|
||||
|
||||
@@ -36,9 +36,9 @@ RString GetErrorString( HRESULT hr )
|
||||
}
|
||||
|
||||
// Globals
|
||||
HMODULE g_D3D9_Module = NULL;
|
||||
LPDIRECT3D9 g_pd3d = NULL;
|
||||
LPDIRECT3DDEVICE9 g_pd3dDevice = NULL;
|
||||
HMODULE g_D3D9_Module = nullptr;
|
||||
LPDIRECT3D9 g_pd3d = nullptr;
|
||||
LPDIRECT3DDEVICE9 g_pd3dDevice = nullptr;
|
||||
D3DCAPS9 g_DeviceCaps;
|
||||
D3DDISPLAYMODE g_DesktopMode;
|
||||
D3DPRESENT_PARAMETERS g_d3dpp;
|
||||
@@ -252,13 +252,13 @@ RageDisplay_D3D::~RageDisplay_D3D()
|
||||
if( g_pd3dDevice )
|
||||
{
|
||||
g_pd3dDevice->Release();
|
||||
g_pd3dDevice = NULL;
|
||||
g_pd3dDevice = nullptr;
|
||||
}
|
||||
|
||||
if( g_pd3d )
|
||||
{
|
||||
g_pd3d->Release();
|
||||
g_pd3d = NULL;
|
||||
g_pd3d = nullptr;
|
||||
}
|
||||
|
||||
/* Even after we call Release(), D3D may still affect our window. It seems
|
||||
@@ -267,7 +267,7 @@ RageDisplay_D3D::~RageDisplay_D3D()
|
||||
if( g_D3D9_Module )
|
||||
{
|
||||
FreeLibrary( g_D3D9_Module );
|
||||
g_D3D9_Module = NULL;
|
||||
g_D3D9_Module = nullptr;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -621,7 +621,7 @@ bool RageDisplay_D3D::SupportsThreadedRendering()
|
||||
|
||||
RageSurface* RageDisplay_D3D::CreateScreenshot()
|
||||
{
|
||||
RageSurface * result = NULL;
|
||||
RageSurface * result = nullptr;
|
||||
|
||||
// Get the back buffer.
|
||||
IDirect3DSurface9* pSurface;
|
||||
@@ -702,7 +702,7 @@ void RageDisplay_D3D::SendCurrentMatrices()
|
||||
g_pd3dDevice->SetTextureStageState( tu, D3DTSS_TEXTURETRANSFORMFLAGS, D3DTTFF_COUNT2 );
|
||||
|
||||
// If no texture is set for this texture unit, don't bother setting it up.
|
||||
IDirect3DBaseTexture9* pTexture = NULL;
|
||||
IDirect3DBaseTexture9* pTexture = nullptr;
|
||||
g_pd3dDevice->GetTexture( tu, &pTexture );
|
||||
if( pTexture == nullptr )
|
||||
continue;
|
||||
|
||||
@@ -220,7 +220,7 @@ RageDisplay_GLES2::RageDisplay_GLES2()
|
||||
FixLittleEndian();
|
||||
// RageDisplay_GLES2_Helpers::Init();
|
||||
|
||||
g_pWind = NULL;
|
||||
g_pWind = nullptr;
|
||||
}
|
||||
|
||||
RString
|
||||
|
||||
@@ -64,7 +64,7 @@ static const GLenum RageSpriteVertexFormat = GL_T2F_C4F_N3F_V3F;
|
||||
static GLhandleARB g_bTextureMatrixShader = 0;
|
||||
|
||||
static map<unsigned, RenderTarget *> g_mapRenderTargets;
|
||||
static RenderTarget *g_pCurrentRenderTarget = NULL;
|
||||
static RenderTarget *g_pCurrentRenderTarget = nullptr;
|
||||
|
||||
static LowLevelWindow *g_pWind;
|
||||
|
||||
@@ -262,7 +262,7 @@ RageDisplay_Legacy::RageDisplay_Legacy()
|
||||
FixLittleEndian();
|
||||
RageDisplay_Legacy_Helpers::Init();
|
||||
|
||||
g_pWind = NULL;
|
||||
g_pWind = nullptr;
|
||||
g_bTextureMatrixShader = 0;
|
||||
}
|
||||
|
||||
@@ -650,8 +650,8 @@ static void CheckPalettedTextures()
|
||||
|
||||
/* If 8-bit palettes don't work, disable them entirely--don't trust 4-bit
|
||||
* palettes if it can't even get 8-bit ones right. */
|
||||
glColorTableEXT = NULL;
|
||||
glGetColorTableParameterivEXT = NULL;
|
||||
glColorTableEXT = nullptr;
|
||||
glGetColorTableParameterivEXT = nullptr;
|
||||
LOG->Info( "Paletted textures disabled: %s.", sError.c_str() );
|
||||
}
|
||||
|
||||
@@ -2252,7 +2252,7 @@ public:
|
||||
if (bChanged)
|
||||
DISPLAY->UpdateTexture( m_iTexHandle, pSurface, 0, 0, pSurface->w, pSurface->h );
|
||||
|
||||
pSurface->pixels = NULL;
|
||||
pSurface->pixels = nullptr;
|
||||
|
||||
m_iTexHandle = 0;
|
||||
glBindBufferARB( GL_PIXEL_UNPACK_BUFFER_ARB, 0 );
|
||||
@@ -2482,7 +2482,7 @@ void RageDisplay_Legacy::SetRenderTarget( unsigned iTexture, bool bPreserveTextu
|
||||
|
||||
if (g_pCurrentRenderTarget)
|
||||
g_pCurrentRenderTarget->FinishRenderingTo();
|
||||
g_pCurrentRenderTarget = NULL;
|
||||
g_pCurrentRenderTarget = nullptr;
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -15,7 +15,7 @@ using CrashHandler::DebugBreak;
|
||||
#endif
|
||||
|
||||
static uint64_t g_HandlerThreadID = RageThread::GetInvalidThreadID();
|
||||
static void (*g_CleanupHandler)( const RString &sError ) = NULL;
|
||||
static void (*g_CleanupHandler)( const RString &sError ) = nullptr;
|
||||
void RageException::SetCleanupHandler( void (*pHandler)(const RString &sError) )
|
||||
{
|
||||
g_HandlerThreadID = RageThread::GetCurrentThreadID();
|
||||
|
||||
+2
-2
@@ -13,7 +13,7 @@
|
||||
|
||||
RageFile::RageFile()
|
||||
{
|
||||
m_File = NULL;
|
||||
m_File = nullptr;
|
||||
}
|
||||
|
||||
RageFile::RageFile( const RageFile &cpy ):
|
||||
@@ -83,7 +83,7 @@ void RageFile::Close()
|
||||
delete m_File;
|
||||
if( m_Mode & WRITE )
|
||||
FILEMAN->CacheFile( m_File, m_Path );
|
||||
m_File = NULL;
|
||||
m_File = nullptr;
|
||||
}
|
||||
|
||||
#define ASSERT_OPEN ASSERT_M( IsOpen(), ssprintf("\"%s\" is not open.", m_Path.c_str()) );
|
||||
|
||||
@@ -7,8 +7,8 @@ REGISTER_CLASS_TRAITS( RageFileBasic, pCopy->Copy() );
|
||||
|
||||
RageFileObj::RageFileObj()
|
||||
{
|
||||
m_pReadBuffer = NULL;
|
||||
m_pWriteBuffer = NULL;
|
||||
m_pReadBuffer = nullptr;
|
||||
m_pWriteBuffer = nullptr;
|
||||
|
||||
ResetReadBuf();
|
||||
|
||||
@@ -35,7 +35,7 @@ RageFileObj::RageFileObj( const RageFileObj &cpy ):
|
||||
}
|
||||
else
|
||||
{
|
||||
m_pReadBuffer = NULL;
|
||||
m_pReadBuffer = nullptr;
|
||||
}
|
||||
|
||||
if( cpy.m_pWriteBuffer != nullptr )
|
||||
@@ -45,7 +45,7 @@ RageFileObj::RageFileObj( const RageFileObj &cpy ):
|
||||
}
|
||||
else
|
||||
{
|
||||
m_pWriteBuffer = NULL;
|
||||
m_pWriteBuffer = nullptr;
|
||||
}
|
||||
|
||||
m_iReadBufAvail = cpy.m_iReadBufAvail;
|
||||
|
||||
@@ -68,7 +68,7 @@ void RageFileDriver::FlushDirCache( const RString &sPath )
|
||||
}
|
||||
|
||||
|
||||
const struct FileDriverEntry *g_pFileDriverList = NULL;
|
||||
const struct FileDriverEntry *g_pFileDriverList = nullptr;
|
||||
|
||||
FileDriverEntry::FileDriverEntry( const RString &sType )
|
||||
{
|
||||
@@ -79,7 +79,7 @@ FileDriverEntry::FileDriverEntry( const RString &sType )
|
||||
|
||||
FileDriverEntry::~FileDriverEntry()
|
||||
{
|
||||
g_pFileDriverList = NULL; /* invalidate */
|
||||
g_pFileDriverList = nullptr; /* invalidate */
|
||||
}
|
||||
|
||||
RageFileDriver *MakeFileDriver( const RString &sType, const RString &sRoot )
|
||||
|
||||
@@ -11,7 +11,7 @@ struct RageFileObjMemFile;
|
||||
class RageFileObjMem: public RageFileObj
|
||||
{
|
||||
public:
|
||||
RageFileObjMem( RageFileObjMemFile *pFile = NULL );
|
||||
RageFileObjMem( RageFileObjMemFile *pFile = nullptr );
|
||||
RageFileObjMem( const RageFileObjMem &cpy );
|
||||
~RageFileObjMem();
|
||||
|
||||
|
||||
@@ -161,10 +161,10 @@ ThreadedFileWorker::ThreadedFileWorker( RString sPath ):
|
||||
if( m_pChildDriver == nullptr )
|
||||
WARN( ssprintf("ThreadedFileWorker: Mountpoint \"%s\" not found", sPath.c_str()) );
|
||||
|
||||
m_pResultFile = NULL;
|
||||
m_pRequestFile = NULL;
|
||||
m_pResultBuffer = NULL;
|
||||
m_pRequestBuffer = NULL;
|
||||
m_pResultFile = nullptr;
|
||||
m_pRequestFile = nullptr;
|
||||
m_pResultBuffer = nullptr;
|
||||
m_pRequestBuffer = nullptr;
|
||||
|
||||
g_apWorkersMutex.Lock();
|
||||
g_apWorkers.push_back( this );
|
||||
@@ -220,7 +220,7 @@ void ThreadedFileWorker::HandleRequest( int iRequest )
|
||||
delete m_pRequestFile;
|
||||
|
||||
/* Clear m_pRequestFile, so RequestTimedOut doesn't double-delete. */
|
||||
m_pRequestFile = NULL;
|
||||
m_pRequestFile = nullptr;
|
||||
break;
|
||||
|
||||
case REQ_GET_FILE_SIZE:
|
||||
@@ -321,7 +321,7 @@ RageFileBasic *ThreadedFileWorker::Open( const RString &sPath, int iMode, int &i
|
||||
|
||||
iErr = m_iResultRequest;
|
||||
RageFileBasic *pRet = m_pResultFile;
|
||||
m_pResultFile = NULL;
|
||||
m_pResultFile = nullptr;
|
||||
|
||||
return pRet;
|
||||
}
|
||||
@@ -340,7 +340,7 @@ void ThreadedFileWorker::Close( RageFileBasic *pFile )
|
||||
m_pRequestFile = pFile;
|
||||
if( !DoRequest(REQ_CLOSE) )
|
||||
return;
|
||||
m_pRequestFile = NULL;
|
||||
m_pRequestFile = nullptr;
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -359,7 +359,7 @@ int ThreadedFileWorker::GetFileSize( RageFileBasic *&pFile )
|
||||
if( IsTimedOut() )
|
||||
{
|
||||
this->Close( pFile );
|
||||
pFile = NULL;
|
||||
pFile = nullptr;
|
||||
}
|
||||
|
||||
if( pFile == nullptr )
|
||||
@@ -370,11 +370,11 @@ int ThreadedFileWorker::GetFileSize( RageFileBasic *&pFile )
|
||||
if( !DoRequest(REQ_GET_FILE_SIZE) )
|
||||
{
|
||||
/* If we time out, we can no longer access pFile. */
|
||||
pFile = NULL;
|
||||
pFile = nullptr;
|
||||
return -1;
|
||||
}
|
||||
|
||||
m_pRequestFile = NULL;
|
||||
m_pRequestFile = nullptr;
|
||||
|
||||
return m_iResultRequest;
|
||||
}
|
||||
@@ -387,7 +387,7 @@ int ThreadedFileWorker::GetFD( RageFileBasic *&pFile )
|
||||
if( IsTimedOut() )
|
||||
{
|
||||
this->Close( pFile );
|
||||
pFile = NULL;
|
||||
pFile = nullptr;
|
||||
}
|
||||
|
||||
if( pFile == nullptr )
|
||||
@@ -398,11 +398,11 @@ int ThreadedFileWorker::GetFD( RageFileBasic *&pFile )
|
||||
if( !DoRequest(REQ_GET_FD) )
|
||||
{
|
||||
/* If we time out, we can no longer access pFile. */
|
||||
pFile = NULL;
|
||||
pFile = nullptr;
|
||||
return -1;
|
||||
}
|
||||
|
||||
m_pRequestFile = NULL;
|
||||
m_pRequestFile = nullptr;
|
||||
|
||||
return m_iResultRequest;
|
||||
}
|
||||
@@ -415,7 +415,7 @@ int ThreadedFileWorker::Seek( RageFileBasic *&pFile, int iPos, RString &sError )
|
||||
if( IsTimedOut() )
|
||||
{
|
||||
this->Close( pFile );
|
||||
pFile = NULL;
|
||||
pFile = nullptr;
|
||||
}
|
||||
|
||||
if( pFile == nullptr )
|
||||
@@ -431,13 +431,13 @@ int ThreadedFileWorker::Seek( RageFileBasic *&pFile, int iPos, RString &sError )
|
||||
{
|
||||
/* If we time out, we can no longer access pFile. */
|
||||
sError = "Operation timed out";
|
||||
pFile = NULL;
|
||||
pFile = nullptr;
|
||||
return -1;
|
||||
}
|
||||
|
||||
if( m_iResultRequest == -1 )
|
||||
sError = m_sResultError;
|
||||
m_pRequestFile = NULL;
|
||||
m_pRequestFile = nullptr;
|
||||
|
||||
return m_iResultRequest;
|
||||
}
|
||||
@@ -450,7 +450,7 @@ int ThreadedFileWorker::Read( RageFileBasic *&pFile, void *pBuf, int iSize, RStr
|
||||
if( IsTimedOut() )
|
||||
{
|
||||
this->Close( pFile );
|
||||
pFile = NULL;
|
||||
pFile = nullptr;
|
||||
}
|
||||
|
||||
if( pFile == nullptr )
|
||||
@@ -467,7 +467,7 @@ int ThreadedFileWorker::Read( RageFileBasic *&pFile, void *pBuf, int iSize, RStr
|
||||
{
|
||||
/* If we time out, we can no longer access pFile. */
|
||||
sError = "Operation timed out";
|
||||
pFile = NULL;
|
||||
pFile = nullptr;
|
||||
return -1;
|
||||
}
|
||||
|
||||
@@ -477,9 +477,9 @@ int ThreadedFileWorker::Read( RageFileBasic *&pFile, void *pBuf, int iSize, RStr
|
||||
else
|
||||
memcpy( pBuf, m_pResultBuffer, iGot );
|
||||
|
||||
m_pRequestFile = NULL;
|
||||
m_pRequestFile = nullptr;
|
||||
delete [] m_pResultBuffer;
|
||||
m_pResultBuffer = NULL;
|
||||
m_pResultBuffer = nullptr;
|
||||
|
||||
return iGot;
|
||||
}
|
||||
@@ -492,7 +492,7 @@ int ThreadedFileWorker::Write( RageFileBasic *&pFile, const void *pBuf, int iSiz
|
||||
if( IsTimedOut() )
|
||||
{
|
||||
this->Close( pFile );
|
||||
pFile = NULL;
|
||||
pFile = nullptr;
|
||||
}
|
||||
|
||||
if( pFile == nullptr )
|
||||
@@ -510,7 +510,7 @@ int ThreadedFileWorker::Write( RageFileBasic *&pFile, const void *pBuf, int iSiz
|
||||
{
|
||||
/* If we time out, we can no longer access pFile. */
|
||||
sError = "Operation timed out";
|
||||
pFile = NULL;
|
||||
pFile = nullptr;
|
||||
return -1;
|
||||
}
|
||||
|
||||
@@ -518,9 +518,9 @@ int ThreadedFileWorker::Write( RageFileBasic *&pFile, const void *pBuf, int iSiz
|
||||
if( m_iResultRequest == -1 )
|
||||
sError = m_sResultError;
|
||||
|
||||
m_pRequestFile = NULL;
|
||||
m_pRequestFile = nullptr;
|
||||
delete [] m_pRequestBuffer;
|
||||
m_pRequestBuffer = NULL;
|
||||
m_pRequestBuffer = nullptr;
|
||||
|
||||
return iGot;
|
||||
}
|
||||
@@ -533,7 +533,7 @@ int ThreadedFileWorker::Flush( RageFileBasic *&pFile, RString &sError )
|
||||
if( IsTimedOut() )
|
||||
{
|
||||
this->Close( pFile );
|
||||
pFile = NULL;
|
||||
pFile = nullptr;
|
||||
}
|
||||
|
||||
if( pFile == nullptr )
|
||||
@@ -548,14 +548,14 @@ int ThreadedFileWorker::Flush( RageFileBasic *&pFile, RString &sError )
|
||||
{
|
||||
/* If we time out, we can no longer access pFile. */
|
||||
sError = "Operation timed out";
|
||||
pFile = NULL;
|
||||
pFile = nullptr;
|
||||
return -1;
|
||||
}
|
||||
|
||||
if( m_iResultRequest == -1 )
|
||||
sError = m_sResultError;
|
||||
|
||||
m_pRequestFile = NULL;
|
||||
m_pRequestFile = nullptr;
|
||||
|
||||
return m_iResultRequest;
|
||||
}
|
||||
@@ -568,7 +568,7 @@ RageFileBasic *ThreadedFileWorker::Copy( RageFileBasic *&pFile, RString &sError
|
||||
if( IsTimedOut() )
|
||||
{
|
||||
this->Close( pFile );
|
||||
pFile = NULL;
|
||||
pFile = nullptr;
|
||||
}
|
||||
|
||||
if( pFile == nullptr )
|
||||
@@ -582,13 +582,13 @@ RageFileBasic *ThreadedFileWorker::Copy( RageFileBasic *&pFile, RString &sError
|
||||
{
|
||||
/* If we time out, we can no longer access pFile. */
|
||||
sError = "Operation timed out";
|
||||
pFile = NULL;
|
||||
pFile = nullptr;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
RageFileBasic *pRet = m_pResultFile;
|
||||
m_pRequestFile = NULL;
|
||||
m_pResultFile = NULL;
|
||||
m_pRequestFile = nullptr;
|
||||
m_pResultFile = nullptr;
|
||||
|
||||
return pRet;
|
||||
}
|
||||
@@ -848,7 +848,7 @@ public:
|
||||
TimedFilenameDB()
|
||||
{
|
||||
ExpireSeconds = -1;
|
||||
m_pWorker = NULL;
|
||||
m_pWorker = nullptr;
|
||||
}
|
||||
|
||||
void SetWorker( ThreadedFileWorker *pWorker )
|
||||
|
||||
@@ -24,7 +24,7 @@ RageFileDriverZip::RageFileDriverZip():
|
||||
m_Mutex( "RageFileDriverZip" )
|
||||
{
|
||||
m_bFileOwned = false;
|
||||
m_pZip = NULL;
|
||||
m_pZip = nullptr;
|
||||
}
|
||||
|
||||
RageFileDriverZip::RageFileDriverZip( const RString &sPath ):
|
||||
@@ -32,7 +32,7 @@ RageFileDriverZip::RageFileDriverZip( const RString &sPath ):
|
||||
m_Mutex( "RageFileDriverZip" )
|
||||
{
|
||||
m_bFileOwned = false;
|
||||
m_pZip = NULL;
|
||||
m_pZip = nullptr;
|
||||
Load( sPath );
|
||||
}
|
||||
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
#include <paths.h>
|
||||
#endif
|
||||
|
||||
RageFileManager *FILEMAN = NULL;
|
||||
RageFileManager *FILEMAN = nullptr;
|
||||
|
||||
/* Lock this before touching any of these globals (except FILEMAN itself). */
|
||||
static RageEvent *g_Mutex;
|
||||
@@ -38,7 +38,7 @@ struct LoadedDriver
|
||||
|
||||
int m_iRefs;
|
||||
|
||||
LoadedDriver() { m_pDriver = NULL; m_iRefs = 0; }
|
||||
LoadedDriver() { m_pDriver = nullptr; m_iRefs = 0; }
|
||||
RString GetPath( const RString &sPath ) const;
|
||||
};
|
||||
|
||||
@@ -73,7 +73,7 @@ RageFileDriver *RageFileManager::GetFileDriver( RString sMountpoint )
|
||||
sMountpoint += '/';
|
||||
|
||||
g_Mutex->Lock();
|
||||
RageFileDriver *pRet = NULL;
|
||||
RageFileDriver *pRet = nullptr;
|
||||
for( unsigned i = 0; i < g_pDrivers.size(); ++i )
|
||||
{
|
||||
if( g_pDrivers[i]->m_sType == "mountpoints" )
|
||||
@@ -170,7 +170,7 @@ public:
|
||||
FDB->AddFile( apDrivers[i]->m_sMountPoint, 0, 0 );
|
||||
}
|
||||
};
|
||||
static RageFileDriverMountpoints *g_Mountpoints = NULL;
|
||||
static RageFileDriverMountpoints *g_Mountpoints = nullptr;
|
||||
|
||||
static RString GetDirOfExecutable( RString argv0 )
|
||||
{
|
||||
@@ -311,10 +311,10 @@ RageFileManager::~RageFileManager()
|
||||
g_pDrivers.clear();
|
||||
|
||||
// delete g_Mountpoints; // g_Mountpoints was in g_pDrivers
|
||||
g_Mountpoints = NULL;
|
||||
g_Mountpoints = nullptr;
|
||||
|
||||
delete g_Mutex;
|
||||
g_Mutex = NULL;
|
||||
g_Mutex = nullptr;
|
||||
}
|
||||
|
||||
/* path must be normalized (FixSlashesInPlace, CollapsePath). */
|
||||
|
||||
+1
-1
@@ -7,7 +7,7 @@
|
||||
#include "LuaManager.h"
|
||||
#include "LocalizedString.h"
|
||||
|
||||
RageInput* INPUTMAN = NULL; // globally accessable input device
|
||||
RageInput* INPUTMAN = nullptr; // globally accessable input device
|
||||
|
||||
static Preference<RString> g_sInputDrivers( "InputDrivers", "" ); // "" == DEFAULT_INPUT_DRIVER_LIST
|
||||
|
||||
|
||||
+5
-5
@@ -48,7 +48,7 @@ RageSoundLoadParams::RageSoundLoadParams():
|
||||
m_bSupportRateChanging(false), m_bSupportPan(false) {}
|
||||
|
||||
RageSound::RageSound():
|
||||
m_Mutex( "RageSound" ), m_pSource(NULL),
|
||||
m_Mutex( "RageSound" ), m_pSource(nullptr),
|
||||
m_sFilePath(""), m_Param(), m_iStreamFrame(0),
|
||||
m_iStoppedSourceFrame(0), m_bPlaying(false),
|
||||
m_bDeleteWhenFinished(false), m_sError("")
|
||||
@@ -67,7 +67,7 @@ RageSound::RageSound( const RageSound &cpy ):
|
||||
{
|
||||
ASSERT(SOUNDMAN != nullptr);
|
||||
|
||||
m_pSource = NULL;
|
||||
m_pSource = nullptr;
|
||||
|
||||
*this = cpy;
|
||||
}
|
||||
@@ -90,7 +90,7 @@ RageSound &RageSound::operator=( const RageSound &cpy )
|
||||
if( cpy.m_pSource )
|
||||
m_pSource = cpy.m_pSource->Copy();
|
||||
else
|
||||
m_pSource = NULL;
|
||||
m_pSource = nullptr;
|
||||
|
||||
m_sFilePath = cpy.m_sFilePath;
|
||||
|
||||
@@ -105,7 +105,7 @@ void RageSound::Unload()
|
||||
LockMut(m_Mutex);
|
||||
|
||||
delete m_pSource;
|
||||
m_pSource = NULL;
|
||||
m_pSource = nullptr;
|
||||
|
||||
m_sFilePath = "";
|
||||
}
|
||||
@@ -364,7 +364,7 @@ void RageSound::SoundIsFinishedPlaying()
|
||||
return;
|
||||
|
||||
/* Get our current hardware position. */
|
||||
int64_t iCurrentHardwareFrame = SOUNDMAN->GetPosition( NULL );
|
||||
int64_t iCurrentHardwareFrame = SOUNDMAN->GetPosition(nullptr);
|
||||
|
||||
m_Mutex.Lock();
|
||||
|
||||
|
||||
+3
-3
@@ -98,7 +98,7 @@ public:
|
||||
* they can be ignored most of the time, so we continue to work if a file
|
||||
* is broken or missing.
|
||||
*/
|
||||
bool Load( RString sFile, bool bPrecache, const RageSoundLoadParams *pParams = NULL );
|
||||
bool Load( RString sFile, bool bPrecache, const RageSoundLoadParams *pParams = nullptr );
|
||||
|
||||
/* Using this version means the "don't care" about caching. Currently,
|
||||
* this always will not cache the sound; this may become a preference. */
|
||||
@@ -121,7 +121,7 @@ public:
|
||||
RString GetError() const { return m_sError; }
|
||||
|
||||
void Play( const RageSoundParams *params=NULL );
|
||||
void PlayCopy( const RageSoundParams *pParams = NULL ) const;
|
||||
void PlayCopy( const RageSoundParams *pParams = nullptr ) const;
|
||||
void Stop();
|
||||
|
||||
/* Cleanly pause or unpause the sound. If the sound wasn't already playing,
|
||||
@@ -173,7 +173,7 @@ private:
|
||||
|
||||
RString m_sError;
|
||||
|
||||
int GetSourceFrameFromHardwareFrame( int64_t iHardwareFrame, bool *bApproximate = NULL ) const;
|
||||
int GetSourceFrameFromHardwareFrame( int64_t iHardwareFrame, bool *bApproximate = nullptr ) const;
|
||||
|
||||
bool SetPositionFrames( int frames = -1 );
|
||||
RageSoundParams::StopMode_t GetStopMode() const; // resolves M_AUTO
|
||||
|
||||
@@ -33,9 +33,9 @@
|
||||
static RageMutex g_SoundManMutex("SoundMan");
|
||||
static Preference<RString> g_sSoundDrivers( "SoundDrivers", "" ); // "" == DEFAULT_SOUND_DRIVER_LIST
|
||||
|
||||
RageSoundManager *SOUNDMAN = NULL;
|
||||
RageSoundManager *SOUNDMAN = nullptr;
|
||||
|
||||
RageSoundManager::RageSoundManager(): m_pDriver(NULL), m_fMixVolume(1.0f),
|
||||
RageSoundManager::RageSoundManager(): m_pDriver(nullptr), m_fMixVolume(1.0f),
|
||||
m_fVolumeOfNonCriticalSounds(1.0f) {}
|
||||
|
||||
static LocalizedString COULDNT_FIND_SOUND_DRIVER( "RageSoundManager", "Couldn't find a sound driver that works" );
|
||||
|
||||
@@ -12,7 +12,7 @@ static bool g_bVector = Vector::CheckForVector();
|
||||
RageSoundMixBuffer::RageSoundMixBuffer()
|
||||
{
|
||||
m_iBufSize = m_iBufUsed = 0;
|
||||
m_pMixbuf = NULL;
|
||||
m_pMixbuf = nullptr;
|
||||
m_iOffset = 0;
|
||||
}
|
||||
|
||||
|
||||
@@ -40,7 +40,7 @@ public:
|
||||
virtual float GetStreamToSourceRatio() const = 0;
|
||||
|
||||
virtual RString GetError() const = 0;
|
||||
int RetriedRead( float *pBuffer, int iFrames, int *iSourceFrame = NULL, float *fRate = NULL );
|
||||
int RetriedRead( float *pBuffer, int iFrames, int *iSourceFrame = nullptr, float *fRate = nullptr );
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -55,7 +55,7 @@ void RageSoundReader_Chain::AddSound( int iIndex, float fOffsetSecs, float fPan
|
||||
s.iIndex = iIndex;
|
||||
s.iOffsetMS = lrintf( fOffsetSecs * 1000 );
|
||||
s.fPan = fPan;
|
||||
s.pSound = NULL;
|
||||
s.pSound = nullptr;
|
||||
m_aSounds.push_back( s );
|
||||
}
|
||||
|
||||
@@ -130,7 +130,7 @@ void RageSoundReader_Chain::Finish()
|
||||
LOG->Warn( "Discarded sound with %i channels, not %i",
|
||||
it->GetNumChannels(), m_iChannels );
|
||||
delete it;
|
||||
it = NULL;
|
||||
it = nullptr;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -240,7 +240,7 @@ void RageSoundReader_Chain::ReleaseSound( Sound *s )
|
||||
RageSoundReader *&pSound = s->pSound;
|
||||
|
||||
delete pSound;
|
||||
pSound = NULL;
|
||||
pSound = nullptr;
|
||||
|
||||
m_apActiveSounds.erase( it );
|
||||
}
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
|
||||
RageSoundReader_FileReader *RageSoundReader_FileReader::TryOpenFile( RageFileBasic *pFile, RString &error, RString format, bool &bKeepTrying )
|
||||
{
|
||||
RageSoundReader_FileReader *Sample = NULL;
|
||||
RageSoundReader_FileReader *Sample = nullptr;
|
||||
|
||||
#ifndef NO_WAV_SUPPORT
|
||||
if( !format.CompareNoCase("wav") )
|
||||
@@ -38,7 +38,7 @@ RageSoundReader_FileReader *RageSoundReader_FileReader::TryOpenFile( RageFileBas
|
||||
return nullptr;
|
||||
|
||||
OpenResult ret = Sample->Open( pFile );
|
||||
pFile = NULL; // Sample owns it now
|
||||
pFile = nullptr; // Sample owns it now
|
||||
if( ret == OPEN_OK )
|
||||
return Sample;
|
||||
|
||||
|
||||
@@ -34,7 +34,7 @@ public:
|
||||
/* Open a file. If pPrebuffer is non-NULL, and the file is sufficiently small,
|
||||
* the (possibly compressed) data will be loaded entirely into memory, and pPrebuffer
|
||||
* will be set to true. */
|
||||
static RageSoundReader_FileReader *OpenFile( RString filename, RString &error, bool *pPrebuffer = NULL );
|
||||
static RageSoundReader_FileReader *OpenFile( RString filename, RString &error, bool *pPrebuffer = nullptr );
|
||||
|
||||
protected:
|
||||
void SetError( RString sError ) const { m_sError = sError; }
|
||||
|
||||
@@ -754,7 +754,7 @@ bool RageSoundReader_MP3::MADLIB_rewind()
|
||||
* set it, then we'll be desynced by a frame after an accurate seek. */
|
||||
// mad->header_bytes = 0;
|
||||
mad->first_frame = true;
|
||||
mad->Stream.this_frame = NULL;
|
||||
mad->Stream.this_frame = nullptr;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -99,7 +99,7 @@ void RageSoundReader_Merge::Finish( int iPreferredSampleRate )
|
||||
LOG->Warn( "Discarded sound with %i channels, not %i",
|
||||
it->GetNumChannels(), m_iChannels );
|
||||
delete it;
|
||||
it = NULL;
|
||||
it = nullptr;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
#include "RageLog.h"
|
||||
|
||||
RageSoundReader_PitchChange::RageSoundReader_PitchChange( RageSoundReader *pSource ):
|
||||
RageSoundReader_Filter( NULL )
|
||||
RageSoundReader_Filter(nullptr)
|
||||
{
|
||||
m_pSpeedChange = new RageSoundReader_SpeedChange( pSource );
|
||||
m_pResample = new RageSoundReader_Resample_Good( m_pSpeedChange, m_pSpeedChange->GetSampleRate() );
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user