pump couples; fix style counts
(fallback not used yet)
This commit is contained in:
@@ -68,6 +68,8 @@ enum NotesType
|
||||
NOTES_TYPE_DANCE_SOLO,
|
||||
NOTES_TYPE_PUMP_SINGLE,
|
||||
NOTES_TYPE_PUMP_DOUBLE,
|
||||
NOTES_TYPE_PUMP_COUPLE_1,
|
||||
NOTES_TYPE_PUMP_COUPLE_2,
|
||||
NOTES_TYPE_EZ2_SINGLE,
|
||||
NOTES_TYPE_EZ2_SINGLE_HARD,
|
||||
NOTES_TYPE_EZ2_DOUBLE,
|
||||
@@ -78,7 +80,6 @@ enum NotesType
|
||||
// NOTES_TYPE_EZ2_REAL_VERSUS,
|
||||
NUM_NOTES_TYPES, // leave this at the end
|
||||
NOTES_TYPE_INVALID,
|
||||
NOTES_TYPE_PUMP_COUPLE,
|
||||
};
|
||||
|
||||
//////////////////////////
|
||||
|
||||
@@ -41,6 +41,8 @@ struct {
|
||||
{ "dance-solo", 6 },
|
||||
{ "pump-single", 5 },
|
||||
{ "pump-double", 10 },
|
||||
{ "pump-couple-1", 5 },
|
||||
{ "pump-couple-2", 5 },
|
||||
{ "ez2-single", 5 }, // Single: TL,LHH,D,RHH,TR
|
||||
{ "ez2-single-hard", 5 }, // Single: TL,LHH,D,RHH,TR
|
||||
{ "ez2-double", 10 }, // Double: Single x2
|
||||
@@ -529,7 +531,7 @@ StyleDef g_StyleDefs[NUM_STYLES] =
|
||||
GAME_DANCE, // m_Game
|
||||
false, // m_bUsedForGameplay
|
||||
true, // m_bUsedForEdit
|
||||
"DDR Couple Player 1", // m_szName
|
||||
"DDR Couples Player 1", // m_szName
|
||||
{ NOTES_TYPE_DANCE_COUPLE_1, NOTES_TYPE_DANCE_COUPLE_1 }, // m_NotesTypes
|
||||
NOTES_TYPE_INVALID, // m_FallbackNotesType
|
||||
StyleDef::ONE_PLAYER_TWO_CREDITS, // m_StyleType
|
||||
@@ -557,7 +559,7 @@ StyleDef g_StyleDefs[NUM_STYLES] =
|
||||
GAME_DANCE, // m_Game
|
||||
false, // m_bUsedForGameplay
|
||||
true, // m_bUsedForEdit
|
||||
"DDR Couple Player 2", // m_szName
|
||||
"DDR Couples Player 2", // m_szName
|
||||
{ NOTES_TYPE_DANCE_COUPLE_2, NOTES_TYPE_DANCE_COUPLE_2 }, // m_NotesTypes
|
||||
NOTES_TYPE_INVALID, // m_FallbackNotesType
|
||||
StyleDef::ONE_PLAYER_TWO_CREDITS, // m_StyleType
|
||||
@@ -739,6 +741,96 @@ StyleDef g_StyleDefs[NUM_STYLES] =
|
||||
},
|
||||
},
|
||||
*/
|
||||
{ // STYLE_PUMP_COUPLE
|
||||
GAME_PUMP, // m_Game
|
||||
true, // m_bUsedForGameplay
|
||||
false, // m_bUsedForEdit
|
||||
"Pump Couples", // m_szName
|
||||
{ NOTES_TYPE_PUMP_SINGLE,NOTES_TYPE_PUMP_COUPLE_2}, // m_NotesTypes
|
||||
NOTES_TYPE_INVALID, // m_FallbackNotesType
|
||||
StyleDef::TWO_PLAYERS_TWO_CREDITS, // m_StyleType
|
||||
{ 160, 480 }, // m_iCenterX
|
||||
5, // m_iColsPerPlayer
|
||||
{ // m_ColumnInfo[NUM_PLAYERS][MAX_COLS_PER_PLAYER];
|
||||
{ // PLAYER_1
|
||||
{ TRACK_1, GAME_CONTROLLER_1, PUMP_BUTTON_DOWNLEFT, -PUMP_COL_SPACING*2 },
|
||||
{ TRACK_2, GAME_CONTROLLER_1, PUMP_BUTTON_UPLEFT, -PUMP_COL_SPACING*1 },
|
||||
{ TRACK_3, GAME_CONTROLLER_1, PUMP_BUTTON_CENTER, +PUMP_COL_SPACING*0 },
|
||||
{ TRACK_4, GAME_CONTROLLER_1, PUMP_BUTTON_UPRIGHT, +PUMP_COL_SPACING*1 },
|
||||
{ TRACK_5, GAME_CONTROLLER_1, PUMP_BUTTON_DOWNRIGHT, +PUMP_COL_SPACING*2 },
|
||||
},
|
||||
{ // PLAYER_2
|
||||
{ TRACK_1, GAME_CONTROLLER_2, PUMP_BUTTON_DOWNLEFT, -PUMP_COL_SPACING*2 },
|
||||
{ TRACK_2, GAME_CONTROLLER_2, PUMP_BUTTON_UPLEFT, -PUMP_COL_SPACING*1 },
|
||||
{ TRACK_3, GAME_CONTROLLER_2, PUMP_BUTTON_CENTER, +PUMP_COL_SPACING*0 },
|
||||
{ TRACK_4, GAME_CONTROLLER_2, PUMP_BUTTON_UPRIGHT, +PUMP_COL_SPACING*1 },
|
||||
{ TRACK_5, GAME_CONTROLLER_2, PUMP_BUTTON_DOWNRIGHT, +PUMP_COL_SPACING*2 },
|
||||
},
|
||||
},
|
||||
{ // m_iColumnDrawOrder[MAX_COLS_PER_PLAYER];
|
||||
0,2,4,1,3
|
||||
},
|
||||
},
|
||||
{ // STYLE_PUMP_EDIT_COUPLE_1
|
||||
GAME_PUMP, // m_Game
|
||||
false, // m_bUsedForGameplay
|
||||
true, // m_bUsedForEdit
|
||||
"Pump Couples Player 1", // m_szName
|
||||
{ NOTES_TYPE_PUMP_COUPLE_1,NOTES_TYPE_PUMP_COUPLE_1}, // m_NotesTypes
|
||||
NOTES_TYPE_INVALID, // m_FallbackNotesType
|
||||
StyleDef::ONE_PLAYER_ONE_CREDIT, // m_StyleType
|
||||
{ 160, 480 }, // m_iCenterX
|
||||
5, // m_iColsPerPlayer
|
||||
{ // m_ColumnInfo[NUM_PLAYERS][MAX_COLS_PER_PLAYER];
|
||||
{ // PLAYER_1
|
||||
{ TRACK_1, GAME_CONTROLLER_1, PUMP_BUTTON_DOWNLEFT, -PUMP_COL_SPACING*2 },
|
||||
{ TRACK_2, GAME_CONTROLLER_1, PUMP_BUTTON_UPLEFT, -PUMP_COL_SPACING*1 },
|
||||
{ TRACK_3, GAME_CONTROLLER_1, PUMP_BUTTON_CENTER, +PUMP_COL_SPACING*0 },
|
||||
{ TRACK_4, GAME_CONTROLLER_1, PUMP_BUTTON_UPRIGHT, +PUMP_COL_SPACING*1 },
|
||||
{ TRACK_5, GAME_CONTROLLER_1, PUMP_BUTTON_DOWNRIGHT, +PUMP_COL_SPACING*2 },
|
||||
},
|
||||
{ // PLAYER_2
|
||||
{ TRACK_1, GAME_CONTROLLER_2, PUMP_BUTTON_DOWNLEFT, -PUMP_COL_SPACING*2 },
|
||||
{ TRACK_2, GAME_CONTROLLER_2, PUMP_BUTTON_UPLEFT, -PUMP_COL_SPACING*1 },
|
||||
{ TRACK_3, GAME_CONTROLLER_2, PUMP_BUTTON_CENTER, +PUMP_COL_SPACING*0 },
|
||||
{ TRACK_4, GAME_CONTROLLER_2, PUMP_BUTTON_UPRIGHT, +PUMP_COL_SPACING*1 },
|
||||
{ TRACK_5, GAME_CONTROLLER_2, PUMP_BUTTON_DOWNRIGHT, +PUMP_COL_SPACING*2 },
|
||||
},
|
||||
},
|
||||
{ // m_iColumnDrawOrder[MAX_COLS_PER_PLAYER];
|
||||
0,2,4,1,3
|
||||
},
|
||||
},
|
||||
{ // STYLE_PUMP_EDIT_COUPLE_2
|
||||
GAME_PUMP, // m_Game
|
||||
false, // m_bUsedForGameplay
|
||||
true, // m_bUsedForEdit
|
||||
"Pump Couples Player 2", // m_szName
|
||||
{ NOTES_TYPE_PUMP_COUPLE_2,NOTES_TYPE_PUMP_COUPLE_2}, // m_NotesTypes
|
||||
NOTES_TYPE_INVALID, // m_FallbackNotesType
|
||||
StyleDef::ONE_PLAYER_ONE_CREDIT, // m_StyleType
|
||||
{ 160, 480 }, // m_iCenterX
|
||||
5, // m_iColsPerPlayer
|
||||
{ // m_ColumnInfo[NUM_PLAYERS][MAX_COLS_PER_PLAYER];
|
||||
{ // PLAYER_1
|
||||
{ TRACK_1, GAME_CONTROLLER_1, PUMP_BUTTON_DOWNLEFT, -PUMP_COL_SPACING*2 },
|
||||
{ TRACK_2, GAME_CONTROLLER_1, PUMP_BUTTON_UPLEFT, -PUMP_COL_SPACING*1 },
|
||||
{ TRACK_3, GAME_CONTROLLER_1, PUMP_BUTTON_CENTER, +PUMP_COL_SPACING*0 },
|
||||
{ TRACK_4, GAME_CONTROLLER_1, PUMP_BUTTON_UPRIGHT, +PUMP_COL_SPACING*1 },
|
||||
{ TRACK_5, GAME_CONTROLLER_1, PUMP_BUTTON_DOWNRIGHT, +PUMP_COL_SPACING*2 },
|
||||
},
|
||||
{ // PLAYER_2
|
||||
{ TRACK_1, GAME_CONTROLLER_2, PUMP_BUTTON_DOWNLEFT, -PUMP_COL_SPACING*2 },
|
||||
{ TRACK_2, GAME_CONTROLLER_2, PUMP_BUTTON_UPLEFT, -PUMP_COL_SPACING*1 },
|
||||
{ TRACK_3, GAME_CONTROLLER_2, PUMP_BUTTON_CENTER, +PUMP_COL_SPACING*0 },
|
||||
{ TRACK_4, GAME_CONTROLLER_2, PUMP_BUTTON_UPRIGHT, +PUMP_COL_SPACING*1 },
|
||||
{ TRACK_5, GAME_CONTROLLER_2, PUMP_BUTTON_DOWNRIGHT, +PUMP_COL_SPACING*2 },
|
||||
},
|
||||
},
|
||||
{ // m_iColumnDrawOrder[MAX_COLS_PER_PLAYER];
|
||||
0,2,4,1,3
|
||||
},
|
||||
},
|
||||
|
||||
{ // EZ2_STYLE_SINGLE
|
||||
GAME_EZ2, // m_Game
|
||||
|
||||
@@ -503,7 +503,8 @@ void NoteData::Turn( PlayerOptions::TurnType tt )
|
||||
break;
|
||||
case NOTES_TYPE_PUMP_SINGLE:
|
||||
case NOTES_TYPE_PUMP_DOUBLE:
|
||||
case NOTES_TYPE_PUMP_COUPLE:
|
||||
case NOTES_TYPE_PUMP_COUPLE_1:
|
||||
case NOTES_TYPE_PUMP_COUPLE_2:
|
||||
iTakeFromTrack[0] = 1;
|
||||
iTakeFromTrack[1] = 3;
|
||||
iTakeFromTrack[2] = 2;
|
||||
|
||||
@@ -120,15 +120,16 @@ bool KSFLoader::LoadFromKSFFile( const CString &sPath, Notes &out )
|
||||
if(!out.m_iMeter) out.m_iMeter = 5;
|
||||
}
|
||||
|
||||
notedata.m_iNumTracks = 5;
|
||||
out.m_NotesType = NOTES_TYPE_PUMP_SINGLE;
|
||||
|
||||
if( sFName.Find("double") != -1 )
|
||||
{
|
||||
notedata.m_iNumTracks = 10;
|
||||
out.m_NotesType = NOTES_TYPE_PUMP_DOUBLE;
|
||||
}
|
||||
else
|
||||
{
|
||||
notedata.m_iNumTracks = 5;
|
||||
out.m_NotesType = NOTES_TYPE_PUMP_SINGLE;
|
||||
} else if( sFName.Find("_2") != -1 ) {
|
||||
/* XXX: insert note about pump couples here */
|
||||
out.m_NotesType = NOTES_TYPE_PUMP_COUPLE_2;
|
||||
}
|
||||
|
||||
out.m_sSMNoteData = notedata.GetSMNoteDataString();
|
||||
@@ -150,8 +151,6 @@ bool KSFLoader::LoadFromKSFDir( CString sDir, Song &out )
|
||||
// load the Notes from the rest of the KSF files
|
||||
for( int i=0; i<arrayKSFFileNames.GetSize(); i++ )
|
||||
{
|
||||
if( arrayKSFFileNames[i].Find("_2") != -1 )
|
||||
continue; // any "right-side" files should be loaded by Notes
|
||||
Notes* pNewNotes = new Notes;
|
||||
LoadFromKSFFile( out.m_sSongDir + arrayKSFFileNames[i], *pNewNotes );
|
||||
out.m_apNotes.Add( pNewNotes );
|
||||
|
||||
@@ -16,7 +16,11 @@
|
||||
//-----------------------------------------------------------------------------
|
||||
//#pragma comment(lib, "winmm.lib")
|
||||
#pragma comment(lib, "dxerr8.lib")
|
||||
|
||||
|
||||
// #define IL_DEBUG
|
||||
//#include <il/il.h>
|
||||
//#include <il/ilut.h>
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Includes
|
||||
//-----------------------------------------------------------------------------
|
||||
@@ -48,11 +52,13 @@ RageBitmapTexture::RageBitmapTexture(
|
||||
|
||||
m_pd3dTexture = NULL;
|
||||
|
||||
|
||||
//if( !LoadFromCacheFile() )
|
||||
Create( dwMaxSize, dwTextureColorDepth, iMipMaps, iAlphaBits, bDither, bStretch );
|
||||
|
||||
//SaveToCache();
|
||||
|
||||
|
||||
CreateFrameRects();
|
||||
}
|
||||
|
||||
@@ -60,7 +66,15 @@ RageBitmapTexture::~RageBitmapTexture()
|
||||
{
|
||||
SAFE_RELEASE(m_pd3dTexture);
|
||||
}
|
||||
|
||||
/*
|
||||
unsigned NextPower2(unsigned Num)
|
||||
{
|
||||
ILuint Power2 = 1;
|
||||
if (Num == 0) return 1;
|
||||
for (; Power2 < Num; Power2 <<= 1);
|
||||
return Power2;
|
||||
}
|
||||
*/
|
||||
void RageBitmapTexture::Reload(
|
||||
DWORD dwMaxSize,
|
||||
DWORD dwTextureColorDepth,
|
||||
@@ -96,6 +110,79 @@ void RageBitmapTexture::Create(
|
||||
{
|
||||
HRESULT hr;
|
||||
|
||||
#if 0
|
||||
unsigned ilNum;
|
||||
ilGenImages(1, &ilNum);
|
||||
|
||||
ilBindImage(ilNum);
|
||||
if( int err = ilGetError() ) throw RageException( "Error loading %s: %s", m_sFilePath, iluErrorString(err) );
|
||||
|
||||
// annoying
|
||||
ilLoadImage((ILstring)( (const char *) m_sFilePath ));
|
||||
if( int err = ilGetError() ) throw RageException( "Error loading %s: %s", m_sFilePath, iluErrorString(err) );
|
||||
|
||||
m_iSourceWidth = ilGetInteger(IL_IMAGE_WIDTH);
|
||||
m_iSourceHeight = ilGetInteger(IL_IMAGE_HEIGHT);
|
||||
|
||||
/* Texture sizes need to be a power of two. */
|
||||
m_iTextureWidth = NextPower2(ilGetInteger(IL_IMAGE_WIDTH));
|
||||
m_iTextureHeight = NextPower2(ilGetInteger(IL_IMAGE_HEIGHT));
|
||||
|
||||
// ...
|
||||
if(ilGetInteger(IL_IMAGE_FORMAT) != IL_BGRA)
|
||||
ilConvertImage(IL_BGRA, IL_UNSIGNED_BYTE);
|
||||
|
||||
/* If either texture dimension is too big, cap it. */
|
||||
m_iTextureWidth = min(m_iTextureWidth, int(dwMaxSize));
|
||||
m_iTextureHeight = min(m_iTextureHeight, int(dwMaxSize));
|
||||
|
||||
/* If we're stretching the image to the texture's resolution, change it: */
|
||||
if(bStretch) {
|
||||
m_iImageWidth = m_iTextureWidth;
|
||||
m_iImageHeight = m_iTextureHeight;
|
||||
} else {
|
||||
m_iImageWidth = m_iSourceWidth;
|
||||
m_iImageHeight = m_iSourceHeight;
|
||||
}
|
||||
|
||||
/* Scale it if necessary. */
|
||||
iluScale(m_iImageWidth, m_iImageHeight, 4);
|
||||
|
||||
if (FAILED(hr=m_pd3dDevice->CreateTexture(m_iTextureWidth, m_iTextureHeight,
|
||||
1, 0, D3DFMT_A8R8G8B8, D3DPOOL_MANAGED, &m_pd3dTexture)))
|
||||
throw RageException( hr, "IDirect3DDevice8::CreateTexture() failed for file '%s'.", m_sFilePath );
|
||||
|
||||
D3DLOCKED_RECT Rect;
|
||||
if (FAILED(hr=m_pd3dTexture->LockRect(0, &Rect, NULL, 0)))
|
||||
throw RageException( hr, "IDirect3DDevice8::LockRect() failed for file '%s'.", m_sFilePath );
|
||||
|
||||
unsigned long *from = (unsigned long *) ilGetData(),
|
||||
*to = (unsigned long *) Rect.pBits;
|
||||
|
||||
for(int row = 0; row < m_iImageHeight; ++row)
|
||||
{
|
||||
for(int col = 0; col < m_iImageWidth; ++col) {
|
||||
unsigned pixel = from[row*m_iImageWidth+col];
|
||||
|
||||
if(pixel == 0xFFFF00FF) pixel = 0x00000000;
|
||||
to[row*m_iTextureWidth+col] = pixel;
|
||||
}
|
||||
}
|
||||
|
||||
m_pd3dTexture->UnlockRect(0);
|
||||
|
||||
D3DSURFACE_DESC ddsd;
|
||||
if ( FAILED( hr = m_pd3dTexture->GetLevelDesc( 0, &ddsd ) ) )
|
||||
throw RageException( hr, "Could not get level Description of D3DX texture!" );
|
||||
|
||||
m_TextureFormat = ddsd.Format;
|
||||
|
||||
ilDeleteImages(1, &ilNum);
|
||||
|
||||
#endif
|
||||
|
||||
#if 1
|
||||
|
||||
// look in the file name for a format hints
|
||||
m_sFilePath.MakeLower();
|
||||
|
||||
@@ -214,6 +301,7 @@ void RageBitmapTexture::Create(
|
||||
m_iImageHeight = m_iSourceHeight;
|
||||
}
|
||||
|
||||
#endif
|
||||
LOG->Trace( "RageBitmapTexture: Loaded '%s' (%ux%u) from disk. bStretch = %d, source %d,%d; image %d,%d.",
|
||||
m_sFilePath,
|
||||
GetTextureWidth(),
|
||||
|
||||
@@ -22,6 +22,9 @@ enum Style
|
||||
STYLE_PUMP_SINGLE,
|
||||
STYLE_PUMP_VERSUS,
|
||||
STYLE_PUMP_DOUBLE,
|
||||
STYLE_PUMP_COUPLE,
|
||||
STYLE_PUMP_EDIT_COUPLE_1,
|
||||
STYLE_PUMP_EDIT_COUPLE_2,
|
||||
STYLE_EZ2_SINGLE,
|
||||
STYLE_EZ2_SINGLE_HARD,
|
||||
STYLE_EZ2_DOUBLE,
|
||||
@@ -32,11 +35,10 @@ enum Style
|
||||
STYLE_PARA_SINGLE,
|
||||
NUM_STYLES, // leave this at the end
|
||||
STYLE_NONE,
|
||||
STYLE_PUMP_COUPLE,
|
||||
};
|
||||
|
||||
const int NUM_DANCE_STYLES = 6;
|
||||
const int NUM_PUMP_STYLES = 3;
|
||||
const int NUM_DANCE_STYLES = 7;
|
||||
const int NUM_PUMP_STYLES = 6;
|
||||
const int NUM_EZ2_STYLES = 7;
|
||||
const int NUM_PARA_STYLES = 1;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user