IniFile::GetValueB->GetValue, etc. Cleanup.
This commit is contained in:
@@ -51,12 +51,12 @@ Actor* MakeActor( CString sPath )
|
|||||||
Actor* pActor = MakeActor( sNewPath );
|
Actor* pActor = MakeActor( sNewPath );
|
||||||
|
|
||||||
float f;
|
float f;
|
||||||
if( ini.GetValueF( "Actor", "BaseRotationXDegrees", f ) ) pActor->SetBaseRotationX( f );
|
if( ini.GetValue ( "Actor", "BaseRotationXDegrees", f ) ) pActor->SetBaseRotationX( f );
|
||||||
if( ini.GetValueF( "Actor", "BaseRotationYDegrees", f ) ) pActor->SetBaseRotationY( f );
|
if( ini.GetValue ( "Actor", "BaseRotationYDegrees", f ) ) pActor->SetBaseRotationY( f );
|
||||||
if( ini.GetValueF( "Actor", "BaseRotationZDegrees", f ) ) pActor->SetBaseRotationZ( f );
|
if( ini.GetValue ( "Actor", "BaseRotationZDegrees", f ) ) pActor->SetBaseRotationZ( f );
|
||||||
if( ini.GetValueF( "Actor", "BaseZoomX", f ) ) pActor->SetBaseZoomX( f );
|
if( ini.GetValue ( "Actor", "BaseZoomX", f ) ) pActor->SetBaseZoomX( f );
|
||||||
if( ini.GetValueF( "Actor", "BaseZoomY", f ) ) pActor->SetBaseZoomY( f );
|
if( ini.GetValue ( "Actor", "BaseZoomY", f ) ) pActor->SetBaseZoomY( f );
|
||||||
if( ini.GetValueF( "Actor", "BaseZoomZ", f ) ) pActor->SetBaseZoomZ( f );
|
if( ini.GetValue ( "Actor", "BaseZoomZ", f ) ) pActor->SetBaseZoomZ( f );
|
||||||
|
|
||||||
return pActor;
|
return pActor;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -77,7 +77,7 @@ void BGAnimation::LoadFromAniDir( CString sAniDir )
|
|||||||
m_Layers.push_back( pLayer );
|
m_Layers.push_back( pLayer );
|
||||||
}
|
}
|
||||||
|
|
||||||
if( !ini.GetValueF( "BGAnimation", "LengthSeconds", m_fLengthSeconds ) )
|
if( !ini.GetValue( "BGAnimation", "LengthSeconds", m_fLengthSeconds ) )
|
||||||
{
|
{
|
||||||
m_fLengthSeconds = 0;
|
m_fLengthSeconds = 0;
|
||||||
for( i=0; (unsigned)i < m_Layers.size(); i++ )
|
for( i=0; (unsigned)i < m_Layers.size(); i++ )
|
||||||
|
|||||||
@@ -413,20 +413,20 @@ void BGAnimationLayer::LoadFromAniLayerFile( CString sPath )
|
|||||||
ini.SetPath( sIniPath );
|
ini.SetPath( sIniPath );
|
||||||
if( ini.ReadFile() )
|
if( ini.ReadFile() )
|
||||||
{
|
{
|
||||||
ini.GetValueF( "BGAnimationLayer", "SetXpos", m_PosX );
|
ini.GetValue( "BGAnimationLayer", "SetXpos", m_PosX );
|
||||||
ini.GetValueF( "BGAnimationLayer", "SetYpos", m_PosY );
|
ini.GetValue( "BGAnimationLayer", "SetYpos", m_PosY );
|
||||||
ini.GetValueF( "BGAnimationLayer", "SetZoom", m_Zoom );
|
ini.GetValue( "BGAnimationLayer", "SetZoom", m_Zoom );
|
||||||
ini.GetValueF( "BGAnimationLayer", "SetRot", m_Rot );
|
ini.GetValue( "BGAnimationLayer", "SetRot", m_Rot );
|
||||||
ini.GetValueF( "BGAnimationLayer", "TweenStartTime", m_TweenStartTime );
|
ini.GetValue( "BGAnimationLayer", "TweenStartTime", m_TweenStartTime );
|
||||||
ini.GetValueF( "BGAnimationLayer", "TweenX", m_TweenX );
|
ini.GetValue( "BGAnimationLayer", "TweenX", m_TweenX );
|
||||||
ini.GetValueF( "BGAnimationLayer", "TweenY", m_TweenY );
|
ini.GetValue( "BGAnimationLayer", "TweenY", m_TweenY );
|
||||||
ini.GetValueF( "BGAnimationLayer", "TweenSpeed", m_TweenSpeed );
|
ini.GetValue( "BGAnimationLayer", "TweenSpeed", m_TweenSpeed );
|
||||||
ini.GetValueF( "BGAnimationLayer", "ShowTime", m_ShowTime );
|
ini.GetValue( "BGAnimationLayer", "ShowTime", m_ShowTime );
|
||||||
ini.GetValueF( "BGAnimationLayer", "HideTime", m_HideTime );
|
ini.GetValue( "BGAnimationLayer", "HideTime", m_HideTime );
|
||||||
ini.GetValueF( "BGAnimationLayer", "TexCoordVelocityX", m_vTexCoordVelocity.x );
|
ini.GetValue( "BGAnimationLayer", "TexCoordVelocityX", m_vTexCoordVelocity.x );
|
||||||
ini.GetValueF( "BGAnimationLayer", "TexCoordVelocityY", m_vTexCoordVelocity.y );
|
ini.GetValue( "BGAnimationLayer", "TexCoordVelocityY", m_vTexCoordVelocity.y );
|
||||||
ini.GetValueF( "BGAnimationLayer", "RotationalVelocity", m_fRotationalVelocity );
|
ini.GetValue( "BGAnimationLayer", "RotationalVelocity", m_fRotationalVelocity );
|
||||||
ini.GetValueF( "BGAnimationLayer", "SetY", m_fStretchScrollH_Y );
|
ini.GetValue( "BGAnimationLayer", "SetY", m_fStretchScrollH_Y );
|
||||||
}
|
}
|
||||||
|
|
||||||
if(m_ShowTime != 0) // they don't want to show until a certain point... hide it all
|
if(m_ShowTime != 0) // they don't want to show until a certain point... hide it all
|
||||||
@@ -527,31 +527,31 @@ void BGAnimationLayer::LoadFromIni( CString sAniDir, CString sLayer )
|
|||||||
sPath = asElementPaths[0];
|
sPath = asElementPaths[0];
|
||||||
}
|
}
|
||||||
|
|
||||||
ini.GetValueI( sLayer, "Type", (int&)m_Type );
|
ini.GetValue( sLayer, "Type", (int&)m_Type );
|
||||||
CLAMP( m_Type, (Type)0, TYPE_INVALID );
|
CLAMP( m_Type, (Type)0, TYPE_INVALID );
|
||||||
ini.GetValue( sLayer, "Command", m_sOnCommand );
|
ini.GetValue( sLayer, "Command", m_sOnCommand );
|
||||||
ini.GetValue( sLayer, "OffCommand", m_sOffCommand );
|
ini.GetValue( sLayer, "OffCommand", m_sOffCommand );
|
||||||
ini.GetValueF( sLayer, "FOV", m_fFOV );
|
ini.GetValue( sLayer, "FOV", m_fFOV );
|
||||||
ini.GetValueB( sLayer, "Lighting", m_bLighting );
|
ini.GetValue( sLayer, "Lighting", m_bLighting );
|
||||||
ini.GetValueF( sLayer, "StretchTexCoordVelocityX", m_fStretchTexCoordVelocityX );
|
ini.GetValue( sLayer, "StretchTexCoordVelocityX", m_fStretchTexCoordVelocityX );
|
||||||
ini.GetValueF( sLayer, "StretchTexCoordVelocityY", m_fStretchTexCoordVelocityY );
|
ini.GetValue( sLayer, "StretchTexCoordVelocityY", m_fStretchTexCoordVelocityY );
|
||||||
ini.GetValueF( sLayer, "ZoomMin", m_fZoomMin );
|
ini.GetValue( sLayer, "ZoomMin", m_fZoomMin );
|
||||||
ini.GetValueF( sLayer, "ZoomMax", m_fZoomMax );
|
ini.GetValue( sLayer, "ZoomMax", m_fZoomMax );
|
||||||
ini.GetValueF( sLayer, "VelocityXMin", m_fVelocityXMin );
|
ini.GetValue( sLayer, "VelocityXMin", m_fVelocityXMin );
|
||||||
ini.GetValueF( sLayer, "VelocityXMax", m_fVelocityXMax );
|
ini.GetValue( sLayer, "VelocityXMax", m_fVelocityXMax );
|
||||||
ini.GetValueF( sLayer, "VelocityYMin", m_fVelocityYMin );
|
ini.GetValue( sLayer, "VelocityYMin", m_fVelocityYMin );
|
||||||
ini.GetValueF( sLayer, "VelocityYMax", m_fVelocityYMax );
|
ini.GetValue( sLayer, "VelocityYMax", m_fVelocityYMax );
|
||||||
ini.GetValueF( sLayer, "VelocityZMin", m_fVelocityZMin );
|
ini.GetValue( sLayer, "VelocityZMin", m_fVelocityZMin );
|
||||||
ini.GetValueF( sLayer, "VelocityZMax", m_fVelocityZMax );
|
ini.GetValue( sLayer, "VelocityZMax", m_fVelocityZMax );
|
||||||
ini.GetValueF( sLayer, "OverrideSpeed", m_fOverrideSpeed );
|
ini.GetValue( sLayer, "OverrideSpeed", m_fOverrideSpeed );
|
||||||
ini.GetValueI( sLayer, "NumParticles", m_iNumParticles );
|
ini.GetValue( sLayer, "NumParticles", m_iNumParticles );
|
||||||
ini.GetValueB( sLayer, "ParticlesBounce", m_bParticlesBounce );
|
ini.GetValue( sLayer, "ParticlesBounce", m_bParticlesBounce );
|
||||||
ini.GetValueF( sLayer, "TilesStartX", m_fTilesStartX );
|
ini.GetValue( sLayer, "TilesStartX", m_fTilesStartX );
|
||||||
ini.GetValueF( sLayer, "TilesStartY", m_fTilesStartY );
|
ini.GetValue( sLayer, "TilesStartY", m_fTilesStartY );
|
||||||
ini.GetValueF( sLayer, "TilesSpacingX", m_fTilesSpacingX );
|
ini.GetValue( sLayer, "TilesSpacingX", m_fTilesSpacingX );
|
||||||
ini.GetValueF( sLayer, "TilesSpacingY", m_fTilesSpacingY );
|
ini.GetValue( sLayer, "TilesSpacingY", m_fTilesSpacingY );
|
||||||
ini.GetValueF( sLayer, "TileVelocityX", m_fTileVelocityX );
|
ini.GetValue( sLayer, "TileVelocityX", m_fTileVelocityX );
|
||||||
ini.GetValueF( sLayer, "TileVelocityY", m_fTileVelocityY );
|
ini.GetValue( sLayer, "TileVelocityY", m_fTileVelocityY );
|
||||||
|
|
||||||
if( IsBanner )
|
if( IsBanner )
|
||||||
TEXTUREMAN->DisableOddDimensionWarning();
|
TEXTUREMAN->DisableOddDimensionWarning();
|
||||||
@@ -628,7 +628,7 @@ void BGAnimationLayer::LoadFromIni( CString sAniDir, CString sLayer )
|
|||||||
TEXTUREMAN->EnableOddDimensionWarning();
|
TEXTUREMAN->EnableOddDimensionWarning();
|
||||||
|
|
||||||
bool bStartOnRandomFrame = false;
|
bool bStartOnRandomFrame = false;
|
||||||
ini.GetValueB( sLayer, "StartOnRandomFrame", bStartOnRandomFrame );
|
ini.GetValue( sLayer, "StartOnRandomFrame", bStartOnRandomFrame );
|
||||||
if( bStartOnRandomFrame )
|
if( bStartOnRandomFrame )
|
||||||
{
|
{
|
||||||
for( unsigned i=0; i<m_pActors.size(); i++ )
|
for( unsigned i=0; i<m_pActors.size(); i++ )
|
||||||
|
|||||||
@@ -240,9 +240,9 @@ RageTextureID BannerCache::LoadCachedBanner( CString BannerPath )
|
|||||||
|
|
||||||
int src_width = 0, src_height = 0;
|
int src_width = 0, src_height = 0;
|
||||||
bool WasRotatedBanner = false;
|
bool WasRotatedBanner = false;
|
||||||
BannerData.GetValueI( BannerPath, "Width", src_width );
|
BannerData.GetValue( BannerPath, "Width", src_width );
|
||||||
BannerData.GetValueI( BannerPath, "Height", src_height );
|
BannerData.GetValue( BannerPath, "Height", src_height );
|
||||||
BannerData.GetValueB( BannerPath, "Rotated", WasRotatedBanner );
|
BannerData.GetValue( BannerPath, "Rotated", WasRotatedBanner );
|
||||||
if(src_width == 0 || src_height == 0)
|
if(src_width == 0 || src_height == 0)
|
||||||
{
|
{
|
||||||
LOG->Warn("Couldn't load '%s'", BannerPath.c_str() );
|
LOG->Warn("Couldn't load '%s'", BannerPath.c_str() );
|
||||||
@@ -292,7 +292,7 @@ void BannerCache::CacheBanner( CString BannerPath )
|
|||||||
{
|
{
|
||||||
unsigned CurFullHash;
|
unsigned CurFullHash;
|
||||||
const unsigned FullHash = GetHashForFile( BannerPath );
|
const unsigned FullHash = GetHashForFile( BannerPath );
|
||||||
if( BannerData.GetValueU( BannerPath, "FullHash", CurFullHash ) &&
|
if( BannerData.GetValue( BannerPath, "FullHash", CurFullHash ) &&
|
||||||
CurFullHash == FullHash )
|
CurFullHash == FullHash )
|
||||||
{
|
{
|
||||||
/* It's identical. Just load it. */
|
/* It's identical. Just load it. */
|
||||||
|
|||||||
+10
-10
@@ -475,15 +475,15 @@ void Font::LoadFontPageSettings(FontPageSettings &cfg, IniFile &ini, const CStri
|
|||||||
// LOG->Trace("Loading font page '%s' settings from page name '%s'",
|
// LOG->Trace("Loading font page '%s' settings from page name '%s'",
|
||||||
// TexturePath.c_str(), PageName.c_str());
|
// TexturePath.c_str(), PageName.c_str());
|
||||||
|
|
||||||
ini.GetValueI( PageName, "DrawExtraPixelsLeft", cfg.DrawExtraPixelsLeft );
|
ini.GetValue( PageName, "DrawExtraPixelsLeft", cfg.DrawExtraPixelsLeft );
|
||||||
ini.GetValueI( PageName, "DrawExtraPixelsRight", cfg.DrawExtraPixelsRight );
|
ini.GetValue( PageName, "DrawExtraPixelsRight", cfg.DrawExtraPixelsRight );
|
||||||
ini.GetValueI( PageName, "AddToAllWidths", cfg.AddToAllWidths );
|
ini.GetValue( PageName, "AddToAllWidths", cfg.AddToAllWidths );
|
||||||
ini.GetValueF( PageName, "ScaleAllWidthsBy", cfg.ScaleAllWidthsBy );
|
ini.GetValue( PageName, "ScaleAllWidthsBy", cfg.ScaleAllWidthsBy );
|
||||||
ini.GetValueI( PageName, "LineSpacing", cfg.LineSpacing );
|
ini.GetValue( PageName, "LineSpacing", cfg.LineSpacing );
|
||||||
ini.GetValueI( PageName, "Top", cfg.Top );
|
ini.GetValue( PageName, "Top", cfg.Top );
|
||||||
ini.GetValueI( PageName, "Baseline", cfg.Baseline );
|
ini.GetValue( PageName, "Baseline", cfg.Baseline );
|
||||||
ini.GetValueI( PageName, "DefaultWidth", cfg.DefaultWidth );
|
ini.GetValue( PageName, "DefaultWidth", cfg.DefaultWidth );
|
||||||
ini.GetValueI( PageName, "AdvanceExtraPixels", cfg.AdvanceExtraPixels );
|
ini.GetValue( PageName, "AdvanceExtraPixels", cfg.AdvanceExtraPixels );
|
||||||
|
|
||||||
/* Iterate over all keys. */
|
/* Iterate over all keys. */
|
||||||
const IniFile::key *k = ini.GetKey(PageName);
|
const IniFile::key *k = ini.GetKey(PageName);
|
||||||
@@ -778,7 +778,7 @@ void Font::Load(const CString &sFontOrTextureFilePath, CString sChars)
|
|||||||
ini.SetPath( IniPath );
|
ini.SetPath( IniPath );
|
||||||
ini.ReadFile();
|
ini.ReadFile();
|
||||||
ini.RenameKey("Char Widths", "main");
|
ini.RenameKey("Char Widths", "main");
|
||||||
ini.GetValueB( "main", "CapitalsOnly", CapitalsOnly );
|
ini.GetValue( "main", "CapitalsOnly", CapitalsOnly );
|
||||||
}
|
}
|
||||||
|
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -14,24 +14,20 @@
|
|||||||
#include "IniFile.h"
|
#include "IniFile.h"
|
||||||
#include "RageUtil.h"
|
#include "RageUtil.h"
|
||||||
#include "RageLog.h"
|
#include "RageLog.h"
|
||||||
|
#include "RageFile.h"
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
using namespace std;
|
|
||||||
#include "RageFile.h"
|
|
||||||
|
|
||||||
//constructor, can specify pathname here instead of using SetPath later
|
|
||||||
IniFile::IniFile(CString inipath)
|
IniFile::IniFile(CString inipath)
|
||||||
{
|
{
|
||||||
path = inipath;
|
path = inipath;
|
||||||
}
|
}
|
||||||
|
|
||||||
//default destructor
|
|
||||||
IniFile::~IniFile()
|
IniFile::~IniFile()
|
||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// sets path of ini file to read and write from
|
|
||||||
void IniFile::SetPath(CString newpath)
|
void IniFile::SetPath(CString newpath)
|
||||||
{
|
{
|
||||||
path = newpath;
|
path = newpath;
|
||||||
@@ -166,7 +162,7 @@ bool IniFile::GetValue(const CString &keyname, const CString &valuename, CString
|
|||||||
}
|
}
|
||||||
|
|
||||||
// gets value of [keyname] valuename =
|
// gets value of [keyname] valuename =
|
||||||
bool IniFile::GetValueI(const CString &keyname, const CString &valuename, int& value) const
|
bool IniFile::GetValue(const CString &keyname, const CString &valuename, int& value) const
|
||||||
{
|
{
|
||||||
CString sValue;
|
CString sValue;
|
||||||
if( !GetValue(keyname,valuename,sValue) )
|
if( !GetValue(keyname,valuename,sValue) )
|
||||||
@@ -175,7 +171,7 @@ bool IniFile::GetValueI(const CString &keyname, const CString &valuename, int& v
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool IniFile::GetValueU(const CString &keyname, const CString &valuename, unsigned &value) const
|
bool IniFile::GetValue(const CString &keyname, const CString &valuename, unsigned &value) const
|
||||||
{
|
{
|
||||||
CString sValue;
|
CString sValue;
|
||||||
if( !GetValue(keyname,valuename,sValue) )
|
if( !GetValue(keyname,valuename,sValue) )
|
||||||
@@ -185,7 +181,7 @@ bool IniFile::GetValueU(const CString &keyname, const CString &valuename, unsign
|
|||||||
}
|
}
|
||||||
|
|
||||||
// gets value of [keyname] valuename =
|
// gets value of [keyname] valuename =
|
||||||
bool IniFile::GetValueF(const CString &keyname, const CString &valuename, float& value) const
|
bool IniFile::GetValue(const CString &keyname, const CString &valuename, float& value) const
|
||||||
{
|
{
|
||||||
CString sValue;
|
CString sValue;
|
||||||
if( !GetValue(keyname,valuename,sValue) )
|
if( !GetValue(keyname,valuename,sValue) )
|
||||||
@@ -195,7 +191,7 @@ bool IniFile::GetValueF(const CString &keyname, const CString &valuename, float&
|
|||||||
}
|
}
|
||||||
|
|
||||||
// gets value of [keyname] valuename =
|
// gets value of [keyname] valuename =
|
||||||
bool IniFile::GetValueB(const CString &keyname, const CString &valuename, bool& value) const
|
bool IniFile::GetValue(const CString &keyname, const CString &valuename, bool& value) const
|
||||||
{
|
{
|
||||||
CString sValue;
|
CString sValue;
|
||||||
if( !GetValue(keyname,valuename,sValue) )
|
if( !GetValue(keyname,valuename,sValue) )
|
||||||
|
|||||||
@@ -70,13 +70,10 @@ public:
|
|||||||
//gets value of [keyname] valuename =
|
//gets value of [keyname] valuename =
|
||||||
//returns "", or 0 if key/value not found. Sets error member to show problem
|
//returns "", or 0 if key/value not found. Sets error member to show problem
|
||||||
bool GetValue(const CString &key, const CString &valuename, CString& value) const;
|
bool GetValue(const CString &key, const CString &valuename, CString& value) const;
|
||||||
bool GetValueI(const CString &key, const CString &valuename, int& value) const;
|
bool GetValue(const CString &key, const CString &valuename, int& value) const;
|
||||||
bool GetValueU(const CString &key, const CString &valuename, unsigned& value) const;
|
bool GetValue(const CString &key, const CString &valuename, unsigned& value) const;
|
||||||
bool GetValueF(const CString &key, const CString &valuename, float& value) const;
|
bool GetValue(const CString &key, const CString &valuename, float& value) const;
|
||||||
bool GetValueB(const CString &key, const CString &valuename, bool& value) const;
|
bool GetValue(const CString &key, const CString &valuename, bool& value) const;
|
||||||
bool GetValue(const CString &key, const CString &valuename, int& value) const { return GetValueI(key, valuename, value); }
|
|
||||||
bool GetValue(const CString &key, const CString &valuename, float& value) const { return GetValueF(key, valuename, value); }
|
|
||||||
bool GetValue(const CString &key, const CString &valuename, bool& value) const { return GetValueB(key, valuename, value); }
|
|
||||||
|
|
||||||
//sets value of [keyname] valuename =.
|
//sets value of [keyname] valuename =.
|
||||||
//specify the optional paramter as false (0) if you do not want it to create
|
//specify the optional paramter as false (0) if you do not want it to create
|
||||||
|
|||||||
@@ -55,12 +55,44 @@ void InputFilter::ButtonPressed( DeviceInput di, bool Down )
|
|||||||
|
|
||||||
m_BeingHeld[di.device][di.button] = Down;
|
m_BeingHeld[di.device][di.button] = Down;
|
||||||
m_fSecsHeld[di.device][di.button] = 0;
|
m_fSecsHeld[di.device][di.button] = 0;
|
||||||
|
#if 0
|
||||||
|
if( 1 ) // PREFSMAN->m_bJoytechInput && di.IsJoystick() )
|
||||||
|
{
|
||||||
|
/* If this is a release of the right button, force it down for a little while, so
|
||||||
|
* the axis motion has a chance to come in before we register the right arrow release. */
|
||||||
|
const int RightButton = 'd';//JOY_13;
|
||||||
|
// const int LeftButton = 'a';//JOY_15;
|
||||||
|
if( !Down && di.button == RightButton )
|
||||||
|
{
|
||||||
|
LOG->Trace("temp force d");
|
||||||
|
ForceKey( DeviceInput(di.device, RightButton), 1 );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#endif
|
||||||
if( WasBeingPressed != IsBeingPressed(di) )
|
if( WasBeingPressed != IsBeingPressed(di) )
|
||||||
{
|
{
|
||||||
InputEventType iet = IsBeingPressed(di)? IET_FIRST_PRESS:IET_RELEASE;
|
InputEventType iet = IsBeingPressed(di)? IET_FIRST_PRESS:IET_RELEASE;
|
||||||
queue.push_back( InputEvent(di,iet) );
|
queue.push_back( InputEvent(di,iet) );
|
||||||
}
|
}
|
||||||
|
#if 0
|
||||||
|
if( 1 ) // PREFSMAN->m_bJoytechInput && di.IsJoystick() )
|
||||||
|
{
|
||||||
|
const int RightButton = 'd';//JOY_13;
|
||||||
|
const int LeftButton = 'a';//JOY_15;
|
||||||
|
bool NeedToForceBothButtons =
|
||||||
|
IsBeingPressed( DeviceInput(di.device, 'e'/*JOY_RIGHT*/) ) &&
|
||||||
|
!IsBeingPressed( DeviceInput(di.device, RightButton) );
|
||||||
|
LOG->Trace("--- %i", NeedToForceBothButtons );
|
||||||
|
if( NeedToForceBothButtons )
|
||||||
|
{
|
||||||
|
ForceKey( DeviceInput(di.device, RightButton), 0 );
|
||||||
|
ForceKey( DeviceInput(di.device, LeftButton), 0 );
|
||||||
|
} else {
|
||||||
|
StopForcingKey( DeviceInput(di.device, RightButton) );
|
||||||
|
StopForcingKey( DeviceInput(di.device, LeftButton) );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Force a key down. Duration is the amount of time to force the key, or 0 to force
|
/* Force a key down. Duration is the amount of time to force the key, or 0 to force
|
||||||
@@ -116,6 +148,14 @@ void InputFilter::ResetDevice( InputDevice dev )
|
|||||||
|
|
||||||
void InputFilter::Update(float fDeltaTime)
|
void InputFilter::Update(float fDeltaTime)
|
||||||
{
|
{
|
||||||
|
// static float AutoStartTime=0;
|
||||||
|
// AutoStartTime -= fDeltaTime;
|
||||||
|
// if( AutoStartTime <= 0 )
|
||||||
|
// {
|
||||||
|
// AutoStartTime = 0.5f;
|
||||||
|
// ButtonPressed( DeviceInput(DEVICE_KEYBOARD, 'a'), true );
|
||||||
|
// ButtonPressed( DeviceInput(DEVICE_KEYBOARD, 'a'), false );
|
||||||
|
// }
|
||||||
RageTimer now;
|
RageTimer now;
|
||||||
|
|
||||||
// Constructing the DeviceInput inside the nested loops caues terrible
|
// Constructing the DeviceInput inside the nested loops caues terrible
|
||||||
|
|||||||
@@ -53,7 +53,7 @@ void AnimatedTexture::Load( CString sTexOrIniPath )
|
|||||||
CString sFileName;
|
CString sFileName;
|
||||||
float fDelay = 0;
|
float fDelay = 0;
|
||||||
if( ini.GetValue( "AnimatedTexture", sFileKey, sFileName ) &&
|
if( ini.GetValue( "AnimatedTexture", sFileKey, sFileName ) &&
|
||||||
ini.GetValueF( "AnimatedTexture", sDelayKey, fDelay ) )
|
ini.GetValue( "AnimatedTexture", sDelayKey, fDelay ) )
|
||||||
{
|
{
|
||||||
RageTextureID ID;
|
RageTextureID ID;
|
||||||
ID.filename = sDir+sFileName;
|
ID.filename = sDir+sFileName;
|
||||||
|
|||||||
@@ -57,12 +57,12 @@ void PlayerAI::InitFromDisk()
|
|||||||
|
|
||||||
TapScoreDistribution& dist = g_Distributions[i];
|
TapScoreDistribution& dist = g_Distributions[i];
|
||||||
dist.fPercent[TNS_NONE] = 0;
|
dist.fPercent[TNS_NONE] = 0;
|
||||||
ini.GetValueF( sKey, "MissWeight", dist.fPercent[TNS_MISS] );
|
ini.GetValue ( sKey, "MissWeight", dist.fPercent[TNS_MISS] );
|
||||||
ini.GetValueF( sKey, "BooWeight", dist.fPercent[TNS_BOO] );
|
ini.GetValue ( sKey, "BooWeight", dist.fPercent[TNS_BOO] );
|
||||||
ini.GetValueF( sKey, "GoodWeight", dist.fPercent[TNS_GOOD] );
|
ini.GetValue ( sKey, "GoodWeight", dist.fPercent[TNS_GOOD] );
|
||||||
ini.GetValueF( sKey, "GreatWeight", dist.fPercent[TNS_GREAT] );
|
ini.GetValue ( sKey, "GreatWeight", dist.fPercent[TNS_GREAT] );
|
||||||
ini.GetValueF( sKey, "PerfectWeight", dist.fPercent[TNS_PERFECT] );
|
ini.GetValue ( sKey, "PerfectWeight", dist.fPercent[TNS_PERFECT] );
|
||||||
ini.GetValueF( sKey, "MarvelousWeight", dist.fPercent[TNS_MARVELOUS] );
|
ini.GetValue ( sKey, "MarvelousWeight", dist.fPercent[TNS_MARVELOUS] );
|
||||||
|
|
||||||
float fSum = 0;
|
float fSum = 0;
|
||||||
int j;
|
int j;
|
||||||
|
|||||||
@@ -176,109 +176,109 @@ void PrefsManager::ReadGlobalPrefsFromDisk( bool bSwitchToLastPlayedGame )
|
|||||||
if( !ini.ReadFile() )
|
if( !ini.ReadFile() )
|
||||||
return; // could not read config file, load nothing
|
return; // could not read config file, load nothing
|
||||||
|
|
||||||
ini.GetValueB( "Options", "Windowed", m_bWindowed );
|
ini.GetValue( "Options", "Windowed", m_bWindowed );
|
||||||
ini.GetValueB( "Options", "Interlaced", m_bInterlaced );
|
ini.GetValue( "Options", "Interlaced", m_bInterlaced );
|
||||||
#ifdef _XBOX
|
#ifdef _XBOX
|
||||||
ini.GetValueB( "Options", "PAL", m_bPAL );
|
ini.GetValue( "Options", "PAL", m_bPAL );
|
||||||
#endif
|
#endif
|
||||||
ini.GetValueI( "Options", "DisplayWidth", m_iDisplayWidth );
|
ini.GetValue( "Options", "DisplayWidth", m_iDisplayWidth );
|
||||||
ini.GetValueI( "Options", "DisplayHeight", m_iDisplayHeight );
|
ini.GetValue( "Options", "DisplayHeight", m_iDisplayHeight );
|
||||||
ini.GetValueI( "Options", "DisplayColorDepth", m_iDisplayColorDepth );
|
ini.GetValue( "Options", "DisplayColorDepth", m_iDisplayColorDepth );
|
||||||
ini.GetValueI( "Options", "TextureColorDepth", m_iTextureColorDepth );
|
ini.GetValue( "Options", "TextureColorDepth", m_iTextureColorDepth );
|
||||||
ini.GetValueI( "Options", "MovieColorDepth", m_iMovieColorDepth );
|
ini.GetValue( "Options", "MovieColorDepth", m_iMovieColorDepth );
|
||||||
ini.GetValueI( "Options", "MaxTextureResolution", m_iMaxTextureResolution );
|
ini.GetValue( "Options", "MaxTextureResolution", m_iMaxTextureResolution );
|
||||||
ini.GetValueI( "Options", "RefreshRate", m_iRefreshRate );
|
ini.GetValue( "Options", "RefreshRate", m_iRefreshRate );
|
||||||
ini.GetValueB( "Options", "UseDedicatedMenuButtons", m_bOnlyDedicatedMenuButtons );
|
ini.GetValue( "Options", "UseDedicatedMenuButtons", m_bOnlyDedicatedMenuButtons );
|
||||||
ini.GetValueB( "Options", "ShowStats", m_bShowStats );
|
ini.GetValue( "Options", "ShowStats", m_bShowStats );
|
||||||
ini.GetValueI( "Options", "BackgroundMode", (int&)m_BackgroundMode );
|
ini.GetValue( "Options", "BackgroundMode", (int&)m_BackgroundMode );
|
||||||
ini.GetValueI( "Options", "NumBackgrounds", m_iNumBackgrounds);
|
ini.GetValue( "Options", "NumBackgrounds", m_iNumBackgrounds);
|
||||||
ini.GetValueB( "Options", "ShowDanger", m_bShowDanger );
|
ini.GetValue( "Options", "ShowDanger", m_bShowDanger );
|
||||||
ini.GetValueF( "Options", "BGBrightness", m_fBGBrightness );
|
ini.GetValue( "Options", "BGBrightness", m_fBGBrightness );
|
||||||
ini.GetValueB( "Options", "MenuTimer", m_bMenuTimer );
|
ini.GetValue( "Options", "MenuTimer", m_bMenuTimer );
|
||||||
ini.GetValueI( "Options", "NumArcadeStages", m_iNumArcadeStages );
|
ini.GetValue( "Options", "NumArcadeStages", m_iNumArcadeStages );
|
||||||
ini.GetValueB( "Options", "EventMode", m_bEventMode );
|
ini.GetValue( "Options", "EventMode", m_bEventMode );
|
||||||
ini.GetValueB( "Options", "AutoPlay", m_bAutoPlay );
|
ini.GetValue( "Options", "AutoPlay", m_bAutoPlay );
|
||||||
ini.GetValueF( "Options", "JudgeWindowScale", m_fJudgeWindowScale );
|
ini.GetValue( "Options", "JudgeWindowScale", m_fJudgeWindowScale );
|
||||||
ini.GetValueF( "Options", "JudgeWindowMarvelousSeconds", m_fJudgeWindowMarvelousSeconds );
|
ini.GetValue( "Options", "JudgeWindowMarvelousSeconds", m_fJudgeWindowMarvelousSeconds );
|
||||||
ini.GetValueF( "Options", "JudgeWindowPerfectSeconds", m_fJudgeWindowPerfectSeconds );
|
ini.GetValue( "Options", "JudgeWindowPerfectSeconds", m_fJudgeWindowPerfectSeconds );
|
||||||
ini.GetValueF( "Options", "JudgeWindowGreatSeconds", m_fJudgeWindowGreatSeconds );
|
ini.GetValue( "Options", "JudgeWindowGreatSeconds", m_fJudgeWindowGreatSeconds );
|
||||||
ini.GetValueF( "Options", "JudgeWindowGoodSeconds", m_fJudgeWindowGoodSeconds );
|
ini.GetValue( "Options", "JudgeWindowGoodSeconds", m_fJudgeWindowGoodSeconds );
|
||||||
ini.GetValueF( "Options", "JudgeWindowBooSeconds", m_fJudgeWindowBooSeconds );
|
ini.GetValue( "Options", "JudgeWindowBooSeconds", m_fJudgeWindowBooSeconds );
|
||||||
ini.GetValueF( "Options", "JudgeWindowOKSeconds", m_fJudgeWindowOKSeconds );
|
ini.GetValue( "Options", "JudgeWindowOKSeconds", m_fJudgeWindowOKSeconds );
|
||||||
ini.GetValueF( "Options", "LifeDifficultyScale", m_fLifeDifficultyScale );
|
ini.GetValue( "Options", "LifeDifficultyScale", m_fLifeDifficultyScale );
|
||||||
ini.GetValueI( "Options", "MovieDecodeMS", m_iMovieDecodeMS );
|
ini.GetValue( "Options", "MovieDecodeMS", m_iMovieDecodeMS );
|
||||||
ini.GetValueB( "Options", "DelayedEscape", m_bDelayedEscape );
|
ini.GetValue( "Options", "DelayedEscape", m_bDelayedEscape );
|
||||||
ini.GetValueB( "Options", "HiddenSongs", m_bHiddenSongs );
|
ini.GetValue( "Options", "HiddenSongs", m_bHiddenSongs );
|
||||||
ini.GetValueB( "Options", "Vsync", m_bVsync );
|
ini.GetValue( "Options", "Vsync", m_bVsync );
|
||||||
ini.GetValueB( "Options", "HowToPlay", m_bInstructions );
|
ini.GetValue( "Options", "HowToPlay", m_bInstructions );
|
||||||
ini.GetValueB( "Options", "Caution", m_bShowDontDie );
|
ini.GetValue( "Options", "Caution", m_bShowDontDie );
|
||||||
ini.GetValueB( "Options", "ShowSelectGroup", m_bShowSelectGroup );
|
ini.GetValue( "Options", "ShowSelectGroup", m_bShowSelectGroup );
|
||||||
ini.GetValueB( "Options", "ShowNative", m_bShowNative );
|
ini.GetValue( "Options", "ShowNative", m_bShowNative );
|
||||||
ini.GetValueB( "Options", "ArcadeOptionsNavigation", m_bArcadeOptionsNavigation );
|
ini.GetValue( "Options", "ArcadeOptionsNavigation", m_bArcadeOptionsNavigation );
|
||||||
ini.GetValue( "Options", "DWIPath", m_DWIPath );
|
ini.GetValue( "Options", "DWIPath", m_DWIPath );
|
||||||
ini.GetValueB( "Options", "DelayedTextureDelete", m_bDelayedTextureDelete );
|
ini.GetValue( "Options", "DelayedTextureDelete", m_bDelayedTextureDelete );
|
||||||
ini.GetValueB( "Options", "DelayedScreenLoad", m_bDelayedScreenLoad );
|
ini.GetValue( "Options", "DelayedScreenLoad", m_bDelayedScreenLoad );
|
||||||
ini.GetValueB( "Options", "BannerCache", m_bBannerCache );
|
ini.GetValue( "Options", "BannerCache", m_bBannerCache );
|
||||||
ini.GetValueI( "Options", "MusicWheelUsesSections", (int&)m_MusicWheelUsesSections );
|
ini.GetValue( "Options", "MusicWheelUsesSections", (int&)m_MusicWheelUsesSections );
|
||||||
ini.GetValueI( "Options", "MusicWheelSwitchSpeed", m_iMusicWheelSwitchSpeed );
|
ini.GetValue( "Options", "MusicWheelSwitchSpeed", m_iMusicWheelSwitchSpeed );
|
||||||
ini.GetValue( "Options", "SoundDrivers", m_sSoundDrivers );
|
ini.GetValue( "Options", "SoundDrivers", m_sSoundDrivers );
|
||||||
ini.GetValue( "Options", "MovieDrivers", m_sMovieDrivers );
|
ini.GetValue( "Options", "MovieDrivers", m_sMovieDrivers );
|
||||||
ini.GetValueB( "Options", "EasterEggs", m_bEasterEggs );
|
ini.GetValue( "Options", "EasterEggs", m_bEasterEggs );
|
||||||
ini.GetValueI( "Options", "MarvelousTiming", (int&)m_iMarvelousTiming );
|
ini.GetValue( "Options", "MarvelousTiming", (int&)m_iMarvelousTiming );
|
||||||
ini.GetValueF( "Options", "SoundVolume", m_fSoundVolume );
|
ini.GetValue( "Options", "SoundVolume", m_fSoundVolume );
|
||||||
ini.GetValueB( "Options", "SoundPreloadAll", m_bSoundPreloadAll );
|
ini.GetValue( "Options", "SoundPreloadAll", m_bSoundPreloadAll );
|
||||||
ini.GetValueI( "Options", "SoundResampleQuality", m_iSoundResampleQuality );
|
ini.GetValue( "Options", "SoundResampleQuality", m_iSoundResampleQuality );
|
||||||
ini.GetValueI( "Options", "CoinMode", m_iCoinMode );
|
ini.GetValue( "Options", "CoinMode", m_iCoinMode );
|
||||||
ini.GetValueI( "Options", "CoinsPerCredit", m_iCoinsPerCredit );
|
ini.GetValue( "Options", "CoinsPerCredit", m_iCoinsPerCredit );
|
||||||
ini.GetValueB( "Options", "JointPremium", m_bJointPremium );
|
ini.GetValue( "Options", "JointPremium", m_bJointPremium );
|
||||||
ini.GetValueI( "Options", "BoostAppPriority", m_iBoostAppPriority );
|
ini.GetValue( "Options", "BoostAppPriority", m_iBoostAppPriority );
|
||||||
ini.GetValueB( "Options", "PickExtraStage", m_bPickExtraStage );
|
ini.GetValue( "Options", "PickExtraStage", m_bPickExtraStage );
|
||||||
ini.GetValueB( "Options", "ComboContinuesBetweenSongs", m_bComboContinuesBetweenSongs );
|
ini.GetValue( "Options", "ComboContinuesBetweenSongs", m_bComboContinuesBetweenSongs );
|
||||||
ini.GetValueF( "Options", "LongVerSeconds", m_fLongVerSongSeconds );
|
ini.GetValue( "Options", "LongVerSeconds", m_fLongVerSongSeconds );
|
||||||
ini.GetValueF( "Options", "MarathonVerSeconds", m_fMarathonVerSongSeconds );
|
ini.GetValue( "Options", "MarathonVerSeconds", m_fMarathonVerSongSeconds );
|
||||||
ini.GetValueI( "Options", "ShowSongOptions", (int&)m_ShowSongOptions );
|
ini.GetValue( "Options", "ShowSongOptions", (int&)m_ShowSongOptions );
|
||||||
ini.GetValueB( "Options", "AllowUnacceleratedRenderer", m_bAllowUnacceleratedRenderer );
|
ini.GetValue( "Options", "AllowUnacceleratedRenderer", m_bAllowUnacceleratedRenderer );
|
||||||
ini.GetValueB( "Options", "ThreadedInput", m_bThreadedInput );
|
ini.GetValue( "Options", "ThreadedInput", m_bThreadedInput );
|
||||||
ini.GetValue( "Options", "IgnoredMessageWindows", m_sIgnoredMessageWindows );
|
ini.GetValue( "Options", "IgnoredMessageWindows", m_sIgnoredMessageWindows );
|
||||||
ini.GetValueB( "Options", "SoloSingle", m_bSoloSingle );
|
ini.GetValue( "Options", "SoloSingle", m_bSoloSingle );
|
||||||
ini.GetValueB( "Options", "DancePointsForOni", m_bDancePointsForOni );
|
ini.GetValue( "Options", "DancePointsForOni", m_bDancePointsForOni );
|
||||||
ini.GetValueB( "Options", "ShowLyrics", m_bShowLyrics );
|
ini.GetValue( "Options", "ShowLyrics", m_bShowLyrics );
|
||||||
ini.GetValueB( "Options", "AutogenMissingTypes", m_bAutogenMissingTypes );
|
ini.GetValue( "Options", "AutogenMissingTypes", m_bAutogenMissingTypes );
|
||||||
ini.GetValueB( "Options", "AutogenGroupCourses", m_bAutogenGroupCourses );
|
ini.GetValue( "Options", "AutogenGroupCourses", m_bAutogenGroupCourses );
|
||||||
ini.GetValueB( "Options", "Timestamping", m_bTimestamping );
|
ini.GetValue( "Options", "Timestamping", m_bTimestamping );
|
||||||
ini.GetValueB( "Options", "BreakComboToGetItem", m_bBreakComboToGetItem );
|
ini.GetValue( "Options", "BreakComboToGetItem", m_bBreakComboToGetItem );
|
||||||
ini.GetValueI( "Options", "ShowDancingCharacters", (int&)m_ShowDancingCharacters );
|
ini.GetValue( "Options", "ShowDancingCharacters", (int&)m_ShowDancingCharacters );
|
||||||
ini.GetValueB( "Options", "TenFooterInRed", m_bTenFooterInRed );
|
ini.GetValue( "Options", "TenFooterInRed", m_bTenFooterInRed );
|
||||||
|
|
||||||
ini.GetValueI( "Options", "CourseSortOrder", (int&)m_iCourseSortOrder );
|
ini.GetValue( "Options", "CourseSortOrder", (int&)m_iCourseSortOrder );
|
||||||
ini.GetValueB( "Options", "MoveRandomToEnd", m_bMoveRandomToEnd );
|
ini.GetValue( "Options", "MoveRandomToEnd", m_bMoveRandomToEnd );
|
||||||
|
|
||||||
ini.GetValueI( "Options", "ScoringType", (int&)m_iScoringType );
|
ini.GetValue( "Options", "ScoringType", (int&)m_iScoringType );
|
||||||
|
|
||||||
ini.GetValueI( "Options", "ProgressiveLifebar", (int&)m_iProgressiveLifebar );
|
ini.GetValue( "Options", "ProgressiveLifebar", m_iProgressiveLifebar );
|
||||||
ini.GetValueI( "Options", "ProgressiveNonstopLifebar", (int&)m_iProgressiveNonstopLifebar );
|
ini.GetValue( "Options", "ProgressiveNonstopLifebar", m_iProgressiveNonstopLifebar );
|
||||||
ini.GetValueI( "Options", "ProgressiveStageLifebar", (int&)m_iProgressiveStageLifebar );
|
ini.GetValue( "Options", "ProgressiveStageLifebar", m_iProgressiveStageLifebar );
|
||||||
|
|
||||||
ini.GetValueB( "Options", "UseUnlockSystem", m_bUseUnlockSystem );
|
ini.GetValue( "Options", "UseUnlockSystem", m_bUseUnlockSystem );
|
||||||
|
|
||||||
ini.GetValueB( "Options", "FirstRun", m_bFirstRun );
|
ini.GetValue( "Options", "FirstRun", m_bFirstRun );
|
||||||
ini.GetValueB( "Options", "AutoMapJoysticks", m_bAutoMapJoysticks );
|
ini.GetValue( "Options", "AutoMapJoysticks", m_bAutoMapJoysticks );
|
||||||
ini.GetValue( "Options", "VideoRenderers", m_sVideoRenderers );
|
ini.GetValue( "Options", "VideoRenderers", m_sVideoRenderers );
|
||||||
ini.GetValue( "Options", "LastSeenVideoDriver", m_sLastSeenVideoDriver );
|
ini.GetValue( "Options", "LastSeenVideoDriver", m_sLastSeenVideoDriver );
|
||||||
#if defined(WIN32)
|
#if defined(WIN32)
|
||||||
ini.GetValue( "Options", "LastSeenMemory", m_iLastSeenMemory );
|
ini.GetValue( "Options", "LastSeenMemory", m_iLastSeenMemory );
|
||||||
#endif
|
#endif
|
||||||
ini.GetValue( "Options", "CoursesToShowRanking", m_sCoursesToShowRanking );
|
ini.GetValue( "Options", "CoursesToShowRanking", m_sCoursesToShowRanking );
|
||||||
ini.GetValueB( "Options", "AntiAliasing", m_bAntiAliasing );
|
ini.GetValue( "Options", "AntiAliasing", m_bAntiAliasing );
|
||||||
ini.GetValueF( "Options", "GlobalOffsetSeconds", m_fGlobalOffsetSeconds );
|
ini.GetValue( "Options", "GlobalOffsetSeconds", m_fGlobalOffsetSeconds );
|
||||||
ini.GetValueB( "Options", "ForceLogFlush", m_bForceLogFlush );
|
ini.GetValue( "Options", "ForceLogFlush", m_bForceLogFlush );
|
||||||
ini.GetValueB( "Options", "Logging", m_bLogging );
|
ini.GetValue( "Options", "Logging", m_bLogging );
|
||||||
ini.GetValueB( "Options", "ShowLogWindow", m_bShowLogWindow );
|
ini.GetValue( "Options", "ShowLogWindow", m_bShowLogWindow );
|
||||||
ini.GetValueB( "Options", "ShowBeginnerHelper", m_bShowBeginnerHelper );
|
ini.GetValue( "Options", "ShowBeginnerHelper", m_bShowBeginnerHelper );
|
||||||
ini.GetValue( "Options", "Language", m_sLanguage );
|
ini.GetValue( "Options", "Language", m_sLanguage );
|
||||||
ini.GetValueB( "Options", "EndlessBreakEnabled", m_bEndlessBreakEnabled );
|
ini.GetValue( "Options", "EndlessBreakEnabled", m_bEndlessBreakEnabled );
|
||||||
ini.GetValueI( "Options", "EndlessStagesUntilBreak", m_iEndlessNumStagesUntilBreak );
|
ini.GetValue( "Options", "EndlessStagesUntilBreak", m_iEndlessNumStagesUntilBreak );
|
||||||
ini.GetValueI( "Options", "EndlessBreakLength", m_iEndlessBreakLength );
|
ini.GetValue( "Options", "EndlessBreakLength", m_iEndlessBreakLength );
|
||||||
|
|
||||||
for( int p=0; p<NUM_PLAYERS; p++ )
|
for( int p=0; p<NUM_PLAYERS; p++ )
|
||||||
ini.GetValue( "Options", ssprintf("DefaultProfileP%d",p+1), m_sDefaultProfile[p] );
|
ini.GetValue( "Options", ssprintf("DefaultProfileP%d",p+1), m_sDefaultProfile[p] );
|
||||||
@@ -292,7 +292,7 @@ void PrefsManager::ReadGlobalPrefsFromDisk( bool bSwitchToLastPlayedGame )
|
|||||||
if( bSwitchToLastPlayedGame )
|
if( bSwitchToLastPlayedGame )
|
||||||
{
|
{
|
||||||
Game game;
|
Game game;
|
||||||
if( ini.GetValueI("Options", "Game", (int&)game) )
|
if( ini.GetValue("Options", "Game", (int&)game) )
|
||||||
GAMESTATE->m_CurGame = game;
|
GAMESTATE->m_CurGame = game;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -40,7 +40,7 @@ void SongCacheIndex::ReadCacheIndex()
|
|||||||
CacheIndex.ReadFile(); // don't care if this fails
|
CacheIndex.ReadFile(); // don't care if this fails
|
||||||
|
|
||||||
int iCacheVersion;
|
int iCacheVersion;
|
||||||
CacheIndex.GetValueI( "Cache", "CacheVersion", iCacheVersion );
|
CacheIndex.GetValue( "Cache", "CacheVersion", iCacheVersion );
|
||||||
if( iCacheVersion == FILE_CACHE_VERSION )
|
if( iCacheVersion == FILE_CACHE_VERSION )
|
||||||
return; /* OK */
|
return; /* OK */
|
||||||
|
|
||||||
@@ -62,7 +62,7 @@ void SongCacheIndex::AddCacheIndex(const CString &path, unsigned hash)
|
|||||||
unsigned SongCacheIndex::GetCacheHash( const CString &path ) const
|
unsigned SongCacheIndex::GetCacheHash( const CString &path ) const
|
||||||
{
|
{
|
||||||
unsigned iDirHash;
|
unsigned iDirHash;
|
||||||
CacheIndex.GetValueU( "Cache", MangleName(path), iDirHash );
|
CacheIndex.GetValue( "Cache", MangleName(path), iDirHash );
|
||||||
return iDirHash;
|
return iDirHash;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -132,13 +132,13 @@ bool Sprite::LoadFromSpriteFile( RageTextureID ID )
|
|||||||
CString sDelayKey = ssprintf( "Delay%04d", i );
|
CString sDelayKey = ssprintf( "Delay%04d", i );
|
||||||
State newState;
|
State newState;
|
||||||
|
|
||||||
if( !ini.GetValueI( "Sprite", sFrameKey, newState.iFrameIndex ) )
|
if( !ini.GetValue( "Sprite", sFrameKey, newState.iFrameIndex ) )
|
||||||
break;
|
break;
|
||||||
if( newState.iFrameIndex >= m_pTexture->GetNumFrames() )
|
if( newState.iFrameIndex >= m_pTexture->GetNumFrames() )
|
||||||
RageException::Throw( "In '%s', %s is %d, but the texture %s only has %d frames.",
|
RageException::Throw( "In '%s', %s is %d, but the texture %s only has %d frames.",
|
||||||
m_sSpritePath.c_str(), sFrameKey.c_str(), newState.iFrameIndex, ID.filename.c_str(), m_pTexture->GetNumFrames() );
|
m_sSpritePath.c_str(), sFrameKey.c_str(), newState.iFrameIndex, ID.filename.c_str(), m_pTexture->GetNumFrames() );
|
||||||
|
|
||||||
if( !ini.GetValueF( "Sprite", sDelayKey, newState.fDelay ) )
|
if( !ini.GetValue( "Sprite", sDelayKey, newState.fDelay ) )
|
||||||
break;
|
break;
|
||||||
|
|
||||||
if( i == 0 ) // the ini file defines at least one frame
|
if( i == 0 ) // the ini file defines at least one frame
|
||||||
@@ -148,12 +148,12 @@ bool Sprite::LoadFromSpriteFile( RageTextureID ID )
|
|||||||
}
|
}
|
||||||
|
|
||||||
float f;
|
float f;
|
||||||
if( ini.GetValueF( "Sprite", "BaseRotationXDegrees", f ) ) Actor::SetBaseRotationX( f );
|
if( ini.GetValue( "Sprite", "BaseRotationXDegrees", f ) ) Actor::SetBaseRotationX( f );
|
||||||
if( ini.GetValueF( "Sprite", "BaseRotationYDegrees", f ) ) Actor::SetBaseRotationY( f );
|
if( ini.GetValue( "Sprite", "BaseRotationYDegrees", f ) ) Actor::SetBaseRotationY( f );
|
||||||
if( ini.GetValueF( "Sprite", "BaseRotationZDegrees", f ) ) Actor::SetBaseRotationZ( f );
|
if( ini.GetValue( "Sprite", "BaseRotationZDegrees", f ) ) Actor::SetBaseRotationZ( f );
|
||||||
if( ini.GetValueF( "Sprite", "BaseZoomX", f ) ) Actor::SetBaseZoomX( f );
|
if( ini.GetValue( "Sprite", "BaseZoomX", f ) ) Actor::SetBaseZoomX( f );
|
||||||
if( ini.GetValueF( "Sprite", "BaseZoomY", f ) ) Actor::SetBaseZoomY( f );
|
if( ini.GetValue( "Sprite", "BaseZoomY", f ) ) Actor::SetBaseZoomY( f );
|
||||||
if( ini.GetValueF( "Sprite", "BaseZoomZ", f ) ) Actor::SetBaseZoomZ( f );
|
if( ini.GetValue( "Sprite", "BaseZoomZ", f ) ) Actor::SetBaseZoomZ( f );
|
||||||
|
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
|
|||||||
@@ -68,7 +68,9 @@ Grade StageStats::GetGrade( PlayerNumber pn )
|
|||||||
return GRADE_E;
|
return GRADE_E;
|
||||||
|
|
||||||
/* XXX: This entire calculation should be in ScoreKeeper, but final evaluation
|
/* XXX: This entire calculation should be in ScoreKeeper, but final evaluation
|
||||||
* is tricky since at that point the ScoreKeepers no longer exist. */
|
* is tricky since at that point the ScoreKeepers no longer exist.
|
||||||
|
*
|
||||||
|
* See http://www.aaroninjapan.com/ddr2.html ("Regular play scoring") */
|
||||||
const float TapScoreValues[NUM_TAP_NOTE_SCORES] = { 0, -8, -4, 0, +1, +2, +2 };
|
const float TapScoreValues[NUM_TAP_NOTE_SCORES] = { 0, -8, -4, 0, +1, +2, +2 };
|
||||||
const float HoldScoreValues[NUM_HOLD_NOTE_SCORES] = { 0, 0, +6 };
|
const float HoldScoreValues[NUM_HOLD_NOTE_SCORES] = { 0, 0, +6 };
|
||||||
|
|
||||||
|
|||||||
@@ -395,12 +395,12 @@ static void CheckVideoDefaultSettings()
|
|||||||
if( SetDefaultVideoParams )
|
if( SetDefaultVideoParams )
|
||||||
{
|
{
|
||||||
ini.GetValue( sKey, "Renderers", PREFSMAN->m_sVideoRenderers );
|
ini.GetValue( sKey, "Renderers", PREFSMAN->m_sVideoRenderers );
|
||||||
ini.GetValueI( sKey, "Width", PREFSMAN->m_iDisplayWidth );
|
ini.GetValue( sKey, "Width", PREFSMAN->m_iDisplayWidth );
|
||||||
ini.GetValueI( sKey, "Height", PREFSMAN->m_iDisplayHeight );
|
ini.GetValue( sKey, "Height", PREFSMAN->m_iDisplayHeight );
|
||||||
ini.GetValueI( sKey, "DisplayColor", PREFSMAN->m_iDisplayColorDepth );
|
ini.GetValue( sKey, "DisplayColor", PREFSMAN->m_iDisplayColorDepth );
|
||||||
ini.GetValueI( sKey, "TextureColor", PREFSMAN->m_iTextureColorDepth );
|
ini.GetValue( sKey, "TextureColor", PREFSMAN->m_iTextureColorDepth );
|
||||||
ini.GetValueI( sKey, "MovieColor", PREFSMAN->m_iMovieColorDepth );
|
ini.GetValue( sKey, "MovieColor", PREFSMAN->m_iMovieColorDepth );
|
||||||
ini.GetValueB( sKey, "AntiAliasing", PREFSMAN->m_bAntiAliasing );
|
ini.GetValue( sKey, "AntiAliasing", PREFSMAN->m_bAntiAliasing );
|
||||||
|
|
||||||
// Update last seen video card
|
// Update last seen video card
|
||||||
PREFSMAN->m_sLastSeenVideoDriver = GetVideoDriverName();
|
PREFSMAN->m_sLastSeenVideoDriver = GetVideoDriverName();
|
||||||
|
|||||||
@@ -387,13 +387,13 @@ bool UnlockSystem::ReadValues( CString filename)
|
|||||||
if (!data.ReadFile())
|
if (!data.ReadFile())
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
data.GetValueF( "Unlock", "ArcadePointsAccumulated", ArcadePoints );
|
data.GetValue ( "Unlock", "ArcadePointsAccumulated", ArcadePoints );
|
||||||
data.GetValueF( "Unlock", "DancePointsAccumulated", DancePoints );
|
data.GetValue ( "Unlock", "DancePointsAccumulated", DancePoints );
|
||||||
data.GetValueF( "Unlock", "SongPointsAccumulated", SongPoints );
|
data.GetValue ( "Unlock", "SongPointsAccumulated", SongPoints );
|
||||||
data.GetValueF( "Unlock", "ExtraStagesCleared", ExtraClearPoints );
|
data.GetValue ( "Unlock", "ExtraStagesCleared", ExtraClearPoints );
|
||||||
data.GetValueF( "Unlock", "ExtraStagesFailed", ExtraFailPoints );
|
data.GetValue ( "Unlock", "ExtraStagesFailed", ExtraFailPoints );
|
||||||
data.GetValueF( "Unlock", "TotalStagesCleared", StagesCleared );
|
data.GetValue ( "Unlock", "TotalStagesCleared", StagesCleared );
|
||||||
data.GetValueF( "Unlock", "TotalToastysSeen", ToastyPoints );
|
data.GetValue ( "Unlock", "TotalToastysSeen", ToastyPoints );
|
||||||
data.GetValue ( "Unlock", "RouletteSeeds", RouletteSeeds );
|
data.GetValue ( "Unlock", "RouletteSeeds", RouletteSeeds );
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
|
|||||||
Reference in New Issue
Block a user