Clean up three sets of warnings:
* Ensure all switches have a default when working with enums. * Match defined new[] calls with delete[] calls. * Respect variable initialization order.
This commit is contained in:
@@ -326,6 +326,8 @@ void ActorMultiVertex::DrawInternal( const AMV_TweenState *TS )
|
|||||||
DISPLAY->DrawSymmetricQuadStrip( &TS->vertices[FirstToDraw], NumToDraw );
|
DISPLAY->DrawSymmetricQuadStrip( &TS->vertices[FirstToDraw], NumToDraw );
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
default:
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
DISPLAY->SetEffectMode( EffectMode_Normal );
|
DISPLAY->SetEffectMode( EffectMode_Normal );
|
||||||
@@ -387,6 +389,8 @@ void ActorMultiVertex::SetVertsFromSplines()
|
|||||||
case DrawMode_LineStrip:
|
case DrawMode_LineStrip:
|
||||||
SetVertsFromSplinesInternal(1, 0);
|
SetVertsFromSplinesInternal(1, 0);
|
||||||
break;
|
break;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -553,6 +557,8 @@ void ActorMultiVertex::UpdateAnimationState(bool force_update)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#undef STATE_ID
|
#undef STATE_ID
|
||||||
|
|||||||
@@ -932,6 +932,8 @@ void NoteDataUtil::AutogenKickbox(const NoteData& in, NoteData& out, const Timin
|
|||||||
this_limb= prev_limb_used == left_fist ? right_fist : left_fist;
|
this_limb= prev_limb_used == left_fist ? right_fist : left_fist;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
size_t this_panel= prev_limb_panels[this_limb];
|
size_t this_panel= prev_limb_panels[this_limb];
|
||||||
if(panel_repeat_counts[this_limb] + 1 > panel_repeat_goals[this_limb])
|
if(panel_repeat_counts[this_limb] + 1 > panel_repeat_goals[this_limb])
|
||||||
@@ -1117,6 +1119,8 @@ void NoteDataUtil::CalculateRadarValues( const NoteData &in, float fSongSeconds,
|
|||||||
case TapNoteType_Fake:
|
case TapNoteType_Fake:
|
||||||
++out[RadarCategory_Fakes];
|
++out[RadarCategory_Fakes];
|
||||||
break;
|
break;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|||||||
@@ -373,6 +373,7 @@ void NoteDataWithScoring::GetActualRadarValues(const NoteData &in,
|
|||||||
state.mines_avoided+= (curr_note->result.tns == TNS_AvoidMine);
|
state.mines_avoided+= (curr_note->result.tns == TNS_AvoidMine);
|
||||||
break;
|
break;
|
||||||
case TapNoteType_Fake:
|
case TapNoteType_Fake:
|
||||||
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -360,6 +360,8 @@ void NoteColumnRenderArgs::spae_pos_for_beat(const PlayerState* player_state,
|
|||||||
case NCSM_Position:
|
case NCSM_Position:
|
||||||
pos_handler->EvalForBeat(song_beat, beat, sp_pos);
|
pos_handler->EvalForBeat(song_beat, beat, sp_pos);
|
||||||
break;
|
break;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
void NoteColumnRenderArgs::spae_zoom_for_beat(const PlayerState* state, float beat,
|
void NoteColumnRenderArgs::spae_zoom_for_beat(const PlayerState* state, float beat,
|
||||||
@@ -377,6 +379,8 @@ void NoteColumnRenderArgs::spae_zoom_for_beat(const PlayerState* state, float be
|
|||||||
case NCSM_Position:
|
case NCSM_Position:
|
||||||
zoom_handler->EvalForBeat(song_beat, beat, sp_zoom);
|
zoom_handler->EvalForBeat(song_beat, beat, sp_zoom);
|
||||||
break;
|
break;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
void NoteColumnRenderArgs::SetPRZForActor(Actor* actor,
|
void NoteColumnRenderArgs::SetPRZForActor(Actor* actor,
|
||||||
@@ -893,6 +897,8 @@ void NoteDisplay::DrawHoldPart(vector<Sprite*> &vpSpr,
|
|||||||
column_args.pos_handler->EvalDerivForBeat(column_args.song_beat, cur_beat, sp_pos_forward);
|
column_args.pos_handler->EvalDerivForBeat(column_args.song_beat, cur_beat, sp_pos_forward);
|
||||||
RageVec3Normalize(&sp_pos_forward, &sp_pos_forward);
|
RageVec3Normalize(&sp_pos_forward, &sp_pos_forward);
|
||||||
break;
|
break;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
render_forward.x+= sp_pos_forward.x;
|
render_forward.x+= sp_pos_forward.x;
|
||||||
@@ -918,6 +924,8 @@ void NoteDisplay::DrawHoldPart(vector<Sprite*> &vpSpr,
|
|||||||
column_args.zoom_handler->EvalForBeat(column_args.song_beat, cur_beat, sp_zoom);
|
column_args.zoom_handler->EvalForBeat(column_args.song_beat, cur_beat, sp_zoom);
|
||||||
render_width= fFrameWidth * sp_zoom.x;
|
render_width= fFrameWidth * sp_zoom.x;
|
||||||
break;
|
break;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
const float fFrameWidthScale = ArrowEffects::GetFrameWidthScale(m_pPlayerState, fYOffset, part_args.overlapped_time);
|
const float fFrameWidthScale = ArrowEffects::GetFrameWidthScale(m_pPlayerState, fYOffset, part_args.overlapped_time);
|
||||||
@@ -938,6 +946,8 @@ void NoteDisplay::DrawHoldPart(vector<Sprite*> &vpSpr,
|
|||||||
case NCSM_Position:
|
case NCSM_Position:
|
||||||
column_args.rot_handler->EvalForBeat(column_args.song_beat, cur_beat, sp_rot);
|
column_args.rot_handler->EvalForBeat(column_args.song_beat, cur_beat, sp_rot);
|
||||||
break;
|
break;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
RageVector3 center_vert(sp_pos.x + ae_pos.x,
|
RageVector3 center_vert(sp_pos.x + ae_pos.x,
|
||||||
@@ -1300,6 +1310,8 @@ void NoteDisplay::DrawActor(const TapNote& tn, Actor* pActor, NotePart part,
|
|||||||
case NCSM_Position:
|
case NCSM_Position:
|
||||||
column_args.rot_handler->EvalForBeat(column_args.song_beat, spline_beat, sp_rot);
|
column_args.rot_handler->EvalForBeat(column_args.song_beat, spline_beat, sp_rot);
|
||||||
break;
|
break;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
column_args.spae_zoom_for_beat(m_pPlayerState, spline_beat, sp_zoom, ae_zoom);
|
column_args.spae_zoom_for_beat(m_pPlayerState, spline_beat, sp_zoom, ae_zoom);
|
||||||
column_args.SetPRZForActor(pActor, sp_pos, ae_pos, sp_rot, ae_rot, sp_zoom, ae_zoom);
|
column_args.SetPRZForActor(pActor, sp_pos, ae_pos, sp_rot, ae_rot, sp_zoom, ae_zoom);
|
||||||
@@ -1447,6 +1459,8 @@ void NoteColumnRenderer::UpdateReceptorGhostStuff(Actor* receptor) const
|
|||||||
case NCSM_Position:
|
case NCSM_Position:
|
||||||
NCR_current.m_pos_handler.EvalForReceptor(song_beat, sp_pos);
|
NCR_current.m_pos_handler.EvalForReceptor(song_beat, sp_pos);
|
||||||
break;
|
break;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
switch(NCR_current.m_rot_handler.m_spline_mode)
|
switch(NCR_current.m_rot_handler.m_spline_mode)
|
||||||
{
|
{
|
||||||
@@ -1460,6 +1474,8 @@ void NoteColumnRenderer::UpdateReceptorGhostStuff(Actor* receptor) const
|
|||||||
case NCSM_Position:
|
case NCSM_Position:
|
||||||
NCR_current.m_rot_handler.EvalForReceptor(song_beat, sp_rot);
|
NCR_current.m_rot_handler.EvalForReceptor(song_beat, sp_rot);
|
||||||
break;
|
break;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
switch(NCR_current.m_zoom_handler.m_spline_mode)
|
switch(NCR_current.m_zoom_handler.m_spline_mode)
|
||||||
{
|
{
|
||||||
@@ -1473,6 +1489,8 @@ void NoteColumnRenderer::UpdateReceptorGhostStuff(Actor* receptor) const
|
|||||||
case NCSM_Position:
|
case NCSM_Position:
|
||||||
NCR_current.m_zoom_handler.EvalForReceptor(song_beat, sp_zoom);
|
NCR_current.m_zoom_handler.EvalForReceptor(song_beat, sp_zoom);
|
||||||
break;
|
break;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
m_column_render_args.SetPRZForActor(receptor, sp_pos, ae_pos, sp_rot, ae_rot, sp_zoom, ae_zoom);
|
m_column_render_args.SetPRZForActor(receptor, sp_pos, ae_pos, sp_rot, ae_rot, sp_zoom, ae_zoom);
|
||||||
receptor->SetInternalDiffuse(m_column_render_args.diffuse);
|
receptor->SetInternalDiffuse(m_column_render_args.diffuse);
|
||||||
@@ -1524,6 +1542,8 @@ void NoteColumnRenderer::DrawPrimitives()
|
|||||||
holds[tn.pn].push_back(begin);
|
holds[tn.pn].push_back(begin);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#define DTS_INNER(pn, tap_set, draw_func, disp) \
|
#define DTS_INNER(pn, tap_set, draw_func, disp) \
|
||||||
|
|||||||
@@ -397,6 +397,8 @@ RString NoteSkinManager::GetPath( const RString &sButtonName, const RString &sEl
|
|||||||
RageException::Throw("%s", message.c_str());
|
RageException::Throw("%s", message.c_str());
|
||||||
case Dialog::ignore:
|
case Dialog::ignore:
|
||||||
return "";
|
return "";
|
||||||
|
default:
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -439,6 +441,8 @@ RString NoteSkinManager::GetPath( const RString &sButtonName, const RString &sEl
|
|||||||
RageException::Throw("%s", message.c_str());
|
RageException::Throw("%s", message.c_str());
|
||||||
case Dialog::ignore:
|
case Dialog::ignore:
|
||||||
return "";
|
return "";
|
||||||
|
default:
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1455,9 +1455,9 @@ bool BMSChartReader::ReadNoteData()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
delete transform;
|
delete[] transform;
|
||||||
delete holdStart;
|
delete[] holdStart;
|
||||||
delete lastNote;
|
delete[] lastNote;
|
||||||
|
|
||||||
td.TidyUpData( false );
|
td.TidyUpData( false );
|
||||||
out->SetNoteData(nd);
|
out->SetNoteData(nd);
|
||||||
|
|||||||
@@ -912,6 +912,7 @@ bool SSCLoader::LoadNoteDataFromSimfile( const RString & cachePath, Steps &out )
|
|||||||
out.SetSMNoteData(matcher);
|
out.SetSMNoteData(matcher);
|
||||||
out.TidyUpData();
|
out.TidyUpData();
|
||||||
return true;
|
return true;
|
||||||
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -927,6 +928,8 @@ bool SSCLoader::LoadNoteDataFromSimfile( const RString & cachePath, Steps &out )
|
|||||||
case LNDID_notedata:
|
case LNDID_notedata:
|
||||||
tryingSteps = true;
|
tryingSteps = true;
|
||||||
break;
|
break;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+14
-12
@@ -367,18 +367,20 @@ bool NotesWriterDWI::Write( RString sPath, const Song &out )
|
|||||||
f.PutLine( ssprintf("#CDTITLE:%s;", DwiEscape(out.m_sCDTitleFile).c_str()) );
|
f.PutLine( ssprintf("#CDTITLE:%s;", DwiEscape(out.m_sCDTitleFile).c_str()) );
|
||||||
switch( out.m_DisplayBPMType )
|
switch( out.m_DisplayBPMType )
|
||||||
{
|
{
|
||||||
case DISPLAY_BPM_ACTUAL:
|
case DISPLAY_BPM_ACTUAL:
|
||||||
// write nothing
|
// write nothing
|
||||||
break;
|
break;
|
||||||
case DISPLAY_BPM_SPECIFIED:
|
case DISPLAY_BPM_SPECIFIED:
|
||||||
if( out.m_fSpecifiedBPMMin == out.m_fSpecifiedBPMMax )
|
if( out.m_fSpecifiedBPMMin == out.m_fSpecifiedBPMMax )
|
||||||
f.PutLine( ssprintf("#DISPLAYBPM:%i;\n", (int) out.m_fSpecifiedBPMMin) );
|
f.PutLine( ssprintf("#DISPLAYBPM:%i;\n", (int) out.m_fSpecifiedBPMMin) );
|
||||||
else
|
else
|
||||||
f.PutLine( ssprintf("#DISPLAYBPM:%i..%i;\n", (int) out.m_fSpecifiedBPMMin, (int) out.m_fSpecifiedBPMMax) );
|
f.PutLine( ssprintf("#DISPLAYBPM:%i..%i;\n", (int) out.m_fSpecifiedBPMMin, (int) out.m_fSpecifiedBPMMax) );
|
||||||
break;
|
break;
|
||||||
case DISPLAY_BPM_RANDOM:
|
case DISPLAY_BPM_RANDOM:
|
||||||
f.PutLine( "#DISPLAYBPM:*" );
|
f.PutLine( "#DISPLAYBPM:*" );
|
||||||
break;
|
break;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
// TODO: Also check for delays, add them as stops minus one row?
|
// TODO: Also check for delays, add them as stops minus one row?
|
||||||
|
|||||||
+15
-13
@@ -59,19 +59,21 @@ static void WriteGlobalTags( RageFile &f, Song &out )
|
|||||||
|
|
||||||
switch( out.m_DisplayBPMType )
|
switch( out.m_DisplayBPMType )
|
||||||
{
|
{
|
||||||
case DISPLAY_BPM_ACTUAL:
|
case DISPLAY_BPM_ACTUAL:
|
||||||
// write nothing
|
// write nothing
|
||||||
break;
|
break;
|
||||||
case DISPLAY_BPM_SPECIFIED:
|
case DISPLAY_BPM_SPECIFIED:
|
||||||
if( out.m_fSpecifiedBPMMin == out.m_fSpecifiedBPMMax )
|
if( out.m_fSpecifiedBPMMin == out.m_fSpecifiedBPMMax )
|
||||||
f.PutLine( ssprintf( "#DISPLAYBPM:%.6f;", out.m_fSpecifiedBPMMin ) );
|
f.PutLine( ssprintf( "#DISPLAYBPM:%.6f;", out.m_fSpecifiedBPMMin ) );
|
||||||
else
|
else
|
||||||
f.PutLine( ssprintf( "#DISPLAYBPM:%.6f:%.6f;",
|
f.PutLine( ssprintf( "#DISPLAYBPM:%.6f:%.6f;",
|
||||||
out.m_fSpecifiedBPMMin, out.m_fSpecifiedBPMMax ) );
|
out.m_fSpecifiedBPMMin, out.m_fSpecifiedBPMMax ) );
|
||||||
break;
|
break;
|
||||||
case DISPLAY_BPM_RANDOM:
|
case DISPLAY_BPM_RANDOM:
|
||||||
f.PutLine( ssprintf( "#DISPLAYBPM:*;" ) );
|
f.PutLine( ssprintf( "#DISPLAYBPM:*;" ) );
|
||||||
break;
|
break;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
+16
-12
@@ -259,18 +259,20 @@ static void WriteGlobalTags( RageFile &f, const Song &out )
|
|||||||
|
|
||||||
switch( out.m_DisplayBPMType )
|
switch( out.m_DisplayBPMType )
|
||||||
{
|
{
|
||||||
case DISPLAY_BPM_ACTUAL:
|
case DISPLAY_BPM_ACTUAL:
|
||||||
// write nothing
|
// write nothing
|
||||||
break;
|
break;
|
||||||
case DISPLAY_BPM_SPECIFIED:
|
case DISPLAY_BPM_SPECIFIED:
|
||||||
if( out.m_fSpecifiedBPMMin == out.m_fSpecifiedBPMMax )
|
if( out.m_fSpecifiedBPMMin == out.m_fSpecifiedBPMMax )
|
||||||
f.PutLine( ssprintf( "#DISPLAYBPM:%.6f;", out.m_fSpecifiedBPMMin ) );
|
f.PutLine( ssprintf( "#DISPLAYBPM:%.6f;", out.m_fSpecifiedBPMMin ) );
|
||||||
else
|
else
|
||||||
f.PutLine( ssprintf( "#DISPLAYBPM:%.6f:%.6f;", out.m_fSpecifiedBPMMin, out.m_fSpecifiedBPMMax ) );
|
f.PutLine( ssprintf( "#DISPLAYBPM:%.6f:%.6f;", out.m_fSpecifiedBPMMin, out.m_fSpecifiedBPMMax ) );
|
||||||
break;
|
break;
|
||||||
case DISPLAY_BPM_RANDOM:
|
case DISPLAY_BPM_RANDOM:
|
||||||
f.PutLine( ssprintf( "#DISPLAYBPM:*;" ) );
|
f.PutLine( ssprintf( "#DISPLAYBPM:*;" ) );
|
||||||
break;
|
break;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
WriteTimingTags( f, out.m_SongTiming, true );
|
WriteTimingTags( f, out.m_SongTiming, true );
|
||||||
@@ -409,6 +411,8 @@ static RString GetSSCNoteData( const Song &song, const Steps &in, bool bSavingCa
|
|||||||
case DISPLAY_BPM_RANDOM:
|
case DISPLAY_BPM_RANDOM:
|
||||||
lines.push_back( ssprintf( "#DISPLAYBPM:*;" ) );
|
lines.push_back( ssprintf( "#DISPLAYBPM:*;" ) );
|
||||||
break;
|
break;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
if (bSavingCache)
|
if (bSavingCache)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -150,9 +150,15 @@ void PlayerOptions::GetMods( vector<RString> &AddTo, bool bForceNoteSkin ) const
|
|||||||
case LifeType_Bar:
|
case LifeType_Bar:
|
||||||
switch(m_DrainType)
|
switch(m_DrainType)
|
||||||
{
|
{
|
||||||
case DrainType_Normal: break;
|
case DrainType_NoRecover:
|
||||||
case DrainType_NoRecover: AddTo.push_back("NoRecover"); break;
|
AddTo.push_back("NoRecover");
|
||||||
case DrainType_SuddenDeath: AddTo.push_back("SuddenDeath"); break;
|
break;
|
||||||
|
case DrainType_SuddenDeath:
|
||||||
|
AddTo.push_back("SuddenDeath");
|
||||||
|
break;
|
||||||
|
case DrainType_Normal:
|
||||||
|
default:
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case LifeType_Battery:
|
case LifeType_Battery:
|
||||||
|
|||||||
+78
-47
@@ -1619,35 +1619,37 @@ void RageDisplay_Legacy::SetTextureMode( TextureUnit tu, TextureMode tm )
|
|||||||
|
|
||||||
switch( tm )
|
switch( tm )
|
||||||
{
|
{
|
||||||
case TextureMode_Modulate:
|
case TextureMode_Modulate:
|
||||||
glTexEnvi( GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_MODULATE );
|
glTexEnvi( GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_MODULATE );
|
||||||
break;
|
break;
|
||||||
case TextureMode_Add:
|
case TextureMode_Add:
|
||||||
glTexEnvi( GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_ADD );
|
glTexEnvi( GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_ADD );
|
||||||
break;
|
break;
|
||||||
case TextureMode_Glow:
|
case TextureMode_Glow:
|
||||||
// the below function is glowmode,brighten:
|
// the below function is glowmode,brighten:
|
||||||
if (!GLEW_ARB_texture_env_combine && !GLEW_EXT_texture_env_combine)
|
if (!GLEW_ARB_texture_env_combine && !GLEW_EXT_texture_env_combine)
|
||||||
{
|
{
|
||||||
/* This is changing blend state, instead of texture state, which
|
/* This is changing blend state, instead of texture state, which
|
||||||
* isn't great, but it's better than doing nothing. */
|
* isn't great, but it's better than doing nothing. */
|
||||||
glBlendFunc( GL_SRC_ALPHA, GL_ONE );
|
glBlendFunc( GL_SRC_ALPHA, GL_ONE );
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
// and this is glowmode,whiten:
|
// and this is glowmode,whiten:
|
||||||
// Source color is the diffuse color only:
|
// Source color is the diffuse color only:
|
||||||
glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_COMBINE_EXT);
|
glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_COMBINE_EXT);
|
||||||
glTexEnvi(GL_TEXTURE_ENV, GLenum(GL_COMBINE_RGB_EXT), GL_REPLACE);
|
glTexEnvi(GL_TEXTURE_ENV, GLenum(GL_COMBINE_RGB_EXT), GL_REPLACE);
|
||||||
glTexEnvi(GL_TEXTURE_ENV, GLenum(GL_SOURCE0_RGB_EXT), GL_PRIMARY_COLOR_EXT);
|
glTexEnvi(GL_TEXTURE_ENV, GLenum(GL_SOURCE0_RGB_EXT), GL_PRIMARY_COLOR_EXT);
|
||||||
|
|
||||||
// Source alpha is texture alpha * diffuse alpha:
|
// Source alpha is texture alpha * diffuse alpha:
|
||||||
glTexEnvi(GL_TEXTURE_ENV, GLenum(GL_COMBINE_ALPHA_EXT), GL_MODULATE);
|
glTexEnvi(GL_TEXTURE_ENV, GLenum(GL_COMBINE_ALPHA_EXT), GL_MODULATE);
|
||||||
glTexEnvi(GL_TEXTURE_ENV, GLenum(GL_OPERAND0_ALPHA_EXT), GL_SRC_ALPHA);
|
glTexEnvi(GL_TEXTURE_ENV, GLenum(GL_OPERAND0_ALPHA_EXT), GL_SRC_ALPHA);
|
||||||
glTexEnvi(GL_TEXTURE_ENV, GLenum(GL_SOURCE0_ALPHA_EXT), GL_PRIMARY_COLOR_EXT);
|
glTexEnvi(GL_TEXTURE_ENV, GLenum(GL_SOURCE0_ALPHA_EXT), GL_PRIMARY_COLOR_EXT);
|
||||||
glTexEnvi(GL_TEXTURE_ENV, GLenum(GL_OPERAND1_ALPHA_EXT), GL_SRC_ALPHA);
|
glTexEnvi(GL_TEXTURE_ENV, GLenum(GL_OPERAND1_ALPHA_EXT), GL_SRC_ALPHA);
|
||||||
glTexEnvi(GL_TEXTURE_ENV, GLenum(GL_SOURCE1_ALPHA_EXT), GL_TEXTURE);
|
glTexEnvi(GL_TEXTURE_ENV, GLenum(GL_SOURCE1_ALPHA_EXT), GL_TEXTURE);
|
||||||
break;
|
break;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1691,15 +1693,35 @@ void RageDisplay_Legacy::SetEffectMode( EffectMode effect )
|
|||||||
GLhandleARB hShader = 0;
|
GLhandleARB hShader = 0;
|
||||||
switch (effect)
|
switch (effect)
|
||||||
{
|
{
|
||||||
case EffectMode_Normal: hShader = 0; break;
|
case EffectMode_Normal:
|
||||||
case EffectMode_Unpremultiply: hShader = g_bUnpremultiplyShader; break;
|
hShader = 0;
|
||||||
case EffectMode_ColorBurn: hShader = g_bColorBurnShader; break;
|
break;
|
||||||
case EffectMode_ColorDodge: hShader = g_bColorDodgeShader; break;
|
case EffectMode_Unpremultiply:
|
||||||
case EffectMode_VividLight: hShader = g_bVividLightShader; break;
|
hShader = g_bUnpremultiplyShader;
|
||||||
case EffectMode_HardMix: hShader = g_hHardMixShader; break;
|
break;
|
||||||
case EffectMode_Overlay: hShader = g_hOverlayShader; break;
|
case EffectMode_ColorBurn:
|
||||||
case EffectMode_Screen: hShader = g_hScreenShader; break;
|
hShader = g_bColorBurnShader;
|
||||||
case EffectMode_YUYV422: hShader = g_hYUYV422Shader; break;
|
break;
|
||||||
|
case EffectMode_ColorDodge:
|
||||||
|
hShader = g_bColorDodgeShader;
|
||||||
|
break;
|
||||||
|
case EffectMode_VividLight:
|
||||||
|
hShader = g_bVividLightShader;
|
||||||
|
break;
|
||||||
|
case EffectMode_HardMix:
|
||||||
|
hShader = g_hHardMixShader;
|
||||||
|
break;
|
||||||
|
case EffectMode_Overlay:
|
||||||
|
hShader = g_hOverlayShader;
|
||||||
|
break;
|
||||||
|
case EffectMode_Screen:
|
||||||
|
hShader = g_hScreenShader;
|
||||||
|
break;
|
||||||
|
case EffectMode_YUYV422:
|
||||||
|
hShader = g_hYUYV422Shader;
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
DebugFlushGLErrors();
|
DebugFlushGLErrors();
|
||||||
@@ -1726,18 +1748,27 @@ bool RageDisplay_Legacy::IsEffectModeSupported( EffectMode effect )
|
|||||||
{
|
{
|
||||||
switch( effect )
|
switch( effect )
|
||||||
{
|
{
|
||||||
case EffectMode_Normal: return true;
|
case EffectMode_Normal:
|
||||||
case EffectMode_Unpremultiply: return g_bUnpremultiplyShader != 0;
|
return true;
|
||||||
case EffectMode_ColorBurn: return g_bColorBurnShader != 0;
|
case EffectMode_Unpremultiply:
|
||||||
case EffectMode_ColorDodge: return g_bColorDodgeShader != 0;
|
return g_bUnpremultiplyShader != 0;
|
||||||
case EffectMode_VividLight: return g_bVividLightShader != 0;
|
case EffectMode_ColorBurn:
|
||||||
case EffectMode_HardMix: return g_hHardMixShader != 0;
|
return g_bColorBurnShader != 0;
|
||||||
case EffectMode_Overlay: return g_hOverlayShader != 0;
|
case EffectMode_ColorDodge:
|
||||||
case EffectMode_Screen: return g_hScreenShader != 0;
|
return g_bColorDodgeShader != 0;
|
||||||
case EffectMode_YUYV422: return g_hYUYV422Shader != 0;
|
case EffectMode_VividLight:
|
||||||
|
return g_bVividLightShader != 0;
|
||||||
|
case EffectMode_HardMix:
|
||||||
|
return g_hHardMixShader != 0;
|
||||||
|
case EffectMode_Overlay:
|
||||||
|
return g_hOverlayShader != 0;
|
||||||
|
case EffectMode_Screen:
|
||||||
|
return g_hScreenShader != 0;
|
||||||
|
case EffectMode_YUYV422:
|
||||||
|
return g_hYUYV422Shader != 0;
|
||||||
|
default:
|
||||||
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
return false;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void RageDisplay_Legacy::SetBlendMode( BlendMode mode )
|
void RageDisplay_Legacy::SetBlendMode( BlendMode mode )
|
||||||
|
|||||||
+16
-8
@@ -214,10 +214,14 @@ bool ScreenTextEntry::Input( const InputEventPlus &input )
|
|||||||
{
|
{
|
||||||
switch( input.type )
|
switch( input.type )
|
||||||
{
|
{
|
||||||
case IET_FIRST_PRESS:
|
case IET_FIRST_PRESS:
|
||||||
bLCtrl = true; break;
|
bLCtrl = true;
|
||||||
case IET_RELEASE:
|
break;
|
||||||
bLCtrl = false; break;
|
case IET_RELEASE:
|
||||||
|
bLCtrl = false;
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -225,10 +229,14 @@ bool ScreenTextEntry::Input( const InputEventPlus &input )
|
|||||||
{
|
{
|
||||||
switch( input.type )
|
switch( input.type )
|
||||||
{
|
{
|
||||||
case IET_FIRST_PRESS:
|
case IET_FIRST_PRESS:
|
||||||
bRCtrl = true; break;
|
bRCtrl = true;
|
||||||
case IET_RELEASE:
|
break;
|
||||||
bRCtrl = false; break;
|
case IET_RELEASE:
|
||||||
|
bRCtrl = false;
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+17
-16
@@ -688,14 +688,15 @@ bool ThemeManager::GetPathInfoToRaw( PathInfo &out, const RString &sThemeName_,
|
|||||||
|
|
||||||
switch( LuaHelpers::ReportScriptError(message, "", true) )
|
switch( LuaHelpers::ReportScriptError(message, "", true) )
|
||||||
{
|
{
|
||||||
case Dialog::abort:
|
case Dialog::abort:
|
||||||
RageException::Throw( "%s", message.c_str() );
|
RageException::Throw( "%s", message.c_str() );
|
||||||
break;
|
break;
|
||||||
case Dialog::retry:
|
case Dialog::retry:
|
||||||
ReloadMetrics();
|
ReloadMetrics();
|
||||||
return GetPathInfoToRaw( out, sThemeName_, category, sMetricsGroup_, sElement_ );
|
return GetPathInfoToRaw( out, sThemeName_, category, sMetricsGroup_, sElement_ );
|
||||||
case Dialog::ignore:
|
case Dialog::ignore:
|
||||||
break;
|
default:
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -733,15 +734,15 @@ bool ThemeManager::GetPathInfoToRaw( PathInfo &out, const RString &sThemeName_,
|
|||||||
|
|
||||||
switch(LuaHelpers::ReportScriptError(sMessage, "", true))
|
switch(LuaHelpers::ReportScriptError(sMessage, "", true))
|
||||||
{
|
{
|
||||||
case Dialog::retry:
|
case Dialog::retry:
|
||||||
ReloadMetrics();
|
ReloadMetrics();
|
||||||
return GetPathInfoToRaw( out, sThemeName_, category, sMetricsGroup_, sElement_ );
|
return GetPathInfoToRaw( out, sThemeName_, category, sMetricsGroup_, sElement_ );
|
||||||
case Dialog::ignore:
|
case Dialog::ignore:
|
||||||
GetPathInfo( out, category, "", "_missing" );
|
GetPathInfo( out, category, "", "_missing" );
|
||||||
return true;
|
return true;
|
||||||
|
default:
|
||||||
|
RageException::Throw( "%s", sMessage.c_str() );
|
||||||
}
|
}
|
||||||
|
|
||||||
RageException::Throw( "%s", sMessage.c_str() );
|
|
||||||
}
|
}
|
||||||
|
|
||||||
bool ThemeManager::GetPathInfoToAndFallback( PathInfo &out, ElementCategory category, const RString &sMetricsGroup_, const RString &sElement )
|
bool ThemeManager::GetPathInfoToAndFallback( PathInfo &out, ElementCategory category, const RString &sMetricsGroup_, const RString &sElement )
|
||||||
|
|||||||
@@ -712,6 +712,8 @@ void TimingData::AddSegment( const TimingSegment *seg )
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
default:
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
// the segment at or before this row is equal to the new one; ignore it
|
// the segment at or before this row is equal to the new one; ignore it
|
||||||
|
|||||||
@@ -596,6 +596,8 @@ void actor_template_t::load_node(XNode const& node, RString const& dirname, cond
|
|||||||
store_field("Bones", this_relative, false);
|
store_field("Bones", this_relative, false);
|
||||||
handled_level= 2;
|
handled_level= 2;
|
||||||
break;
|
break;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
if(!handled_level)
|
if(!handled_level)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -365,7 +365,7 @@ static RString averr_ssprintf( int err, const char *fmt, ... )
|
|||||||
char* errbuf = new char[errbuf_size];
|
char* errbuf = new char[errbuf_size];
|
||||||
avcodec::av_strerror(err, errbuf, errbuf_size);
|
avcodec::av_strerror(err, errbuf, errbuf_size);
|
||||||
RString Error = ssprintf("%i: %s", err, errbuf);
|
RString Error = ssprintf("%i: %s", err, errbuf);
|
||||||
delete errbuf;
|
delete[] errbuf;
|
||||||
|
|
||||||
return s + " (" + Error + ")";
|
return s + " (" + Error + ")";
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -6,13 +6,13 @@
|
|||||||
using __gnu_cxx::hash_map;
|
using __gnu_cxx::hash_map;
|
||||||
|
|
||||||
Joystick::Joystick() : id( InputDevice_Invalid ),
|
Joystick::Joystick() : id( InputDevice_Invalid ),
|
||||||
x_axis( 0 ), x_min( 0 ), x_max( 0 ),
|
x_axis( 0 ), y_axis( 0 ), z_axis( 0 ),
|
||||||
y_axis( 0 ), y_min( 0 ), y_max( 0 ),
|
x_rot( 0 ), y_rot( 0 ), z_rot( 0 ), hat( 0 ),
|
||||||
z_axis( 0 ), z_min( 0 ), z_max( 0 ),
|
x_min( 0 ), x_max( 0 ), y_min( 0 ),
|
||||||
x_rot( 0 ), rx_min( 0 ), rx_max( 0 ),
|
y_max( 0 ), z_min( 0 ), z_max( 0 ),
|
||||||
y_rot( 0 ), ry_min( 0 ), ry_max( 0 ),
|
rx_min( 0 ), rx_max( 0 ), ry_min( 0 ),
|
||||||
z_rot( 0 ), rz_min( 0 ), rz_max( 0 ),
|
ry_max( 0 ), rz_min( 0 ), rz_max( 0 ),
|
||||||
hat( 0 ), hat_min( 0 ), hat_max( 0 )
|
hat_min( 0 ), hat_max( 0 )
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -4,9 +4,9 @@
|
|||||||
using __gnu_cxx::hash_map;
|
using __gnu_cxx::hash_map;
|
||||||
|
|
||||||
Mouse::Mouse() : id( InputDevice_Invalid ),
|
Mouse::Mouse() : id( InputDevice_Invalid ),
|
||||||
x_axis( 0 ), x_min( 0 ), x_max( 0 ),
|
x_axis( 0 ), y_axis( 0 ), z_axis( 0 ),
|
||||||
y_axis( 0 ), y_min( 0 ), y_max( 0 ),
|
x_min( 0 ), x_max( 0 ), y_min( 0 ),
|
||||||
z_axis( 0 ), z_min( 0 ), z_max( 0 )
|
y_max( 0 ), z_min( 0 ), z_max( 0 )
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user