More effective fixes.
Course playing still results in it playing fine.
This commit is contained in:
+20
-14
@@ -27,15 +27,26 @@ struct BackgroundDef
|
||||
RString m_sColor2; // "" == use default
|
||||
|
||||
XNode *CreateNode() const;
|
||||
|
||||
/** @brief Set up the BackgroundDef with default values. */
|
||||
BackgroundDef(): m_sEffect(""), m_sFile1(""), m_sFile2(""),
|
||||
m_sColor1(""), m_sColor2("") {}
|
||||
|
||||
/**
|
||||
* @brief Set up the BackgroundDef with some defined values.
|
||||
* @param effect the intended effect.
|
||||
* @param f1 the primary filename for the definition.
|
||||
* @param f2 the secondary filename (optional). */
|
||||
BackgroundDef(RString effect, RString f1, RString f2):
|
||||
m_sEffect(effect), m_sFile1(f1), m_sFile2(f2),
|
||||
m_sColor1(""), m_sColor2("") {}
|
||||
};
|
||||
|
||||
struct BackgroundChange
|
||||
{
|
||||
BackgroundChange()
|
||||
{
|
||||
m_fStartBeat=-1;
|
||||
m_fRate=1;
|
||||
}
|
||||
BackgroundChange(): m_def(), m_fStartBeat(-1), m_fRate(1),
|
||||
m_sTransition("") {}
|
||||
|
||||
BackgroundChange(
|
||||
float s,
|
||||
RString f1,
|
||||
@@ -43,15 +54,10 @@ struct BackgroundChange
|
||||
float r=1.f,
|
||||
RString e=SBE_Centered,
|
||||
RString t=RString()
|
||||
)
|
||||
{
|
||||
m_fStartBeat=s;
|
||||
m_def.m_sFile1=f1;
|
||||
m_def.m_sFile2=f2;
|
||||
m_fRate=r;
|
||||
m_def.m_sEffect=e;
|
||||
m_sTransition=t;
|
||||
}
|
||||
):
|
||||
m_def(e, f1, f2), m_fStartBeat(s),
|
||||
m_fRate(r), m_sTransition(t) {}
|
||||
|
||||
BackgroundDef m_def;
|
||||
float m_fStartBeat;
|
||||
float m_fRate;
|
||||
|
||||
@@ -16,10 +16,13 @@ public:
|
||||
struct Arg
|
||||
{
|
||||
RString s;
|
||||
Arg(): s("") {}
|
||||
};
|
||||
Arg GetArg( unsigned index ) const;
|
||||
|
||||
vector<RString> m_vsArgs;
|
||||
|
||||
Command(): m_vsArgs() {}
|
||||
};
|
||||
|
||||
class Commands
|
||||
|
||||
+11
-2
@@ -88,9 +88,18 @@ int CourseEntry::GetNumModChanges() const
|
||||
|
||||
|
||||
|
||||
Course::Course()
|
||||
Course::Course(): m_bIsAutogen(false), m_sPath(""), m_sMainTitle(""),
|
||||
m_sMainTitleTranslit(""), m_sSubTitle(""), m_sSubTitleTranslit(""),
|
||||
m_sBannerPath(""), m_sBackgroundPath(""), m_sCDTitlePath(""),
|
||||
m_sGroupName(""), m_bRepeat(false), m_fGoalSeconds(0),
|
||||
m_bShuffle(false), m_iLives(-1), m_bSortByMeter(false),
|
||||
m_bIncomplete(false), m_vEntries(), m_SortOrder_TotalDifficulty(0),
|
||||
m_SortOrder_Ranking(0), m_LoadedFromProfile(ProfileSlot_Invalid),
|
||||
m_TrailCache(), m_iTrailCacheSeed(0), m_RadarCache(),
|
||||
m_setStyles(), m_CachedObject()
|
||||
{
|
||||
Init();
|
||||
FOREACH_ENUM( Difficulty,dc)
|
||||
m_iCustomMeter[dc] = -1;
|
||||
}
|
||||
|
||||
CourseType Course::GetCourseType() const
|
||||
|
||||
+4
-2
@@ -55,9 +55,11 @@ public:
|
||||
float fGainSeconds; // time gained back at the beginning of the song. LifeMeterTime only.
|
||||
int iGainLives; // lives gained back at the beginning of the next song
|
||||
|
||||
CourseEntry(): bSecret(false), bNoDifficult(false),
|
||||
CourseEntry(): bSecret(false), songID(), songCriteria(),
|
||||
stepsCriteria(), bNoDifficult(false),
|
||||
songSort(SongSort_Randomize), iChooseIndex(0),
|
||||
sModifiers(RString("")), fGainSeconds(0), iGainLives(-1) {}
|
||||
sModifiers(RString("")), attacks(), fGainSeconds(0),
|
||||
iGainLives(-1) {}
|
||||
|
||||
bool IsFixedSong() const { return songID.IsValid(); }
|
||||
|
||||
|
||||
+1
-1
@@ -68,7 +68,7 @@ namespace EditCourseUtil
|
||||
class CourseID
|
||||
{
|
||||
public:
|
||||
CourseID() { Unset(); }
|
||||
CourseID(): sPath(""), sFullTitle(""), m_Cache() { Unset(); }
|
||||
void Unset() { FromCourse(NULL); }
|
||||
void FromCourse( const Course *p );
|
||||
Course *ToCourse() const;
|
||||
|
||||
+3
-8
@@ -220,14 +220,9 @@ int Font::GetLineHeightInSourcePixels( const wstring &szLine ) const
|
||||
}
|
||||
|
||||
|
||||
Font::Font()
|
||||
{
|
||||
m_iRefCount = 1;
|
||||
m_pDefault = NULL;
|
||||
m_bRightToLeft = false;
|
||||
// [sm-ssc] don't show strokes by default
|
||||
m_DefaultStrokeColor = RageColor(0,0,0,0);
|
||||
}
|
||||
Font::Font(): m_iRefCount(1), path(""), m_apPages(), m_pDefault(NULL),
|
||||
m_bRightToLeft(false), m_DefaultStrokeColor(RageColor(0,0,0,0)),
|
||||
m_sChars("") {} // strokes aren't shown by default, hence the Color.
|
||||
|
||||
Font::~Font()
|
||||
{
|
||||
|
||||
+6
-6
@@ -23,11 +23,7 @@ struct FontPageTextures
|
||||
RageTexture *m_pTextureStroke;
|
||||
|
||||
/** @brief Set up the initial textures. */
|
||||
FontPageTextures()
|
||||
{
|
||||
m_pTextureMain = NULL;
|
||||
m_pTextureStroke = NULL;
|
||||
}
|
||||
FontPageTextures(): m_pTextureMain(NULL), m_pTextureStroke(NULL) {}
|
||||
};
|
||||
|
||||
/** @brief The components of a glyph (not technically a character). */
|
||||
@@ -52,6 +48,10 @@ struct glyph
|
||||
|
||||
/** @brief Texture coordinate rect. */
|
||||
RectF m_TexRect;
|
||||
|
||||
/** @brief Set up the glyph with default values. */
|
||||
glyph() : m_pPage(NULL), m_FontPageTextures(), m_iHadvance(0),
|
||||
m_fWidth(0), m_fHeight(0), m_fHshift(0), m_TexRect() {}
|
||||
};
|
||||
|
||||
/** @brief The settings used for the FontPage. */
|
||||
@@ -75,7 +75,7 @@ struct FontPageSettings
|
||||
map<int,int> m_mapGlyphWidths;
|
||||
|
||||
/** @brief The initial settings for the FontPage. */
|
||||
FontPageSettings():
|
||||
FontPageSettings(): m_sTexturePath(""),
|
||||
m_iDrawExtraPixelsLeft(0), m_iDrawExtraPixelsRight(0),
|
||||
m_iAddToAllWidths(0),
|
||||
m_iLineSpacing(-1),
|
||||
|
||||
@@ -156,7 +156,7 @@ private:
|
||||
class MessageSubscriber : public IMessageSubscriber
|
||||
{
|
||||
public:
|
||||
MessageSubscriber() {}
|
||||
MessageSubscriber(): m_vsSubscribedTo() {}
|
||||
MessageSubscriber( const MessageSubscriber &cpy );
|
||||
MessageSubscriber &operator=(const MessageSubscriber &cpy);
|
||||
|
||||
|
||||
@@ -13,6 +13,9 @@ public:
|
||||
{
|
||||
/** @brief The list of parameters. */
|
||||
vector<RString> params;
|
||||
/** @brief Set up the parameters with default values. */
|
||||
value_t(): params() {}
|
||||
|
||||
/**
|
||||
* @brief Access the proper parameter.
|
||||
* @param i the index.
|
||||
|
||||
@@ -31,7 +31,7 @@ static void GetResolutionFromFileName( RString sPath, int &iWidth, int &iHeight
|
||||
}
|
||||
|
||||
RageBitmapTexture::RageBitmapTexture( RageTextureID name ) :
|
||||
RageTexture( name )
|
||||
RageTexture( name ), m_uTexHandle(0)
|
||||
{
|
||||
Create();
|
||||
}
|
||||
|
||||
+1
-1
@@ -264,7 +264,7 @@ class MatrixStack
|
||||
vector<RageMatrix> stack;
|
||||
public:
|
||||
|
||||
MatrixStack()
|
||||
MatrixStack(): stack()
|
||||
{
|
||||
stack.resize(1);
|
||||
LoadIdentity();
|
||||
|
||||
+3
-2
@@ -48,9 +48,10 @@ RageSoundLoadParams::RageSoundLoadParams():
|
||||
m_bSupportRateChanging(false), m_bSupportPan(false) {}
|
||||
|
||||
RageSound::RageSound():
|
||||
m_Mutex( "RageSound" ), m_pSource(NULL), m_iStreamFrame(0),
|
||||
m_Mutex( "RageSound" ), m_pSource(NULL),
|
||||
m_sFilePath(""), m_Param(), m_iStreamFrame(0),
|
||||
m_iStoppedSourceFrame(0), m_bPlaying(false),
|
||||
m_bDeleteWhenFinished(false)
|
||||
m_sError(""), m_bDeleteWhenFinished(false)
|
||||
{
|
||||
ASSERT( SOUNDMAN );
|
||||
}
|
||||
|
||||
@@ -1,15 +1,13 @@
|
||||
/* RageTexturePreloader - Load textures in advance, for use later. */
|
||||
|
||||
#ifndef RAGE_TEXTURE_PRELOADER_H
|
||||
#define RAGE_TEXTURE_PRELOADER_H
|
||||
|
||||
class RageTexture;
|
||||
struct RageTextureID;
|
||||
|
||||
/** @brief Load the textures in advance for using them later. */
|
||||
class RageTexturePreloader
|
||||
{
|
||||
public:
|
||||
RageTexturePreloader() { }
|
||||
RageTexturePreloader(): m_apTextures() { }
|
||||
RageTexturePreloader( const RageTexturePreloader &cpy ) { *this = cpy; }
|
||||
RageTexturePreloader &operator=( const RageTexturePreloader &rhs );
|
||||
~RageTexturePreloader();
|
||||
|
||||
@@ -335,6 +335,7 @@ typedef StepMania::Rect<float> RectF;
|
||||
* have the same layout that D3D expects. */
|
||||
struct RageSpriteVertex // has color
|
||||
{
|
||||
RageSpriteVertex(): p(), n(), c(), t() {}
|
||||
RageVector3 p; // position
|
||||
RageVector3 n; // normal
|
||||
RageVColor c; // diffuse color
|
||||
|
||||
@@ -18,17 +18,14 @@ template<typename T>
|
||||
class CachedObject
|
||||
{
|
||||
public:
|
||||
CachedObject()
|
||||
CachedObject(): m_pObject(NULL)
|
||||
{
|
||||
m_pObject = NULL;
|
||||
|
||||
/* A new object is being constructed, so invalidate negative caching. */
|
||||
ClearCacheNegative();
|
||||
}
|
||||
|
||||
CachedObject( const CachedObject &cpy )
|
||||
CachedObject( const CachedObject &cpy ): m_pObject(NULL)
|
||||
{
|
||||
m_pObject = NULL;
|
||||
ClearCacheNegative();
|
||||
}
|
||||
|
||||
|
||||
+4
-3
@@ -47,8 +47,9 @@ public:
|
||||
} m_Locked;
|
||||
|
||||
/** @brief Set up some initial song criteria. */
|
||||
SongCriteria(): m_sGroupName(""), m_bUseSongGenreAllowedList(false),
|
||||
m_Selectable(Selectable_DontCare), m_bUseSongAllowedList(false),
|
||||
SongCriteria(): m_sGroupName(""), m_bUseSongGenreAllowedList(false),
|
||||
m_vsSongGenreAllowedList(), m_Selectable(Selectable_DontCare),
|
||||
m_bUseSongAllowedList(false), m_vpSongAllowedList(),
|
||||
m_iMaxStagesForSong(-1), m_Tutorial(Tutorial_DontCare),
|
||||
m_Locked(Locked_DontCare)
|
||||
{
|
||||
@@ -182,7 +183,7 @@ public:
|
||||
* @brief Set up the SongID with default values.
|
||||
*
|
||||
* This used to call Unset() to do the same thing. */
|
||||
SongID(): sDir("") { m_Cache.Unset(); }
|
||||
SongID(): sDir(""), m_Cache() { m_Cache.Unset(); }
|
||||
void Unset() { FromSong(NULL); }
|
||||
void FromSong( const Song *p );
|
||||
Song *ToSong() const;
|
||||
|
||||
+1
-1
@@ -169,7 +169,7 @@ public:
|
||||
* This used to call Unset(), which set the variables to
|
||||
* the same thing. */
|
||||
StepsID(): st(StepsType_Invalid), dc(Difficulty_Invalid),
|
||||
sDescription(""), uHash(0) {}
|
||||
sDescription(""), uHash(0), m_Cache() {}
|
||||
void Unset() { FromSteps(NULL); }
|
||||
void FromSteps( const Steps *p );
|
||||
Steps *ToSteps( const Song *p, bool bAllowNull ) const;
|
||||
|
||||
+4
-3
@@ -57,9 +57,10 @@ public:
|
||||
*
|
||||
* m_sEntryID starts as an empty string. It will be filled automatically
|
||||
* if not specified. */
|
||||
UnlockEntry(): m_Type(UnlockRewardType_Invalid),
|
||||
m_dc(Difficulty_Invalid), m_bRequirePassHardSteps(false),
|
||||
m_bRoulette(false), m_sEntryID(RString(""))
|
||||
UnlockEntry(): m_Type(UnlockRewardType_Invalid), m_cmd(),
|
||||
m_Song(), m_dc(Difficulty_Invalid), m_Course(),
|
||||
m_bRequirePassHardSteps(false), m_bRoulette(false),
|
||||
m_sEntryID(RString(""))
|
||||
{
|
||||
ZERO( m_fRequirement );
|
||||
}
|
||||
|
||||
@@ -25,7 +25,7 @@ public:
|
||||
static void Create( const RString &sDrivers, vector<InputHandler *> &apAdd );
|
||||
static DriverList m_pDriverList;
|
||||
|
||||
InputHandler(): m_iInputsSinceUpdate(0) {}
|
||||
InputHandler(): m_LastUpdate(), m_iInputsSinceUpdate(0) {}
|
||||
virtual ~InputHandler() { }
|
||||
virtual void Update() { }
|
||||
virtual bool DevicesChanged() { return false; }
|
||||
|
||||
Reference in New Issue
Block a user