GAAAH.
undo commit caused by annoying windows CVS client.
This commit is contained in:
@@ -176,7 +176,7 @@ void LifeMeterBattery::Refresh()
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
m_textNumLives.SetText( ssprintf("%d", m_iLivesLeft) );
|
m_textNumLives.SetText( ssprintf("x%d", m_iLivesLeft) );
|
||||||
m_sprBattery.SetState( 3 );
|
m_sprBattery.SetState( 3 );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -41,6 +41,7 @@ const int MAX_NUM_VERTICIES = MAX_NUM_QUADS*4; // 4 verticies per quad
|
|||||||
// verticies and not indexing. In fact, drawing indexed primitives is about 30% slower.
|
// verticies and not indexing. In fact, drawing indexed primitives is about 30% slower.
|
||||||
//
|
//
|
||||||
|
|
||||||
|
|
||||||
class RageDisplay
|
class RageDisplay
|
||||||
{
|
{
|
||||||
friend class RageTexture;
|
friend class RageTexture;
|
||||||
|
|||||||
@@ -16,7 +16,7 @@
|
|||||||
#pragma comment(lib, "dinput8.lib")
|
#pragma comment(lib, "dinput8.lib")
|
||||||
#pragma comment(lib, "dxguid.lib")
|
#pragma comment(lib, "dxguid.lib")
|
||||||
|
|
||||||
#define HAVE_DDK
|
//#define HAVE_DDK
|
||||||
#ifdef HAVE_DDK
|
#ifdef HAVE_DDK
|
||||||
#pragma comment(lib, "setupapi.lib")
|
#pragma comment(lib, "setupapi.lib")
|
||||||
#pragma comment(lib, "hid.lib")
|
#pragma comment(lib, "hid.lib")
|
||||||
|
|||||||
@@ -102,7 +102,6 @@ void RageLog::Warn( const char *fmt, ...)
|
|||||||
"WARNING: %s\n"
|
"WARNING: %s\n"
|
||||||
"/////////////////////////////////////////",
|
"/////////////////////////////////////////",
|
||||||
sBuff );
|
sBuff );
|
||||||
warnings.Add( sBuff );
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void RageLog::Flush()
|
void RageLog::Flush()
|
||||||
|
|||||||
@@ -30,10 +30,6 @@ public:
|
|||||||
|
|
||||||
protected:
|
protected:
|
||||||
FILE* m_fileLog;
|
FILE* m_fileLog;
|
||||||
/* Let's keep a list of all warnings, so we can display them later.
|
|
||||||
* We could write this to a file, instead, but for now let's not
|
|
||||||
* clutter the top dir ... */
|
|
||||||
CStringArray warnings;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
extern RageLog* LOG; // global and accessable from anywhere in our program
|
extern RageLog* LOG; // global and accessable from anywhere in our program
|
||||||
|
|||||||
@@ -17,19 +17,11 @@
|
|||||||
#include "RageException.h"
|
#include "RageException.h"
|
||||||
|
|
||||||
|
|
||||||
RageSound* SOUND = NULL;
|
#include "bass/bass.h"
|
||||||
|
|
||||||
#if 0
|
|
||||||
RageSound::RageSound( HWND hWnd ) { }
|
|
||||||
RageSound::~RageSound() { }
|
|
||||||
void RageSound::PlayOnceStreamed( CString sPath ) { }
|
|
||||||
void RageSound::PlayOnceStreamedFromDir( CString sDir ) { }
|
|
||||||
#else
|
|
||||||
|
|
||||||
#pragma comment(lib, "bass/bass.lib")
|
#pragma comment(lib, "bass/bass.lib")
|
||||||
|
|
||||||
#include "bass/bass.h"
|
|
||||||
|
|
||||||
|
RageSound* SOUND = NULL;
|
||||||
|
|
||||||
|
|
||||||
RageSound::RageSound( HWND hWnd )
|
RageSound::RageSound( HWND hWnd )
|
||||||
@@ -121,4 +113,3 @@ void RageSound::PlayOnceStreamedFromDir( CString sDir )
|
|||||||
PlayOnceStreamed( sDir + arraySoundFiles[index] );
|
PlayOnceStreamed( sDir + arraySoundFiles[index] );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
|||||||
@@ -83,58 +83,19 @@ ScreenGraphicOptions::ScreenGraphicOptions() :
|
|||||||
MUSIC->LoadAndPlayIfNotAlready( THEME->GetPathTo("Sounds","graphic options music") );
|
MUSIC->LoadAndPlayIfNotAlready( THEME->GetPathTo("Sounds","graphic options music") );
|
||||||
}
|
}
|
||||||
|
|
||||||
int ScreenGraphicOptions::CurrentRefresh() const
|
|
||||||
{
|
|
||||||
int RefreshOption = m_iSelectedOption[0][GO_REFRESH_RATE];
|
|
||||||
switch( RefreshOption )
|
|
||||||
{
|
|
||||||
case 0: return RageDisplay::REFRESH_DEFAULT;break;
|
|
||||||
case 1: return RageDisplay::REFRESH_MAX; break;
|
|
||||||
default:
|
|
||||||
return atoi( g_GraphicOptionsLines[GO_REFRESH_RATE].szOptionsText[RefreshOption] );
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void ScreenGraphicOptions::UpdateRefreshRates()
|
void ScreenGraphicOptions::UpdateRefreshRates()
|
||||||
{
|
{
|
||||||
#if 0
|
|
||||||
CArray<int,int> hz;
|
CArray<int,int> hz;
|
||||||
|
|
||||||
int OldSetting = CurrentRefresh();
|
|
||||||
|
|
||||||
/* XXX: We're hardcoded to 16bpp in StepMania.cpp; if we add a bpp option
|
/* XXX: We're hardcoded to 16bpp in StepMania.cpp; if we add a bpp option
|
||||||
* this needs to be changed. */
|
* this needs to be changed. */
|
||||||
DISPLAY->GetHzAtResolution(HorizRes[m_iSelectedOption[0][GO_DISPLAY_RESOLUTION]],
|
DISPLAY->GetHzAtResolution(HorizRes[m_iSelectedOption[0][GO_DISPLAY_RESOLUTION]],
|
||||||
VertRes[m_iSelectedOption[0][GO_DISPLAY_RESOLUTION]], 16 /* XXX */, hz);
|
VertRes[m_iSelectedOption[0][GO_DISPLAY_RESOLUTION]], 16 /* XXX */, hz);
|
||||||
|
|
||||||
/* Set the refresh to default. If we can find the old selection in the
|
|
||||||
* new data, we'll set it to that later. */
|
|
||||||
|
|
||||||
int i;
|
|
||||||
OptionRowData &opt = g_GraphicOptionsLines[GO_REFRESH_RATE];
|
|
||||||
opt.iNumOptions = 2;
|
|
||||||
int OldSettingNo = RageDisplay::REFRESH_DEFAULT;
|
|
||||||
|
|
||||||
for(i = 2; i < MAX_OPTIONS_PER_LINE; ++i)
|
|
||||||
opt.szOptionsText[i][0] = 0;
|
|
||||||
|
|
||||||
for(i = 0; i < hz.GetSize(); ++i)
|
|
||||||
{
|
|
||||||
if(hz[i] < 60) continue;
|
|
||||||
sprintf(opt.szOptionsText[opt.iNumOptions], "%i", hz[i]);
|
|
||||||
opt.iNumOptions++;
|
|
||||||
if( hz[i] == OldSetting )
|
|
||||||
OldSettingNo = i;
|
|
||||||
}
|
|
||||||
|
|
||||||
m_iSelectedOption[0][GO_REFRESH_RATE] =
|
|
||||||
m_iSelectedOption[1][GO_REFRESH_RATE] = OldSettingNo;
|
|
||||||
|
|
||||||
InitOptionsText();
|
|
||||||
#endif
|
|
||||||
/* Disable all refresh rates (except DEFAULT/MAX). */
|
/* Disable all refresh rates (except DEFAULT/MAX). */
|
||||||
// for(i = 0; i < g_GraphicOptionsLines[GO_REFRESH_RATE].iNumOptions; ++i)
|
int i;
|
||||||
// DimOption(GO_REFRESH_RATE, i, true);
|
for(i = 0; i < g_GraphicOptionsLines[GO_REFRESH_RATE].iNumOptions; ++i)
|
||||||
|
DimOption(GO_REFRESH_RATE, i, true);
|
||||||
|
|
||||||
/* If we're windowed, leave all refresh rates dimmed, but don't
|
/* If we're windowed, leave all refresh rates dimmed, but don't
|
||||||
* change the actual selection. */
|
* change the actual selection. */
|
||||||
@@ -142,29 +103,29 @@ void ScreenGraphicOptions::UpdateRefreshRates()
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
/* Enable MAX and DEFAULT. */
|
/* Enable MAX and DEFAULT. */
|
||||||
// DimOption(GO_REFRESH_RATE, 0, false);
|
DimOption(GO_REFRESH_RATE, 0, false);
|
||||||
// DimOption(GO_REFRESH_RATE, 1, false);
|
DimOption(GO_REFRESH_RATE, 1, false);
|
||||||
|
|
||||||
/* Enable refresh rates. As we go, remember the highest
|
/* Enable refresh rates. As we go, remember the highest
|
||||||
* refresh found. */
|
* refresh found. */
|
||||||
/* for(i = 0; i < hz.GetSize(); ++i)
|
for(i = 0; i < hz.GetSize(); ++i)
|
||||||
{
|
{
|
||||||
for(int j = 1; j < g_GraphicOptionsLines[GO_REFRESH_RATE].iNumOptions; ++j)
|
for(int j = 1; j < g_GraphicOptionsLines[GO_REFRESH_RATE].iNumOptions; ++j)
|
||||||
{
|
{
|
||||||
if(atoi(g_GraphicOptionsLines[GO_REFRESH_RATE].szOptionsText[j]) != hz[i])
|
if(atoi(g_GraphicOptionsLines[GO_REFRESH_RATE].szOptionsText[j]) != hz[i])
|
||||||
continue;
|
continue;
|
||||||
*/
|
|
||||||
/* This refresh is available. */
|
/* This refresh is available. */
|
||||||
/* DimOption(GO_REFRESH_RATE, j, false);
|
DimOption(GO_REFRESH_RATE, j, false);
|
||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
*/ /* If current refresh is no longer valid, set it to default. */
|
/* If current refresh is no longer valid, set it to default. */
|
||||||
// int CurSel = m_iSelectedOption[0][GO_REFRESH_RATE];
|
int CurSel = m_iSelectedOption[0][GO_REFRESH_RATE];
|
||||||
// if(m_OptionDim[GO_REFRESH_RATE][CurSel])
|
if(m_OptionDim[GO_REFRESH_RATE][CurSel])
|
||||||
// m_iSelectedOption[0][GO_REFRESH_RATE] =
|
m_iSelectedOption[0][GO_REFRESH_RATE] =
|
||||||
// m_iSelectedOption[1][GO_REFRESH_RATE] = RageDisplay::REFRESH_DEFAULT;
|
m_iSelectedOption[1][GO_REFRESH_RATE] = RageDisplay::REFRESH_DEFAULT;
|
||||||
PositionUnderlines();
|
PositionUnderlines();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -215,7 +176,7 @@ void ScreenGraphicOptions::ImportOptions()
|
|||||||
}
|
}
|
||||||
|
|
||||||
m_iSelectedOption[0][GO_BGMODE] = PREFSMAN->m_BackgroundMode;
|
m_iSelectedOption[0][GO_BGMODE] = PREFSMAN->m_BackgroundMode;
|
||||||
m_iSelectedOption[0][GO_BGBRIGHTNESS] = int(roundf( PREFSMAN->m_fBGBrightness*10 ));
|
m_iSelectedOption[0][GO_BGBRIGHTNESS] = (int)( PREFSMAN->m_fBGBrightness*10+0.5f );
|
||||||
m_iSelectedOption[0][GO_MOVIEDECODEMS] = PREFSMAN->m_iMovieDecodeMS-1;
|
m_iSelectedOption[0][GO_MOVIEDECODEMS] = PREFSMAN->m_iMovieDecodeMS-1;
|
||||||
m_iSelectedOption[0][GO_BGIFNOBANNER] = PREFSMAN->m_bUseBGIfNoBanner ? 1:0;
|
m_iSelectedOption[0][GO_BGIFNOBANNER] = PREFSMAN->m_bUseBGIfNoBanner ? 1:0;
|
||||||
m_iSelectedOption[0][GO_VSYNC] = PREFSMAN->m_bVsync ? 1:0;
|
m_iSelectedOption[0][GO_VSYNC] = PREFSMAN->m_bVsync ? 1:0;
|
||||||
@@ -240,14 +201,20 @@ void ScreenGraphicOptions::ExportOptions()
|
|||||||
default: ASSERT(0); PREFSMAN->m_iTextureResolution = 512; break;
|
default: ASSERT(0); PREFSMAN->m_iTextureResolution = 512; break;
|
||||||
}
|
}
|
||||||
|
|
||||||
int RefreshOption = m_iSelectedOption[0][GO_REFRESH_RATE];
|
switch( m_iSelectedOption[0][GO_REFRESH_RATE] )
|
||||||
|
|
||||||
switch( RefreshOption )
|
|
||||||
{
|
{
|
||||||
case 0: PREFSMAN->m_iRefreshRate = RageDisplay::REFRESH_DEFAULT;break;
|
case 0: PREFSMAN->m_iRefreshRate = RageDisplay::REFRESH_DEFAULT;break;
|
||||||
case 1: PREFSMAN->m_iRefreshRate = RageDisplay::REFRESH_MAX; break;
|
case 1: PREFSMAN->m_iRefreshRate = RageDisplay::REFRESH_MAX; break;
|
||||||
default:
|
case 2: PREFSMAN->m_iRefreshRate = 60; break;
|
||||||
PREFSMAN->m_iRefreshRate = atoi( g_GraphicOptionsLines[GO_REFRESH_RATE].szOptionsText[RefreshOption] );
|
case 3: PREFSMAN->m_iRefreshRate = 70; break;
|
||||||
|
case 4: PREFSMAN->m_iRefreshRate = 72; break;
|
||||||
|
case 5: PREFSMAN->m_iRefreshRate = 75; break;
|
||||||
|
case 6: PREFSMAN->m_iRefreshRate = 80; break;
|
||||||
|
case 7: PREFSMAN->m_iRefreshRate = 85; break;
|
||||||
|
case 8: PREFSMAN->m_iRefreshRate = 90; break;
|
||||||
|
case 9: PREFSMAN->m_iRefreshRate = 100; break;
|
||||||
|
case 10:PREFSMAN->m_iRefreshRate = 120; break;
|
||||||
|
default: ASSERT(0); PREFSMAN->m_iRefreshRate = 0; break;
|
||||||
}
|
}
|
||||||
|
|
||||||
PREFSMAN->m_BackgroundMode = PrefsManager::BackgroundMode( m_iSelectedOption[0][GO_BGMODE] );
|
PREFSMAN->m_BackgroundMode = PrefsManager::BackgroundMode( m_iSelectedOption[0][GO_BGMODE] );
|
||||||
|
|||||||
@@ -8,10 +8,15 @@
|
|||||||
Chris Danford
|
Chris Danford
|
||||||
-----------------------------------------------------------------------------
|
-----------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
#ifndef SCREEN_GRAPHIC_OPTIONS_H
|
|
||||||
#define SCREEN_GRAPHIC_OPTIONS_H
|
|
||||||
|
|
||||||
|
#include "Screen.h"
|
||||||
#include "ScreenOptions.h"
|
#include "ScreenOptions.h"
|
||||||
|
#include "Sprite.h"
|
||||||
|
#include "BitmapText.h"
|
||||||
|
#include "RandomSample.h"
|
||||||
|
#include "TransitionFade.h"
|
||||||
|
#include "Quad.h"
|
||||||
|
|
||||||
|
|
||||||
class ScreenGraphicOptions : public ScreenOptions
|
class ScreenGraphicOptions : public ScreenOptions
|
||||||
{
|
{
|
||||||
@@ -27,7 +32,4 @@ private:
|
|||||||
|
|
||||||
void GoToNextState();
|
void GoToNextState();
|
||||||
void GoToPrevState();
|
void GoToPrevState();
|
||||||
int CurrentRefresh() const;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
|
||||||
Reference in New Issue
Block a user