no message
This commit is contained in:
@@ -38,7 +38,7 @@ Actor::Actor()
|
||||
m_fVibrationDistance = 5.0f;
|
||||
m_bVisibleThisFrame = FALSE;
|
||||
|
||||
m_bShadow = true;
|
||||
m_bShadow = false;
|
||||
m_fShadowLength = 4;
|
||||
|
||||
m_bBlendAdd = false;
|
||||
@@ -140,7 +140,7 @@ void Actor::Draw() // set the world matrix and calculate actor properties, the
|
||||
|
||||
void Actor::Update( float fDeltaTime )
|
||||
{
|
||||
// HELPER.Log( "Actor::Update( %f )", fDeltaTime );
|
||||
// LOG->WriteLine( "Actor::Update( %f )", fDeltaTime );
|
||||
|
||||
// update effect
|
||||
switch( m_Effect )
|
||||
@@ -165,7 +165,7 @@ void Actor::Update( float fDeltaTime )
|
||||
m_bTweeningTowardEndColor = TRUE;
|
||||
}
|
||||
}
|
||||
//HELPER.Log( "Actor::m_fPercentBetweenColors %f", m_fPercentBetweenColors );
|
||||
//LOG->WriteLine( "Actor::m_fPercentBetweenColors %f", m_fPercentBetweenColors );
|
||||
break;
|
||||
case wagging:
|
||||
m_fWagTimer += fDeltaTime;
|
||||
|
||||
@@ -23,7 +23,7 @@ void ActorFrame::RenderPrimitives()
|
||||
|
||||
void ActorFrame::Update( float fDeltaTime )
|
||||
{
|
||||
// HELPER.Log( "ActorFrame::Update( %f )", fDeltaTime );
|
||||
// LOG->WriteLine( "ActorFrame::Update( %f )", fDeltaTime );
|
||||
|
||||
Actor::Update( fDeltaTime );
|
||||
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
#include "ArrowEffects.h"
|
||||
#include "NoteMetadata.h"
|
||||
#include "ColorNote.h"
|
||||
#include "ScreenDimensions.h"
|
||||
#include "GameConstantsAndTypes.h"
|
||||
#include "GameManager.h"
|
||||
|
||||
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
#define _ArrowEffects_H_
|
||||
|
||||
|
||||
#include "GameTypes.h"
|
||||
#include "GameConstantsAndTypes.h"
|
||||
#include "StyleDef.h"
|
||||
|
||||
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
|
||||
#include "BPMDisplay.h"
|
||||
#include "RageUtil.h"
|
||||
#include "ScreenDimensions.h"
|
||||
#include "GameConstantsAndTypes.h"
|
||||
#include "ThemeManager.h"
|
||||
|
||||
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
|
||||
#include "Background.h"
|
||||
#include "RageUtil.h"
|
||||
#include "ScreenDimensions.h"
|
||||
#include "GameConstantsAndTypes.h"
|
||||
#include "ThemeManager.h"
|
||||
#include "PrefsManager.h"
|
||||
#include "RageBitmapTexture.h"
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
Desc: The song's banner displayed in SelectSong.
|
||||
|
||||
Copyright (c) 2001-2002 by the persons listed below. All rights reserved.
|
||||
Chris Danford
|
||||
-----------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
|
||||
@@ -0,0 +1,33 @@
|
||||
#include "stdafx.h"
|
||||
/*
|
||||
-----------------------------------------------------------------------------
|
||||
Class: BannerWithFrame
|
||||
|
||||
Desc: See header.
|
||||
|
||||
Copyright (c) 2001-2002 by the persons listed below. All rights reserved.
|
||||
Chris Danford
|
||||
-----------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
#include "BannerWithFrame.h"
|
||||
#include "RageUtil.h"
|
||||
#include "GameConstantsAndTypes.h"
|
||||
#include "ThemeManager.h"
|
||||
#include "RageLog.h"
|
||||
|
||||
|
||||
|
||||
BannerWithFrame::BannerWithFrame()
|
||||
{
|
||||
m_sprBannerFrame.Load( THEME->GetPathTo(GRAPHIC_RESULTS_BANNER_FRAME) );
|
||||
m_Banner.SetCroppedSize( m_sprBannerFrame.GetUnzoomedWidth()-6, m_sprBannerFrame.GetUnzoomedHeight()-6 );
|
||||
|
||||
this->AddActor( &m_Banner );
|
||||
this->AddActor( &m_sprBannerFrame );
|
||||
}
|
||||
|
||||
void BannerWithFrame::LoadFromSong( Song* pSong )
|
||||
{
|
||||
m_Banner.LoadFromSong( pSong );
|
||||
}
|
||||
@@ -0,0 +1,29 @@
|
||||
#pragma once
|
||||
/*
|
||||
-----------------------------------------------------------------------------
|
||||
Class: BannerWithFrame
|
||||
|
||||
Desc: bonus meters and max combo number.
|
||||
|
||||
Copyright (c) 2001-2002 by the persons listed below. All rights reserved.
|
||||
Chris Danford
|
||||
-----------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
#include "ActorFrame.h"
|
||||
#include "Sprite.h"
|
||||
#include "Banner.h"
|
||||
|
||||
|
||||
class BannerWithFrame : public ActorFrame
|
||||
{
|
||||
public:
|
||||
BannerWithFrame();
|
||||
|
||||
void LoadFromSong( Song* pSong );
|
||||
|
||||
protected:
|
||||
|
||||
Sprite m_sprBannerFrame;
|
||||
Banner m_Banner;
|
||||
};
|
||||
@@ -13,9 +13,8 @@
|
||||
#include "BitmapText.h"
|
||||
#include "IniFile.h"
|
||||
#include "FontManager.h"
|
||||
#include "RageHelper.h"
|
||||
#include "RageLog.h"
|
||||
#include "ErrorCatcher/ErrorCatcher.h"
|
||||
#include "PrefsManager.h"
|
||||
|
||||
|
||||
D3DXCOLOR RAINBOW_COLORS[] = {
|
||||
@@ -35,9 +34,6 @@ BitmapText::BitmapText()
|
||||
m_HorizAlign = align_center;
|
||||
m_VertAlign = align_middle;
|
||||
|
||||
m_fShadowLength = 2;
|
||||
|
||||
|
||||
m_pFont = NULL;
|
||||
|
||||
m_iNumLines = 0;
|
||||
@@ -51,6 +47,8 @@ BitmapText::BitmapText()
|
||||
m_iLineWidths[i] = 1;
|
||||
}
|
||||
|
||||
m_bShadow = true;
|
||||
|
||||
m_bRainbow = false;
|
||||
}
|
||||
|
||||
@@ -62,7 +60,7 @@ BitmapText::~BitmapText()
|
||||
|
||||
bool BitmapText::Load( const CString &sFontFilePath )
|
||||
{
|
||||
HELPER.Log( "BitmapText::LoadFromFontName(%s)", sFontFilePath );
|
||||
LOG->WriteLine( "BitmapText::LoadFromFontName(%s)", sFontFilePath );
|
||||
|
||||
// load font
|
||||
m_pFont = FONT->LoadFont( sFontFilePath );
|
||||
@@ -75,7 +73,7 @@ bool BitmapText::Load( const CString &sFontFilePath )
|
||||
|
||||
void BitmapText::SetText( CString sText )
|
||||
{
|
||||
//HELPER.Log( "BitmapText::SetText()" );
|
||||
//LOG->WriteLine( "BitmapText::SetText()" );
|
||||
|
||||
if( m_pFont->m_bCapitalsOnly )
|
||||
sText.MakeUpper();
|
||||
@@ -134,7 +132,7 @@ void BitmapText::SetText( CString sText )
|
||||
|
||||
void BitmapText::RebuildVertexBuffer()
|
||||
{
|
||||
//HELPER.Log( "BitmapText::RebuildVertexBuffer()" );
|
||||
//LOG->WriteLine( "BitmapText::RebuildVertexBuffer()" );
|
||||
|
||||
|
||||
|
||||
@@ -287,7 +285,7 @@ void BitmapText::RenderPrimitives()
|
||||
//////////////////////
|
||||
// render the shadow
|
||||
//////////////////////
|
||||
if( m_bShadow && PREFS && PREFS->GetCurrentGraphicProfileOptions()->m_bShadows )
|
||||
if( m_bShadow )
|
||||
{
|
||||
SCREEN->PushMatrix();
|
||||
SCREEN->TranslateLocal( m_fShadowLength, m_fShadowLength, 0 ); // shift by 5 units
|
||||
|
||||
@@ -32,9 +32,15 @@ public:
|
||||
return true;
|
||||
}
|
||||
|
||||
void CropToSize( float fHeight, float fWidth );
|
||||
void SetCroppedSize( float fWidth, float fHeight )
|
||||
{
|
||||
m_fCropWidth = fWidth;
|
||||
m_fCropHeight = fHeight;
|
||||
}
|
||||
|
||||
protected:
|
||||
void CropToSize( float fWidth, float fHeight );
|
||||
|
||||
float m_fCropWidth, m_fCropHeight;
|
||||
};
|
||||
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
|
||||
#include "DifficultyIcon.h"
|
||||
#include "RageUtil.h"
|
||||
#include "ScreenDimensions.h"
|
||||
#include "GameConstantsAndTypes.h"
|
||||
#include "ThemeManager.h"
|
||||
|
||||
|
||||
|
||||
@@ -15,13 +15,13 @@
|
||||
#include <stdio.h>
|
||||
#include "RageTextureManager.h"
|
||||
#include "RageUtil.h"
|
||||
#include "RageHelper.h"
|
||||
#include "RageLog.h"
|
||||
#include "ErrorCatcher/ErrorCatcher.h"
|
||||
|
||||
|
||||
Font::Font( const CString &sFontFilePath )
|
||||
{
|
||||
//HELPER.Log( "Font::LoadFromFontName(%s)", sFontFilePath );
|
||||
//LOG->WriteLine( "Font::LoadFromFontName(%s)", sFontFilePath );
|
||||
for( int i=0; i<MAX_FONT_CHARS; i++ )
|
||||
{
|
||||
m_iCharToFrameNo[i] = -1;
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
#include "FontManager.h"
|
||||
#include "Font.h"
|
||||
#include "RageUtil.h"
|
||||
#include "RageHelper.h"
|
||||
#include "RageLog.h"
|
||||
#include "ErrorCatcher/ErrorCatcher.h"
|
||||
|
||||
FontManager* FONT = NULL;
|
||||
@@ -38,7 +38,7 @@ FontManager::~FontManager()
|
||||
while( pos != NULL ) // iterate over all k/v pairs in map
|
||||
{
|
||||
m_mapPathToFont.GetNextAssoc( pos, sFontFilePath, pFont );
|
||||
HELPER.Log( "FONT LEAK: '%s', RefCount = %d.", sFontFilePath, pFont->m_iRefCount );
|
||||
LOG->WriteLine( "FONT LEAK: '%s', RefCount = %d.", sFontFilePath, pFont->m_iRefCount );
|
||||
SAFE_DELETE( pFont );
|
||||
}
|
||||
|
||||
@@ -53,7 +53,7 @@ Font* FontManager::LoadFont( CString sFontFilePath )
|
||||
{
|
||||
sFontFilePath.MakeLower();
|
||||
|
||||
// HELPER.Log( "FontManager::LoadFont(%s).", sFontFilePath );
|
||||
// LOG->WriteLine( "FontManager::LoadFont(%s).", sFontFilePath );
|
||||
|
||||
|
||||
// Convert the path to lowercase so that we don't load duplicates.
|
||||
@@ -65,7 +65,7 @@ Font* FontManager::LoadFont( CString sFontFilePath )
|
||||
|
||||
if( m_mapPathToFont.Lookup( sFontFilePath, pFont ) ) // if the texture already exists in the map
|
||||
{
|
||||
HELPER.Log( ssprintf("FontManager: The Font '%s' now has %d references.", sFontFilePath, pFont->m_iRefCount) );
|
||||
LOG->WriteLine( ssprintf("FontManager: The Font '%s' now has %d references.", sFontFilePath, pFont->m_iRefCount) );
|
||||
pFont->m_iRefCount++;
|
||||
}
|
||||
else // the texture is not already loaded
|
||||
@@ -75,7 +75,7 @@ Font* FontManager::LoadFont( CString sFontFilePath )
|
||||
|
||||
pFont = (Font*) new Font( sFontFilePath );
|
||||
|
||||
HELPER.Log( "FontManager: Loading '%s' from disk.", sFontFilePath);
|
||||
LOG->WriteLine( "FontManager: Loading '%s' from disk.", sFontFilePath);
|
||||
|
||||
m_mapPathToFont.SetAt( sFontFilePath, pFont );
|
||||
}
|
||||
@@ -100,11 +100,11 @@ void FontManager::UnloadFont( CString sFontFilePath )
|
||||
{
|
||||
sFontFilePath.MakeLower();
|
||||
|
||||
// HELPER.Log( "FontManager::UnloadTexture(%s).", sFontFilePath );
|
||||
// LOG->WriteLine( "FontManager::UnloadTexture(%s).", sFontFilePath );
|
||||
|
||||
if( sFontFilePath == "" )
|
||||
{
|
||||
HELPER.Log( "FontManager::UnloadTexture(): tried to Unload a blank" );
|
||||
LOG->WriteLine( "FontManager::UnloadTexture(): tried to Unload a blank" );
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -115,13 +115,13 @@ void FontManager::UnloadFont( CString sFontFilePath )
|
||||
pFont->m_iRefCount--;
|
||||
if( pFont->m_iRefCount == 0 ) // there are no more references to this texture
|
||||
{
|
||||
HELPER.Log( ssprintf("FontManager: '%s' will be deleted. It has %d references.", sFontFilePath, pFont->m_iRefCount) );
|
||||
LOG->WriteLine( ssprintf("FontManager: '%s' will be deleted. It has %d references.", sFontFilePath, pFont->m_iRefCount) );
|
||||
SAFE_DELETE( pFont ); // free the texture
|
||||
m_mapPathToFont.RemoveKey( sFontFilePath ); // and remove the key in the map
|
||||
}
|
||||
else
|
||||
{
|
||||
HELPER.Log( ssprintf("FontManager: '%s' will not be deleted. It still has %d references.", sFontFilePath, pFont->m_iRefCount) );
|
||||
LOG->WriteLine( ssprintf("FontManager: '%s' will not be deleted. It still has %d references.", sFontFilePath, pFont->m_iRefCount) );
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
|
||||
#include "FootMeter.h"
|
||||
#include "RageUtil.h"
|
||||
#include "ScreenDimensions.h"
|
||||
#include "GameConstantsAndTypes.h"
|
||||
#include "ThemeManager.h"
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,280 @@
|
||||
#pragma once
|
||||
/*
|
||||
-----------------------------------------------------------------------------
|
||||
File: GameConstantsAndTypes.h
|
||||
|
||||
Desc: These things don't change very often.
|
||||
|
||||
Copyright (c) 2001-2002 by the persons listed below. All rights reserved.
|
||||
Chris Danford
|
||||
-----------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
|
||||
#define SCREEN_WIDTH (640)
|
||||
#define SCREEN_HEIGHT (480)
|
||||
|
||||
#define SCREEN_LEFT (0)
|
||||
#define SCREEN_RIGHT (SCREEN_WIDTH)
|
||||
#define SCREEN_TOP (0)
|
||||
#define SCREEN_BOTTOM (SCREEN_HEIGHT)
|
||||
|
||||
#define CENTER_X (SCREEN_LEFT + (SCREEN_RIGHT - SCREEN_LEFT)/2.0f)
|
||||
#define CENTER_Y (SCREEN_TOP + (SCREEN_BOTTOM - SCREEN_TOP)/2.0f)
|
||||
|
||||
|
||||
const int MAX_NOTE_TRACKS = 16;
|
||||
|
||||
|
||||
const int MAX_MEASURES = 200; // this should be long enough to hold 10:00 minute songs (
|
||||
const int BEATS_PER_MEASURE = 4;
|
||||
const int MAX_BEATS = MAX_MEASURES * BEATS_PER_MEASURE;
|
||||
|
||||
const int ELEMENTS_PER_BEAT = 12; // It is important that this number is evenly divisible by 2, 3, 4, and 8
|
||||
const int ELEMENTS_PER_MEASURE = ELEMENTS_PER_BEAT * BEATS_PER_MEASURE;
|
||||
const int MAX_TAP_NOTE_ELEMENTS = MAX_BEATS*ELEMENTS_PER_BEAT;
|
||||
|
||||
const int MAX_HOLD_NOTE_ELEMENTS = 200;
|
||||
|
||||
const int NUM_RADAR_VALUES = 5;
|
||||
|
||||
enum DifficultyClass
|
||||
{
|
||||
CLASS_EASY, // corresponds to Basic
|
||||
CLASS_MEDIUM, // corresponds to Trick, Another, Standard
|
||||
CLASS_HARD, // corresponds to Maniac, SSR, Heavy
|
||||
NUM_DIFFICULTY_CLASSES
|
||||
};
|
||||
|
||||
enum GameMode
|
||||
{
|
||||
GAME_MODE_ARCADE,
|
||||
GAME_MODE_FREE_PLAY,
|
||||
GAME_MODE_NONSTOP,
|
||||
NUM_GAME_MODES
|
||||
};
|
||||
|
||||
enum GameButtonGraphic {
|
||||
GRAPHIC_NOTE_COLOR_PART,
|
||||
GRAPHIC_NOTE_GRAY_PART,
|
||||
GRAPHIC_RECEPTOR,
|
||||
GRAPHIC_TAP_EXPLOSION_BRIGHT,
|
||||
GRAPHIC_TAP_EXPLOSION_DIM,
|
||||
GRAPHIC_HOLD_EXPLOSION,
|
||||
NUM_GAME_BUTTON_GRAPHICS // leave this at the end
|
||||
};
|
||||
|
||||
|
||||
enum PlayerNumber {
|
||||
PLAYER_1 = 0,
|
||||
PLAYER_2,
|
||||
NUM_PLAYERS, // leave this at the end
|
||||
PLAYER_NONE
|
||||
};
|
||||
|
||||
inline D3DXCOLOR PlayerToColor( PlayerNumber p )
|
||||
{
|
||||
switch( p )
|
||||
{
|
||||
case PLAYER_1: return D3DXCOLOR(0.4f,1.0f,0.8f,1); // sea green
|
||||
case PLAYER_2: return D3DXCOLOR(1.0f,0.5f,0.2f,1); // orange
|
||||
default: ASSERT( false ); return D3DXCOLOR(1,1,1,1);
|
||||
}
|
||||
};
|
||||
inline D3DXCOLOR PlayerToColor( int p ) { return PlayerToColor( (PlayerNumber)p ); }
|
||||
|
||||
enum NoteType
|
||||
{
|
||||
NOTE_4TH, // quarter notes
|
||||
NOTE_8TH, // eighth notes
|
||||
NOTE_12TH, // triplets
|
||||
NOTE_16TH, // sixteenth notes
|
||||
NUM_NOTE_TYPES
|
||||
};
|
||||
|
||||
inline D3DXCOLOR NoteTypeToColor( NoteType nt )
|
||||
{
|
||||
switch( nt )
|
||||
{
|
||||
case NOTE_4TH: return D3DXCOLOR(1,0,0,1); // red
|
||||
case NOTE_8TH: return D3DXCOLOR(0,0,1,1); // blue
|
||||
case NOTE_12TH: return D3DXCOLOR(1,0,1,1); // purple
|
||||
case NOTE_16TH: return D3DXCOLOR(1,1,0,1); // yellow
|
||||
default: ASSERT( false ); return D3DXCOLOR(1,1,1,1);
|
||||
}
|
||||
};
|
||||
|
||||
inline float NoteTypeToBeat( NoteType nt )
|
||||
{
|
||||
switch( nt )
|
||||
{
|
||||
case NOTE_4TH: return 1.0f; // quarter notes
|
||||
case NOTE_8TH: return 1.0f/2; // eighth notes
|
||||
case NOTE_12TH: return 1.0f/3; // triplets
|
||||
case NOTE_16TH: return 1.0f/4; // sixteenth notes
|
||||
default: ASSERT( false ); return 0;
|
||||
}
|
||||
};
|
||||
|
||||
inline bool IsNoteOfType( int iNoteIndex, NoteType t )
|
||||
{
|
||||
switch( t )
|
||||
{
|
||||
case NOTE_4TH: return iNoteIndex % (ELEMENTS_PER_MEASURE/4) == 0;
|
||||
case NOTE_8TH: return iNoteIndex % (ELEMENTS_PER_MEASURE/8) == 0;
|
||||
case NOTE_12TH: return iNoteIndex % (ELEMENTS_PER_MEASURE/12) == 0;
|
||||
case NOTE_16TH: return iNoteIndex % (ELEMENTS_PER_MEASURE/16) == 0;
|
||||
default: ASSERT( false ); return false;
|
||||
}
|
||||
};
|
||||
|
||||
inline D3DXCOLOR GetNoteColorFromIndex( int iStepIndex )
|
||||
{
|
||||
for( int t=0; t<NUM_NOTE_TYPES; t++ )
|
||||
{
|
||||
if( IsNoteOfType( iStepIndex, (NoteType)t ) )
|
||||
return NoteTypeToColor( (NoteType)t );
|
||||
}
|
||||
return D3DXCOLOR(0.5f,0.5f,0.5f,1);
|
||||
};
|
||||
|
||||
typedef unsigned char TapNote;
|
||||
typedef unsigned char TrackNumber;
|
||||
typedef unsigned short NoteIndex;
|
||||
typedef TrackNumber ColumnNumber;
|
||||
|
||||
enum SongSortOrder {
|
||||
SORT_GROUP,
|
||||
SORT_TITLE,
|
||||
SORT_BPM,
|
||||
SORT_MOST_PLAYED,
|
||||
NUM_SORT_ORDERS
|
||||
};
|
||||
|
||||
|
||||
|
||||
struct GameOptions
|
||||
{
|
||||
GameOptions()
|
||||
{
|
||||
m_bIgnoreJoyAxes = false;
|
||||
m_bShowFPS = true;
|
||||
m_bUseRandomVis = false;
|
||||
m_bSkipCaution = false;
|
||||
m_bAnnouncer = true;
|
||||
m_iNumArcadeStages = 3;
|
||||
m_JudgementDifficulty = JUDGE_NORMAL;
|
||||
};
|
||||
bool m_bIgnoreJoyAxes;
|
||||
bool m_bShowFPS;
|
||||
bool m_bUseRandomVis;
|
||||
bool m_bSkipCaution;
|
||||
bool m_bAnnouncer;
|
||||
int m_iNumArcadeStages;
|
||||
enum JudgementDifficulty { JUDGE_EASY=0, JUDGE_NORMAL, JUDGE_HARD };
|
||||
JudgementDifficulty m_JudgementDifficulty;
|
||||
};
|
||||
|
||||
enum GraphicProfile
|
||||
{
|
||||
PROFILE_SUPER_LOW = 0,
|
||||
PROFILE_LOW,
|
||||
PROFILE_MEDIUM,
|
||||
PROFILE_HIGH,
|
||||
PROFILE_CUSTOM,
|
||||
NUM_GRAPHIC_PROFILES
|
||||
};
|
||||
|
||||
struct GraphicProfileOptions
|
||||
{
|
||||
char m_szProfileName[30];
|
||||
DWORD m_dwWidth;
|
||||
DWORD m_dwHeight;
|
||||
DWORD m_dwMaxTextureSize;
|
||||
DWORD m_dwDisplayColor;
|
||||
DWORD m_dwTextureColor;
|
||||
bool m_bBackgrounds;
|
||||
};
|
||||
|
||||
inline DWORD GetHeightFromWidth( DWORD dwWidth )
|
||||
{
|
||||
switch( dwWidth )
|
||||
{
|
||||
case 320: return 240;
|
||||
case 400: return 300;
|
||||
case 512: return 384;
|
||||
case 640: return 480;
|
||||
case 800: return 600;
|
||||
case 1024: return 768;
|
||||
case 1280: return 1024;
|
||||
default: return 480;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
struct PlayerOptions
|
||||
{
|
||||
PlayerOptions() {
|
||||
m_fArrowScrollSpeed = 1.0f;
|
||||
m_EffectType = EFFECT_NONE;
|
||||
m_AppearanceType = APPEARANCE_VISIBLE;
|
||||
m_TurnType = TURN_NONE;
|
||||
m_bLittle = false;
|
||||
m_bReverseScroll = false;
|
||||
m_ColorType = COLOR_ARCADE;
|
||||
m_bAllowFreezeArrows = true;
|
||||
m_DrainType = DRAIN_NORMAL;
|
||||
|
||||
m_fInitialLifePercentage = 0.5f;
|
||||
m_fLifeAdjustments[LIFE_PERFECT] = 0.010f;
|
||||
m_fLifeAdjustments[LIFE_GREAT] = 0.005f;
|
||||
m_fLifeAdjustments[LIFE_GOOD] = 0.000f;
|
||||
m_fLifeAdjustments[LIFE_BOO] = -0.015f;
|
||||
m_fLifeAdjustments[LIFE_MISS] = -0.030f;
|
||||
};
|
||||
|
||||
float m_fArrowScrollSpeed;
|
||||
enum EffectType { EFFECT_NONE=0, EFFECT_BOOST, EFFECT_WAVE, EFFECT_DRUNK, EFFECT_DIZZY, EFFECT_SPACE };
|
||||
EffectType m_EffectType;
|
||||
enum AppearanceType { APPEARANCE_VISIBLE=0, APPEARANCE_HIDDEN, APPEARANCE_SUDDEN, APPEARANCE_STEALTH };
|
||||
AppearanceType m_AppearanceType;
|
||||
enum TurnType { TURN_NONE=0, TURN_MIRROR, TURN_LEFT, TURN_RIGHT, TURN_SHUFFLE };
|
||||
TurnType m_TurnType;
|
||||
bool m_bLittle;
|
||||
bool m_bReverseScroll;
|
||||
enum ColorType { COLOR_ARCADE=0, COLOR_NOTE, COLOR_FLAT, COLOR_PLAIN };
|
||||
ColorType m_ColorType;
|
||||
bool m_bAllowFreezeArrows;
|
||||
enum DrainType { DRAIN_NORMAL=0, DRAIN_NO_RECOVER, DRAIN_SUDDEN_DEATH };
|
||||
DrainType m_DrainType;
|
||||
|
||||
float m_fInitialLifePercentage;
|
||||
enum LifeAdjustmentType { LIFE_PERFECT=0, LIFE_GREAT, LIFE_GOOD, LIFE_BOO, LIFE_MISS, NUM_LIFE_ADJUSTMENTS };
|
||||
float m_fLifeAdjustments[NUM_LIFE_ADJUSTMENTS];
|
||||
};
|
||||
|
||||
struct SongOptions
|
||||
{
|
||||
SongOptions() {
|
||||
m_FailType = FAIL_ARCADE;
|
||||
m_AssistType = ASSIST_NONE;
|
||||
m_fMusicRate = 1.0f;
|
||||
m_fMusicPitch = 0.0f;
|
||||
m_bShowMeasureBars = false;
|
||||
};
|
||||
|
||||
enum FailType { FAIL_ARCADE=0, FAIL_END_OF_SONG, FAIL_OFF };
|
||||
FailType m_FailType;
|
||||
enum AssistType { ASSIST_NONE=0, ASSIST_TICK };
|
||||
AssistType m_AssistType;
|
||||
float m_fMusicRate;
|
||||
float m_fMusicPitch;
|
||||
bool m_bShowMeasureBars;
|
||||
};
|
||||
|
||||
|
||||
struct ScoreSummary {
|
||||
ScoreSummary() { perfect=great=good=boo=miss=ok=ng=max_combo=0; score=0; };
|
||||
int perfect, great, good, boo, miss, ok, ng, max_combo;
|
||||
float score;
|
||||
};
|
||||
@@ -11,7 +11,7 @@
|
||||
*/
|
||||
|
||||
#include "GameDef.h"
|
||||
#include "RageHelper.h"
|
||||
#include "RageLog.h"
|
||||
#include "RageUtil.h"
|
||||
#include "ErrorCatcher/ErrorCatcher.h"
|
||||
#include "IniFile.h"
|
||||
@@ -20,7 +20,7 @@
|
||||
|
||||
GameDef::GameDef( CString sGameDir )
|
||||
{
|
||||
HELPER.Log( "GameDef::GameDef( '%s )", sGameDir );
|
||||
LOG->WriteLine( "GameDef::GameDef( '%s )", sGameDir );
|
||||
|
||||
sGameDir.TrimRight( "/\\" ); // trim off the trailing slash if any
|
||||
m_sGameDir = sGameDir + "\\";
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
#include "NoteMetadata.h"
|
||||
#include "NoteData.h"
|
||||
#include "GameInput.h"
|
||||
#include "GameTypes.h"
|
||||
#include "GameConstantsAndTypes.h"
|
||||
#include "MenuInput.h"
|
||||
|
||||
|
||||
|
||||
@@ -84,10 +84,35 @@ StyleDef* GameManager::GetStyleDef( CString sGame, CString sStyle )
|
||||
return NULL;
|
||||
}
|
||||
|
||||
void GameManager::SwitchGame( CString sGame )
|
||||
{
|
||||
m_sCurrentGame = sGame;
|
||||
m_pCurrentGameDef = GetGameDef( sGame );
|
||||
if( m_pCurrentGameDef == NULL )
|
||||
FatalError( "SwitchGame failed. The game '%s' is not present.", sGame );
|
||||
|
||||
for( int p=0; p<NUM_PLAYERS; p++ )
|
||||
m_sCurrentSkin[p] = m_pCurrentGameDef->m_sSkinFolders[0];
|
||||
};
|
||||
|
||||
void GameManager::SwitchStyle( CString sStyle )
|
||||
{
|
||||
m_sCurrentStyle = sStyle;
|
||||
m_pCurrentStyleDef = GetStyleDef( m_sCurrentGame, sStyle );
|
||||
ASSERT( m_pCurrentStyleDef != NULL );
|
||||
};
|
||||
|
||||
void GameManager::SwitchSkin( PlayerNumber p, CString sSkin )
|
||||
{
|
||||
if( !m_pCurrentGameDef->HasASkinNamed( sSkin ) )
|
||||
FatalError( "The current game doesn't have a skin named '%s'.", sSkin );
|
||||
|
||||
m_sCurrentSkin[p] = sSkin;
|
||||
}
|
||||
|
||||
void GameManager::GetGameNames( CStringArray &arrayGameNames )
|
||||
{
|
||||
for( int i=0; i<MAX_GAME_DEFS; i++ )
|
||||
for( int i=0; i<m_iNumGameDefs; i++ )
|
||||
arrayGameNames.Add( m_pGameDefs[i]->m_sName );
|
||||
}
|
||||
|
||||
@@ -111,15 +136,6 @@ void GameManager::GetSkinNames( CString sGameName, CStringArray &arraySkinNames
|
||||
arraySkinNames.Add( pGameDef->m_sSkinFolders[i] );
|
||||
}
|
||||
|
||||
void GameManager::SwitchSkin( PlayerNumber p, CString sSkin )
|
||||
{
|
||||
if( !m_pCurrentGameDef->HasASkinNamed( sSkin ) )
|
||||
FatalError( "The current game doesn't have a skin named '%s'.", sSkin );
|
||||
|
||||
m_sCurrentSkin[p] = sSkin;
|
||||
}
|
||||
|
||||
|
||||
bool GameManager::IsPlayerEnabled( PlayerNumber PlayerNo )
|
||||
{
|
||||
StyleDef* pStyleDef = GetCurrentStyleDef();
|
||||
|
||||
@@ -24,21 +24,8 @@ public:
|
||||
~GameManager();
|
||||
|
||||
void ReadGamesAndStylesFromDir( CString sDir );
|
||||
void SwitchGame( CString sGame )
|
||||
{
|
||||
m_sCurrentGame = sGame;
|
||||
m_pCurrentGameDef = GetGameDef( sGame );
|
||||
ASSERT( m_pCurrentGameDef != NULL );
|
||||
|
||||
for( int p=0; p<NUM_PLAYERS; p++ )
|
||||
m_sCurrentSkin[p] = m_pCurrentGameDef->m_sSkinFolders[0];
|
||||
};
|
||||
void SwitchStyle( CString sStyle )
|
||||
{
|
||||
m_sCurrentStyle = sStyle;
|
||||
m_pCurrentStyleDef = GetStyleDef( m_sCurrentGame, sStyle );
|
||||
ASSERT( m_pCurrentStyleDef != NULL );
|
||||
};
|
||||
void SwitchGame( CString sGame );
|
||||
void SwitchStyle( CString sStyle );
|
||||
void SwitchSkin( PlayerNumber p, CString sSkin );
|
||||
|
||||
CString m_sCurrentGame; // currently only "dance"
|
||||
@@ -50,6 +37,7 @@ public:
|
||||
void GetGameNames( CStringArray &arrayGameNames );
|
||||
void GetStyleNames( CString sGameName, CStringArray &arrayStyleNames );
|
||||
void GetSkinNames( CString sGameName, CStringArray &arraySkinNames );
|
||||
void GetSkinNames( CStringArray &arraySkinNames ) { GetSkinNames( m_sCurrentGame, arraySkinNames ); };
|
||||
|
||||
bool IsPlayerEnabled( PlayerNumber PlayerNo );
|
||||
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
|
||||
#include "GhostArrowRow.h"
|
||||
#include "RageUtil.h"
|
||||
#include "ScreenDimensions.h"
|
||||
#include "GameConstantsAndTypes.h"
|
||||
#include "ThemeManager.h"
|
||||
#include "ColorNote.h"
|
||||
#include "ArrowEffects.h"
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
#include "GhostArrow.h"
|
||||
#include "GhostArrowBright.h"
|
||||
#include "HoldGhostArrow.h"
|
||||
#include "GameTypes.h"
|
||||
#include "GameConstantsAndTypes.h"
|
||||
#include "StyleDef.h"
|
||||
|
||||
|
||||
|
||||
@@ -11,11 +11,67 @@
|
||||
|
||||
|
||||
|
||||
#include "Grade.h"
|
||||
#include "GradeDisplay.h"
|
||||
#include "RageUtil.h"
|
||||
#include "ScreenDimensions.h"
|
||||
#include "GameConstantsAndTypes.h"
|
||||
#include "ThemeManager.h"
|
||||
|
||||
|
||||
const float SCROLL_TIME = 5.0f;
|
||||
|
||||
|
||||
GradeDisplay::GradeDisplay()
|
||||
{
|
||||
Load( THEME->GetPathTo(GRAPHIC_RESULTS_GRADES) );
|
||||
StopAnimating();
|
||||
|
||||
m_fTimeLeftInScroll = 0;
|
||||
|
||||
// SetGrade( GRADE_NO_DATA );
|
||||
}
|
||||
|
||||
void GradeDisplay::Update( float fDeltaTime )
|
||||
{
|
||||
Sprite::Update( fDeltaTime );
|
||||
|
||||
m_fTimeLeftInScroll -= fDeltaTime;
|
||||
m_fTimeLeftInScroll = max( 0, m_fTimeLeftInScroll );
|
||||
|
||||
const float fPercentIntoScrolling = 1 - (m_fTimeLeftInScroll/SCROLL_TIME);
|
||||
FRECT frectCurrentTextureCoords;
|
||||
frectCurrentTextureCoords.left = m_frectStartTexCoords.left*(1-fPercentIntoScrolling) + m_frectDestTexCoords.left*fPercentIntoScrolling;
|
||||
frectCurrentTextureCoords.top = m_frectStartTexCoords.top*(1-fPercentIntoScrolling) + m_frectDestTexCoords.top*fPercentIntoScrolling;
|
||||
frectCurrentTextureCoords.right = m_frectStartTexCoords.right*(1-fPercentIntoScrolling) + m_frectDestTexCoords.right*fPercentIntoScrolling;
|
||||
frectCurrentTextureCoords.bottom = m_frectStartTexCoords.bottom*(1-fPercentIntoScrolling) + m_frectDestTexCoords.bottom*fPercentIntoScrolling;
|
||||
|
||||
this->SetCustomTextureRect( frectCurrentTextureCoords );
|
||||
}
|
||||
|
||||
void GradeDisplay::SetGrade( Grade g )
|
||||
{
|
||||
// StopUsingCustomCoords();
|
||||
|
||||
// SetDiffuseColor( D3DXCOLOR(1,1,1,1) );
|
||||
|
||||
switch( g )
|
||||
{
|
||||
case GRADE_AAA: SetState(0); break;
|
||||
case GRADE_AA: SetState(1); break;
|
||||
case GRADE_A: SetState(2); break;
|
||||
case GRADE_B: SetState(3); break;
|
||||
case GRADE_C: SetState(4); break;
|
||||
case GRADE_D: SetState(5); break;
|
||||
case GRADE_E: SetState(6); break;
|
||||
// case GRADE_NO_DATA: SetDiffuseColor( D3DXCOLOR(1,1,1,0) ); break;
|
||||
default: ASSERT( false );
|
||||
}
|
||||
};
|
||||
|
||||
void GradeDisplay::SpinAndSettleOn( Grade g )
|
||||
{
|
||||
SetDiffuseColor( D3DXCOLOR(1,1,1,1) );
|
||||
|
||||
m_frectStartTexCoords = *m_pTexture->GetTextureCoordRect( 0 );
|
||||
m_frectDestTexCoords = *m_pTexture->GetTextureCoordRect( 6 );
|
||||
m_fTimeLeftInScroll = SCROLL_TIME;
|
||||
}
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
#pragma once
|
||||
/*
|
||||
-----------------------------------------------------------------------------
|
||||
File: GradeDisplay.h
|
||||
@@ -9,10 +10,6 @@
|
||||
*/
|
||||
|
||||
|
||||
#ifndef _GradeDisplay_H_
|
||||
#define _GradeDisplay_H_
|
||||
|
||||
|
||||
#include "Sprite.h"
|
||||
#include "ThemeManager.h"
|
||||
#include "Grade.h"
|
||||
@@ -22,32 +19,18 @@
|
||||
class GradeDisplay : public Sprite
|
||||
{
|
||||
public:
|
||||
GradeDisplay()
|
||||
{
|
||||
Load( THEME->GetPathTo(GRAPHIC_GRADES) );
|
||||
StopAnimating();
|
||||
SetGrade( GRADE_NO_DATA );
|
||||
};
|
||||
|
||||
void SetGrade( Grade g )
|
||||
{
|
||||
switch( g )
|
||||
{
|
||||
case GRADE_AAA: SetState(0); break;
|
||||
case GRADE_AA: SetState(1); break;
|
||||
case GRADE_A: SetState(2); break;
|
||||
case GRADE_B: SetState(3); break;
|
||||
case GRADE_C: SetState(4); break;
|
||||
case GRADE_D: SetState(5); break;
|
||||
case GRADE_E: SetState(6); break;
|
||||
case GRADE_NO_DATA: SetState(7); break;
|
||||
default: ASSERT( false );
|
||||
}
|
||||
};
|
||||
GradeDisplay();
|
||||
|
||||
virtual void Update( float fDeltaTime );
|
||||
|
||||
void SetGrade( Grade g );
|
||||
void SpinAndSettleOn( Grade g );
|
||||
|
||||
protected:
|
||||
|
||||
// for scrolling
|
||||
void ScrollToVirtualFrame( int iFrameNo ); // a virtual frame is a tiled state number
|
||||
FRECT m_frectStartTexCoords;
|
||||
FRECT m_frectDestTexCoords;
|
||||
float m_fTimeLeftInScroll;
|
||||
};
|
||||
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
|
||||
#include "GrayArrowRow.h"
|
||||
#include "RageUtil.h"
|
||||
#include "ScreenDimensions.h"
|
||||
#include "GameConstantsAndTypes.h"
|
||||
#include "ThemeManager.h"
|
||||
#include "ColorNote.h"
|
||||
#include "ArrowEffects.h"
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
#include "GrayArrow.h"
|
||||
#include "ActorFrame.h"
|
||||
#include "StyleDef.h"
|
||||
#include "GameTypes.h"
|
||||
#include "GameConstantsAndTypes.h"
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
#include "GrooveRadar.h"
|
||||
#include "ThemeManager.h"
|
||||
#include "RageBitmapTexture.h"
|
||||
#include "GameConstants.h"
|
||||
#include "GameConstantsAndTypes.h"
|
||||
|
||||
|
||||
float RADAR_VALUE_ROTATION( int iValueIndex ) { return D3DX_PI/2 + D3DX_PI*2 / 5.0f * iValueIndex; }
|
||||
@@ -127,7 +127,7 @@ void GrooveRadar::RenderPrimitives()
|
||||
//
|
||||
pVB->Lock( 0, 0, (BYTE**)&v, 0 );
|
||||
|
||||
D3DXCOLOR color = PLAYER_COLOR[p];
|
||||
D3DXCOLOR color = PlayerToColor( (PlayerNumber)p );
|
||||
color.a = 0.5f;
|
||||
v[0].p = D3DXVECTOR3( 0, 0, 0 );
|
||||
v[0].color = color;
|
||||
@@ -172,8 +172,8 @@ void GrooveRadar::RenderPrimitives()
|
||||
|
||||
v[i*2+0].p = D3DXVECTOR3( fXInner, fYInner, 0 );
|
||||
v[i*2+1].p = D3DXVECTOR3( fXOutter, fYOutter, 0 );
|
||||
v[i*2+0].color = PLAYER_COLOR[p];
|
||||
v[i*2+1].color = PLAYER_COLOR[p];
|
||||
v[i*2+0].color = PlayerToColor( (PlayerNumber)p );
|
||||
v[i*2+1].color = PlayerToColor( (PlayerNumber)p );
|
||||
}
|
||||
|
||||
pVB->Unlock();
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
|
||||
#include "HoldJudgement.h"
|
||||
#include "RageUtil.h"
|
||||
#include "ScreenDimensions.h"
|
||||
#include "GameConstantsAndTypes.h"
|
||||
#include "ThemeManager.h"
|
||||
|
||||
|
||||
@@ -45,7 +45,7 @@ void HoldJudgement::RenderPrimitives()
|
||||
|
||||
void HoldJudgement::SetHoldJudgement( HoldNoteResult result )
|
||||
{
|
||||
//HELPER.Log( "Judgement::SetJudgement()" );
|
||||
//LOG->WriteLine( "Judgement::SetJudgement()" );
|
||||
|
||||
switch( result )
|
||||
{
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
|
||||
#include <math.h> // for fmod
|
||||
#include "InputFilter.h"
|
||||
#include "RageHelper.h"
|
||||
#include "RageLog.h"
|
||||
#include "RageInput.h"
|
||||
#include "ErrorCatcher/ErrorCatcher.h"
|
||||
|
||||
|
||||
@@ -17,7 +17,8 @@
|
||||
const float TIME_BEFORE_SLOW_REPEATS = 0.7f;
|
||||
const float TIME_BEFORE_FAST_REPEATS = 2.0f;
|
||||
|
||||
const float TIME_BETWEEN_SLOW_REPEATS = 0.25f;
|
||||
//const float TIME_BETWEEN_SLOW_REPEATS = 0.25f;
|
||||
const float TIME_BETWEEN_SLOW_REPEATS = 0.125f;
|
||||
const float TIME_BETWEEN_FAST_REPEATS = 0.125f;
|
||||
|
||||
enum InputEventType { IET_FIRST_PRESS, IET_SLOW_REPEAT, IET_FAST_REPEAT, IET_RELEASE };
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
#include "GameInput.h"
|
||||
#include "MenuInput.h"
|
||||
#include "StyleInput.h"
|
||||
#include "GameTypes.h"
|
||||
#include "GameConstantsAndTypes.h"
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
|
||||
#include "Judgement.h"
|
||||
#include "RageUtil.h"
|
||||
#include "ScreenDimensions.h"
|
||||
#include "GameConstantsAndTypes.h"
|
||||
#include "ThemeManager.h"
|
||||
|
||||
|
||||
@@ -46,7 +46,7 @@ void Judgement::RenderPrimitives()
|
||||
|
||||
void Judgement::SetJudgement( TapNoteScore score )
|
||||
{
|
||||
//HELPER.Log( "Judgement::SetJudgement()" );
|
||||
//LOG->WriteLine( "Judgement::SetJudgement()" );
|
||||
|
||||
switch( score )
|
||||
{
|
||||
|
||||
@@ -15,9 +15,9 @@
|
||||
#include "RageMusic.h"
|
||||
#include "WindowManager.h"
|
||||
#include "WindowDancing.h"
|
||||
#include "ScreenDimensions.h"
|
||||
#include "GameConstantsAndTypes.h"
|
||||
#include "ThemeManager.h"
|
||||
#include "RageHelper.h"
|
||||
#include "RageLog.h"
|
||||
|
||||
|
||||
const float HELP_X = CENTER_X;
|
||||
@@ -34,7 +34,7 @@ MenuElements::MenuElements()
|
||||
|
||||
void MenuElements::Load( CString sBackgroundPath, CString sTopEdgePath, CString sHelpText )
|
||||
{
|
||||
HELPER.Log( "MenuElements::MenuElements()" );
|
||||
LOG->WriteLine( "MenuElements::MenuElements()" );
|
||||
|
||||
|
||||
m_sprBG.Load( sBackgroundPath );
|
||||
@@ -85,8 +85,6 @@ void MenuElements::TweenTopEdgeOnScreen()
|
||||
|
||||
void MenuElements::TweenTopEdgeOffScreen()
|
||||
{
|
||||
SetTopEdgeOnScreen();
|
||||
|
||||
m_sprTopEdge.BeginTweening( MENU_ELEMENTS_TWEEN_TIME*2, TWEEN_BIAS_END );
|
||||
m_sprTopEdge.SetTweenX( SCREEN_WIDTH*1.5f );
|
||||
|
||||
@@ -113,8 +111,6 @@ void MenuElements::TweenBackgroundOnScreen()
|
||||
|
||||
void MenuElements::TweenBackgroundOffScreen()
|
||||
{
|
||||
SetBackgroundOnScreen();
|
||||
|
||||
m_sprBottomEdge.BeginTweening( MENU_ELEMENTS_TWEEN_TIME );
|
||||
m_sprBottomEdge.SetTweenY( SCREEN_HEIGHT + m_sprTopEdge.GetZoomedHeight() );
|
||||
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
-----------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
#include "GameTypes.h"
|
||||
#include "GameConstantsAndTypes.h"
|
||||
|
||||
enum MenuButton
|
||||
{
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
|
||||
#include "MusicSortDisplay.h"
|
||||
#include "RageUtil.h"
|
||||
#include "ScreenDimensions.h"
|
||||
#include "GameConstantsAndTypes.h"
|
||||
#include "MusicWheel.h"
|
||||
#include "MusicSortDisplay.h"
|
||||
|
||||
|
||||
@@ -16,7 +16,7 @@ class MusicSortDisplay;
|
||||
|
||||
|
||||
#include "Sprite.h"
|
||||
#include "GameTypes.h"
|
||||
#include "GameConstantsAndTypes.h"
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
|
||||
#include "MusicStatusDisplay.h"
|
||||
#include "RageUtil.h"
|
||||
#include "ScreenDimensions.h"
|
||||
#include "GameConstantsAndTypes.h"
|
||||
#include "MusicWheel.h"
|
||||
#include "MusicStatusDisplay.h"
|
||||
|
||||
|
||||
@@ -1,11 +1,12 @@
|
||||
#include "stdafx.h"
|
||||
/*
|
||||
-----------------------------------------------------------------------------
|
||||
File: MusicWheel.h
|
||||
Class: MusicWheel
|
||||
|
||||
Desc: A graphic displayed in the MusicWheel during Dancing.
|
||||
Desc: See header.
|
||||
|
||||
Copyright (c) 2001-2002 by the persons listed below. All rights reserved.
|
||||
Chris Danford
|
||||
-----------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
@@ -13,12 +14,11 @@
|
||||
#include "RageUtil.h"
|
||||
#include "SongManager.h"
|
||||
#include "GameManager.h"
|
||||
#include "ScreenDimensions.h"
|
||||
#include "ThemeManager.h"
|
||||
#include "RageMusic.h"
|
||||
#include "WindowManager.h" // for sending SM_PlayMusicSample
|
||||
#include "RageHelper.h"
|
||||
#include "GameConstants.h"
|
||||
#include "RageLog.h"
|
||||
#include "GameConstantsAndTypes.h"
|
||||
|
||||
|
||||
|
||||
@@ -35,31 +35,9 @@ const float SORT_ICON_OFF_SCREEN_Y = SORT_ICON_ON_SCREEN_Y - 64;
|
||||
const float SCORE_X = 86;
|
||||
const float SCORE_Y[NUM_PLAYERS] = { -34, 34 };
|
||||
|
||||
const float SCROLLBAR_X = 150;
|
||||
|
||||
D3DXCOLOR COLOR_BANNER_TINTS[] = {
|
||||
D3DXCOLOR( 0.9f, 0.0f, 0.2f, 1 ), // red
|
||||
D3DXCOLOR( 0.6f, 0.0f, 0.4f, 1 ), // pink
|
||||
D3DXCOLOR( 0.3f, 0.2f, 0.4f, 1 ), // purple
|
||||
D3DXCOLOR( 0.0f, 0.4f, 0.8f, 1 ), // sky blue
|
||||
D3DXCOLOR( 0.0f, 0.6f, 0.6f, 1 ), // sea green
|
||||
D3DXCOLOR( 0.0f, 0.6f, 0.2f, 1 ), // green
|
||||
D3DXCOLOR( 0.8f, 0.6f, 0.0f, 1 ), // orange
|
||||
};
|
||||
const int NUM_BANNER_TINTS = sizeof(COLOR_BANNER_TINTS) / sizeof(D3DXCOLOR);
|
||||
|
||||
D3DXCOLOR COLOR_SECTION_TINTS[] = {
|
||||
D3DXCOLOR( 0.9f, 0.0f, 0.2f, 1 ), // red
|
||||
D3DXCOLOR( 0.6f, 0.0f, 0.4f, 1 ), // pink
|
||||
D3DXCOLOR( 0.3f, 0.2f, 0.4f, 1 ), // purple
|
||||
D3DXCOLOR( 0.0f, 0.4f, 0.8f, 1 ), // sky blue
|
||||
D3DXCOLOR( 0.0f, 0.6f, 0.6f, 1 ), // sea green
|
||||
D3DXCOLOR( 0.0f, 0.6f, 0.2f, 1 ), // green
|
||||
D3DXCOLOR( 0.8f, 0.6f, 0.0f, 1 ), // orange
|
||||
};
|
||||
const int NUM_SECTION_TINTS = sizeof(COLOR_SECTION_TINTS) / sizeof(D3DXCOLOR);
|
||||
|
||||
|
||||
D3DXCOLOR COLOR_SECTION_LETTER = D3DXCOLOR(1,1,0.3f,1);
|
||||
D3DXCOLOR COLOR_SECTION_LETTERS = D3DXCOLOR(1,1,0.3f,1);
|
||||
|
||||
|
||||
WheelItemData::WheelItemData()
|
||||
@@ -72,7 +50,6 @@ void WheelItemData::LoadFromSectionName( const CString &sSectionName )
|
||||
{
|
||||
m_WheelItemType = TYPE_SECTION;
|
||||
m_sSectionName = sSectionName;
|
||||
m_colorTint = D3DXCOLOR(0.5f,0.5f,0.5f,1);
|
||||
}
|
||||
|
||||
|
||||
@@ -103,11 +80,12 @@ WheelItemDisplay::WheelItemDisplay()
|
||||
m_textSectionName.SetVertAlign( align_middle );
|
||||
m_textSectionName.SetXY( m_sprSectionBar.GetX() - m_sprSectionBar.GetUnzoomedWidth()/2 + 10, 0 );
|
||||
m_textSectionName.SetZoom( 1.0f );
|
||||
m_textSectionName.SetDiffuseColor( COLOR_SECTION_LETTER );
|
||||
m_textSectionName.SetDiffuseColor( COLOR_SECTION_LETTERS );
|
||||
|
||||
for( int p=0; p<NUM_PLAYERS; p++ )
|
||||
{
|
||||
m_GradeDisplay[p].SetZoom( 0.5f );
|
||||
m_GradeDisplay[p].Load( THEME->GetPathTo(GRAPHIC_SELECT_MUSIC_SMALL_GRADES) );
|
||||
m_GradeDisplay[p].SetZoom( 1.0f );
|
||||
m_GradeDisplay[p].SetXY( 90.0f + p*30.0f, 0 );
|
||||
}
|
||||
}
|
||||
@@ -120,7 +98,6 @@ void WheelItemDisplay::LoadFromWheelItemData( WheelItemData* pWID )
|
||||
|
||||
// copy all data items
|
||||
m_WheelItemType = pWID->m_WheelItemType;
|
||||
m_colorTint = pWID->m_colorTint;
|
||||
m_sSectionName = pWID->m_sSectionName;
|
||||
m_pSong = pWID->m_pSong;
|
||||
m_MusicStatusDisplayType = pWID->m_MusicStatusDisplayType;
|
||||
@@ -139,22 +116,23 @@ void WheelItemDisplay::LoadFromWheelItemData( WheelItemData* pWID )
|
||||
else
|
||||
m_textSectionName.SetZoom( 1 );
|
||||
m_textSectionName.SetText( sDisplayName );
|
||||
m_textSectionName.SetDiffuseColor( COLOR_SECTION_LETTERS );
|
||||
|
||||
float fTextWidth, fSpriteWidth;
|
||||
fTextWidth = m_textSectionName.GetWidestLineWidthInSourcePixels() * m_textSectionName.GetZoom();
|
||||
fSpriteWidth = m_sprSectionBar.GetUnzoomedWidth() * m_sprSectionBar.GetZoom() - 20;
|
||||
if( fTextWidth > fSpriteWidth )
|
||||
m_textSectionName.SetZoomX( m_textSectionName.GetZoom() * fSpriteWidth / fTextWidth );
|
||||
m_sprSectionBar.SetDiffuseColor( m_colorTint );
|
||||
m_sprSectionBar.SetDiffuseColor( SONG->GetGroupColor( m_pSong->GetGroupName() ) );
|
||||
}
|
||||
break;
|
||||
case TYPE_SONG:
|
||||
{
|
||||
m_Banner.LoadFromSong( m_pSong );
|
||||
D3DXCOLOR color = m_colorTint;
|
||||
color.r += 0.4f;
|
||||
color.g += 0.4f;
|
||||
color.b += 0.4f;
|
||||
D3DXCOLOR color = SONG->GetGroupColor( m_pSong->GetGroupName() );
|
||||
color.r += 0.15f;
|
||||
color.g += 0.15f;
|
||||
color.b += 0.15f;
|
||||
m_Banner.SetDiffuseColor( color );
|
||||
m_MusicStatusDisplay.SetType( m_MusicStatusDisplayType );
|
||||
RefreshGrades();
|
||||
@@ -175,7 +153,7 @@ void WheelItemDisplay::RefreshGrades()
|
||||
ASSERT( m_pSong != NULL );
|
||||
const Grade grade = m_pSong->GetGradeForDifficultyClass( GAME->m_sCurrentGame, GAME->m_sCurrentStyle, dc );
|
||||
m_GradeDisplay[p].SetGrade( grade );
|
||||
m_GradeDisplay[p].SetDiffuseColor( PLAYER_COLOR[p] );
|
||||
m_GradeDisplay[p].SetDiffuseColor( PlayerToColor((PlayerNumber)p) );
|
||||
}
|
||||
else // !IsPlayerEnabled
|
||||
{
|
||||
@@ -184,34 +162,6 @@ void WheelItemDisplay::RefreshGrades()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void WheelItemDisplay::SetDiffuseColor( D3DXCOLOR c )
|
||||
{
|
||||
Actor::SetDiffuseColor( c );
|
||||
|
||||
|
||||
D3DXCOLOR colorTempTint = m_colorTint;
|
||||
colorTempTint.a = c.a;
|
||||
colorTempTint.r *= c.r;
|
||||
colorTempTint.g *= c.g;
|
||||
colorTempTint.b *= c.b;
|
||||
|
||||
m_Banner.SetDiffuseColor( colorTempTint );
|
||||
m_sprSectionBar.SetDiffuseColor( colorTempTint );
|
||||
|
||||
D3DXCOLOR colorTempLetter = COLOR_SECTION_LETTER;
|
||||
colorTempLetter.a = c.a;
|
||||
colorTempLetter.r *= c.r;
|
||||
colorTempLetter.g *= c.g;
|
||||
colorTempLetter.b *= c.b;
|
||||
|
||||
m_textSectionName.SetDiffuseColor( colorTempLetter );
|
||||
|
||||
D3DXCOLOR colorTempDisplay = D3DXCOLOR( 1, 1, 1, c.a);
|
||||
|
||||
m_MusicStatusDisplay.SetDiffuseColor( colorTempDisplay );
|
||||
}
|
||||
|
||||
void WheelItemDisplay::Update( float fDeltaTime )
|
||||
{
|
||||
switch( m_WheelItemType )
|
||||
@@ -252,7 +202,7 @@ void WheelItemDisplay::RenderPrimitives()
|
||||
|
||||
MusicWheel::MusicWheel()
|
||||
{
|
||||
HELPER.Log( "MusicWheel::MusicWheel()" );
|
||||
LOG->WriteLine( "MusicWheel::MusicWheel()" );
|
||||
|
||||
for( int p=0; p<NUM_PLAYERS; p++ )
|
||||
{
|
||||
@@ -260,8 +210,8 @@ MusicWheel::MusicWheel()
|
||||
m_sprHighScoreFrame[p].SetXY( SCORE_X, SCORE_Y[p] );
|
||||
this->AddActor( &m_sprHighScoreFrame[p] );
|
||||
|
||||
m_HighScore[p].SetXY( SCORE_X, SCORE_Y[p]*0.97f );
|
||||
m_HighScore[p].SetZoom( 0.6f );
|
||||
m_HighScore[p].SetXY( SCORE_X-12, SCORE_Y[p]*0.97f );
|
||||
m_HighScore[p].SetZoom( 0.5f );
|
||||
this->AddActor( &m_HighScore[p] );
|
||||
}
|
||||
|
||||
@@ -278,7 +228,9 @@ MusicWheel::MusicWheel()
|
||||
m_MusicSortDisplay.SetEffectGlowing( 1.0f );
|
||||
this->AddActor( &m_MusicSortDisplay );
|
||||
|
||||
|
||||
m_ScrollBar.SetX( SCROLLBAR_X );
|
||||
this->AddActor( &m_ScrollBar );
|
||||
|
||||
|
||||
m_soundChangeMusic.Load( THEME->GetPathTo(SOUND_SWITCH_MUSIC), 10 );
|
||||
m_soundChangeSort.Load( THEME->GetPathTo(SOUND_SWITCH_SORT) );
|
||||
@@ -291,21 +243,6 @@ MusicWheel::MusicWheel()
|
||||
arraySongs.Copy( SONG->m_pSongs );
|
||||
SortSongPointerArrayByGroup( arraySongs );
|
||||
|
||||
int iNextGroupBannerColor = 0;
|
||||
|
||||
CString sLastGroupNameSeen = "";
|
||||
|
||||
for( int i=0; i<arraySongs.GetSize(); i++ )
|
||||
{
|
||||
CString sThisGroupName = arraySongs[i]->GetGroupName();
|
||||
if( sThisGroupName != sLastGroupNameSeen )
|
||||
{
|
||||
m_mapGroupNameToColorPtr.SetAt( sThisGroupName, &COLOR_BANNER_TINTS[iNextGroupBannerColor++] );
|
||||
if( iNextGroupBannerColor >= NUM_BANNER_TINTS-1 )
|
||||
iNextGroupBannerColor = 0;
|
||||
}
|
||||
sLastGroupNameSeen = sThisGroupName;
|
||||
}
|
||||
|
||||
|
||||
m_SortOrder = PREFS->m_SongSortOrder;
|
||||
@@ -342,7 +279,7 @@ MusicWheel::MusicWheel()
|
||||
if( SONG->m_pCurSong != NULL )
|
||||
{
|
||||
// find the previously selected song (if any)
|
||||
for( i=0; i<GetCurWheelItemDatas().GetSize(); i++ )
|
||||
for( int i=0; i<GetCurWheelItemDatas().GetSize(); i++ )
|
||||
{
|
||||
if( GetCurWheelItemDatas()[i].m_pSong == SONG->m_pCurSong )
|
||||
{
|
||||
@@ -365,6 +302,7 @@ MusicWheel::~MusicWheel()
|
||||
|
||||
void MusicWheel::BuildWheelItemDatas( CArray<WheelItemData, WheelItemData&> &arrayWheelItemDatas, SongSortOrder so )
|
||||
{
|
||||
int i;
|
||||
|
||||
///////////////////////////////////
|
||||
// Make an array of Song*, then sort them
|
||||
@@ -372,7 +310,7 @@ void MusicWheel::BuildWheelItemDatas( CArray<WheelItemData, WheelItemData&> &arr
|
||||
CArray<Song*, Song*> arraySongs;
|
||||
|
||||
// copy only song that have at least one NoteMetadata for the current GameMode
|
||||
for( int i=0; i<SONG->m_pSongs.GetSize(); i++ )
|
||||
for( i=0; i<SONG->m_pSongs.GetSize(); i++ )
|
||||
{
|
||||
Song* pSong = SONG->m_pSongs[i];
|
||||
|
||||
@@ -433,7 +371,6 @@ void MusicWheel::BuildWheelItemDatas( CArray<WheelItemData, WheelItemData&> &arr
|
||||
|
||||
CString sLastSection = "";
|
||||
int iCurWheelItem = 0;
|
||||
int iNextSectionTint = 0;
|
||||
for( int i=0; i< arraySongs.GetSize(); i++ )
|
||||
{
|
||||
Song* pSong = arraySongs[i];
|
||||
@@ -442,16 +379,12 @@ void MusicWheel::BuildWheelItemDatas( CArray<WheelItemData, WheelItemData&> &arr
|
||||
{
|
||||
WheelItemData &WID = arrayWheelItemDatas[iCurWheelItem++];
|
||||
WID.LoadFromSectionName( sThisSection );
|
||||
WID.m_colorTint = COLOR_SECTION_TINTS[iNextSectionTint++];
|
||||
if( iNextSectionTint >= NUM_SECTION_TINTS )
|
||||
iNextSectionTint = 0;
|
||||
sLastSection = sThisSection;
|
||||
}
|
||||
|
||||
WheelItemData &WID = arrayWheelItemDatas[iCurWheelItem++];
|
||||
WID.LoadFromSong( pSong );
|
||||
WID.m_sSectionName = sThisSection;
|
||||
WID.m_colorTint = *m_mapGroupNameToColorPtr[pSong->GetGroupName()];
|
||||
}
|
||||
arrayWheelItemDatas.SetSize( iCurWheelItem ); // make sure we have enough room for all music and section items
|
||||
}
|
||||
@@ -464,7 +397,6 @@ void MusicWheel::BuildWheelItemDatas( CArray<WheelItemData, WheelItemData&> &arr
|
||||
Song* pSong = arraySongs[i];
|
||||
WheelItemData &WID = arrayWheelItemDatas[i];
|
||||
WID.LoadFromSong( pSong );
|
||||
WID.m_colorTint = *m_mapGroupNameToColorPtr[pSong->GetGroupName()];
|
||||
WID.m_sSectionName = "";
|
||||
}
|
||||
}
|
||||
@@ -496,8 +428,7 @@ void MusicWheel::BuildWheelItemDatas( CArray<WheelItemData, WheelItemData&> &arr
|
||||
if( arrayWheelItemDatas.GetSize() == 0 )
|
||||
{
|
||||
arrayWheelItemDatas.SetSize( 1 );
|
||||
arrayWheelItemDatas[0].LoadFromSectionName( "No SONG" );
|
||||
arrayWheelItemDatas[0].m_colorTint = D3DXCOLOR(0.5f,0.5f,0.5f,1);
|
||||
arrayWheelItemDatas[0].LoadFromSectionName( "NO SONGS" );
|
||||
}
|
||||
}
|
||||
|
||||
@@ -655,6 +586,9 @@ void MusicWheel::RenderPrimitives()
|
||||
float fThisBannerPositionOffsetFromSelection = i - NUM_WHEEL_ITEMS_TO_DRAW/2 + m_fPositionOffsetFromSelection;
|
||||
|
||||
float fY = GetBannerY( fThisBannerPositionOffsetFromSelection );
|
||||
if( fY < -SCREEN_HEIGHT/2 || fY > SCREEN_HEIGHT/2 )
|
||||
continue; // skip
|
||||
|
||||
float fX = GetBannerX( fThisBannerPositionOffsetFromSelection );
|
||||
display.SetXY( fX, fY );
|
||||
|
||||
@@ -681,6 +615,8 @@ void MusicWheel::Update( float fDeltaTime )
|
||||
display.Update( fDeltaTime );
|
||||
}
|
||||
|
||||
float fScrollPercentage = (m_iSelection-m_fPositionOffsetFromSelection) / (float)GetCurWheelItemDatas().GetSize();
|
||||
m_ScrollBar.SetPercentage( fScrollPercentage );
|
||||
|
||||
|
||||
// update wheel state
|
||||
|
||||
+10
-19
@@ -1,18 +1,15 @@
|
||||
#pragma once
|
||||
/*
|
||||
-----------------------------------------------------------------------------
|
||||
File: MusicWheel.h
|
||||
Class: MusicWheel
|
||||
|
||||
Desc: A graphic displayed in the MusicWheel during Dancing.
|
||||
Desc: A wheel with song names used in the Select Music screen.
|
||||
|
||||
Copyright (c) 2001-2002 by the persons listed below. All rights reserved.
|
||||
Chris Danford
|
||||
-----------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
|
||||
#ifndef _MusicWheel_H_
|
||||
#define _MusicWheel_H_
|
||||
|
||||
|
||||
#include "Sprite.h"
|
||||
#include "Song.h"
|
||||
#include "ActorFrame.h"
|
||||
@@ -22,14 +19,15 @@
|
||||
#include "RandomSample.h"
|
||||
#include "GradeDisplay.h"
|
||||
#include "RageSoundStream.h"
|
||||
#include "GameTypes.h"
|
||||
#include "GameConstantsAndTypes.h"
|
||||
#include "MusicSortDisplay.h"
|
||||
#include "MusicStatusDisplay.h"
|
||||
#include "Window.h" // for WindowMessage
|
||||
#include "ScoreDisplayRolling.h" // for WindowMessage
|
||||
#include "ScoreDisplayRolling.h"
|
||||
#include "ScrollBar.h"
|
||||
|
||||
|
||||
const int NUM_WHEEL_ITEMS_TO_DRAW = 11;
|
||||
const int NUM_WHEEL_ITEMS_TO_DRAW = 13;
|
||||
|
||||
const float FADE_TIME = 0.7f;
|
||||
|
||||
@@ -49,7 +47,6 @@ public:
|
||||
void LoadFromSong( Song* pSong );
|
||||
|
||||
WheelItemType m_WheelItemType;
|
||||
D3DXCOLOR m_colorTint;
|
||||
CString m_sSectionName;
|
||||
Song* m_pSong;
|
||||
MusicStatusDisplayType m_MusicStatusDisplayType;
|
||||
@@ -65,7 +62,6 @@ public:
|
||||
virtual void Update( float fDeltaTime );
|
||||
virtual void RenderPrimitives();
|
||||
|
||||
|
||||
CString GetSectionName()
|
||||
{
|
||||
return m_sSectionName;
|
||||
@@ -73,7 +69,6 @@ public:
|
||||
|
||||
void LoadFromWheelItemData( WheelItemData* pWID );
|
||||
void RefreshGrades();
|
||||
void SetDiffuseColor( D3DXCOLOR c );
|
||||
|
||||
// for a section
|
||||
Sprite m_sprSectionBar;
|
||||
@@ -122,6 +117,8 @@ protected:
|
||||
void SwitchSortOrder();
|
||||
|
||||
|
||||
ScrollBar m_ScrollBar;
|
||||
|
||||
Sprite m_sprSelectionOverlay;
|
||||
|
||||
MusicSortDisplay m_MusicSortDisplay;
|
||||
@@ -193,11 +190,5 @@ protected:
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
CTypedPtrMap<CMapStringToPtr, CString, D3DXCOLOR*> m_mapGroupNameToColorPtr;
|
||||
|
||||
|
||||
};
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
@@ -12,11 +12,11 @@
|
||||
|
||||
#include "NoteData.h"
|
||||
#include "RageUtil.h"
|
||||
#include "ScreenDimensions.h"
|
||||
#include "GameConstantsAndTypes.h"
|
||||
#include "ThemeManager.h"
|
||||
#include "ArrowEffects.h"
|
||||
#include "PrefsManager.h"
|
||||
#include "GameConstants.h"
|
||||
#include "GameConstantsAndTypes.h"
|
||||
#include "ErrorCatcher/ErrorCatcher.h"
|
||||
|
||||
|
||||
@@ -527,7 +527,7 @@ void NoteData::GetMeasureStrings( CStringArray &arrayMeasureStrings )
|
||||
int iNoteIndexSpacing;
|
||||
for( nt=(NoteType)0; nt<NUM_NOTE_TYPES; nt=NoteType(nt+1) )
|
||||
{
|
||||
float fBeatSpacing = NOTE_TYPE_TO_BEAT[nt];
|
||||
float fBeatSpacing = NoteTypeToBeat( nt );
|
||||
iNoteIndexSpacing = roundf( fBeatSpacing * ELEMENTS_PER_BEAT );
|
||||
|
||||
bool bFoundSmallerNote = false;
|
||||
|
||||
@@ -13,7 +13,8 @@
|
||||
-----------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
#include "GameTypes.h"
|
||||
#include "GameConstantsAndTypes.h"
|
||||
#include "GameConstantsAndTypes.h"
|
||||
|
||||
// '1' = tap note
|
||||
// '2' = hold note begin
|
||||
@@ -71,18 +72,6 @@ struct HoldNoteScore
|
||||
};
|
||||
|
||||
|
||||
const int MAX_NOTE_TRACKS = 16;
|
||||
|
||||
|
||||
const int MAX_MEASURES = 200; // this should be long enough to hold 10:00 minute songs (
|
||||
const int BEATS_PER_MEASURE = 4;
|
||||
const int MAX_BEATS = MAX_MEASURES * BEATS_PER_MEASURE;
|
||||
|
||||
const int ELEMENTS_PER_BEAT = 12; // It is important that this number is evenly divisible by 2, 3, 4, and 8
|
||||
const int ELEMENTS_PER_MEASURE = ELEMENTS_PER_BEAT * BEATS_PER_MEASURE;
|
||||
const int MAX_TAP_NOTE_ELEMENTS = MAX_BEATS*ELEMENTS_PER_BEAT;
|
||||
|
||||
const int MAX_HOLD_NOTE_ELEMENTS = 200;
|
||||
|
||||
inline int BeatToNoteIndex( float fBeatNum ) { return int( fBeatNum * ELEMENTS_PER_BEAT + 0.5f); }; // round
|
||||
inline int BeatToNoteIndexNotRounded( float fBeatNum ){ return (int)( fBeatNum * ELEMENTS_PER_BEAT ); };
|
||||
@@ -90,27 +79,6 @@ inline float NoteIndexToBeat( float fNoteIndex ) { return fNoteIndex / (float)E
|
||||
inline float NoteIndexToBeat( int iNoteIndex ) { return NoteIndexToBeat( (float)iNoteIndex ); };
|
||||
|
||||
|
||||
enum NoteType
|
||||
{
|
||||
NOTE_4TH, // quarter notes
|
||||
NOTE_8TH, // eighth notes
|
||||
NOTE_12TH, // triplets
|
||||
NOTE_16TH, // sixteenth notes
|
||||
NUM_NOTE_TYPES
|
||||
};
|
||||
|
||||
inline bool IsNoteOfType( int iNoteIndex, NoteType t )
|
||||
{
|
||||
switch( t )
|
||||
{
|
||||
case NOTE_4TH: return iNoteIndex % (ELEMENTS_PER_MEASURE/4) == 0;
|
||||
case NOTE_8TH: return iNoteIndex % (ELEMENTS_PER_MEASURE/8) == 0;
|
||||
case NOTE_12TH: return iNoteIndex % (ELEMENTS_PER_MEASURE/12) == 0;
|
||||
case NOTE_16TH: return iNoteIndex % (ELEMENTS_PER_MEASURE/16) == 0;
|
||||
default: ASSERT( false ); return false;
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
|
||||
class NoteData
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
|
||||
#include "NoteField.h"
|
||||
#include "RageUtil.h"
|
||||
#include "ScreenDimensions.h"
|
||||
#include "GameConstantsAndTypes.h"
|
||||
#include "ThemeManager.h"
|
||||
#include "ArrowEffects.h"
|
||||
#include "PrefsManager.h"
|
||||
@@ -151,7 +151,7 @@ void NoteField::DrawMarkerBar( const int iIndex )
|
||||
|
||||
void NoteField::RenderPrimitives()
|
||||
{
|
||||
//HELPER.Log( "NoteField::RenderPrimitives()" );
|
||||
//LOG->WriteLine( "NoteField::RenderPrimitives()" );
|
||||
|
||||
if( m_fSongBeat < 0 )
|
||||
m_fSongBeat = 0;
|
||||
@@ -162,7 +162,7 @@ void NoteField::RenderPrimitives()
|
||||
if( iIndexFirstArrowToDraw < 0 ) iIndexFirstArrowToDraw = 0;
|
||||
int iIndexLastArrowToDraw = BeatToNoteIndex( m_fSongBeat + m_fNumBeatsToDrawAhead ); // 7 beats later
|
||||
|
||||
//HELPER.Log( "Drawing elements %d through %d", iIndexFirstArrowToDraw, iIndexLastArrowToDraw );
|
||||
//LOG->WriteLine( "Drawing elements %d through %d", iIndexFirstArrowToDraw, iIndexLastArrowToDraw );
|
||||
|
||||
//
|
||||
// Draw measure bars
|
||||
|
||||
+13
-13
@@ -9,12 +9,12 @@
|
||||
-----------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
#include "ScreenDimensions.h"
|
||||
#include "GameConstantsAndTypes.h"
|
||||
#include "Math.h" // for fabs()
|
||||
#include "Player.h"
|
||||
#include "RageUtil.h"
|
||||
#include "ThemeManager.h"
|
||||
#include "GameTypes.h"
|
||||
#include "GameConstantsAndTypes.h"
|
||||
#include "ArrowEffects.h"
|
||||
#include "GameManager.h"
|
||||
#include "InputMapper.h"
|
||||
@@ -61,7 +61,7 @@ Player::Player()
|
||||
|
||||
void Player::Load( PlayerNumber player_no, NoteData* pNoteData, const PlayerOptions& po, LifeMeterBar* pLM, ScoreDisplayRolling* pScore )
|
||||
{
|
||||
//HELPER.Log( "Player::Load()", );
|
||||
//LOG->WriteLine( "Player::Load()", );
|
||||
this->CopyAll( pNoteData );
|
||||
|
||||
m_PlayerNumber = player_no;
|
||||
@@ -96,7 +96,7 @@ void Player::Load( PlayerNumber player_no, NoteData* pNoteData, const PlayerOpti
|
||||
|
||||
void Player::Update( float fDeltaTime, float fSongBeat, float fMaxBeatDifference )
|
||||
{
|
||||
//HELPER.Log( "Player::Update(%f, %f, %f)", fDeltaTime, fSongBeat, fMaxBeatDifference );
|
||||
//LOG->WriteLine( "Player::Update(%f, %f, %f)", fDeltaTime, fSongBeat, fMaxBeatDifference );
|
||||
|
||||
|
||||
//
|
||||
@@ -253,7 +253,7 @@ bool Player::IsThereANoteAtIndex( int iIndex )
|
||||
|
||||
void Player::HandlePlayerStep( float fSongBeat, ColumnNumber col, float fMaxBeatDiff )
|
||||
{
|
||||
//HELPER.Log( "Player::HandlePlayerStep()" );
|
||||
//LOG->WriteLine( "Player::HandlePlayerStep()" );
|
||||
|
||||
ASSERT( col >= 0 && col <= m_iNumTracks );
|
||||
|
||||
@@ -284,7 +284,7 @@ void Player::HandlePlayerStep( float fSongBeat, ColumnNumber col, float fMaxBeat
|
||||
float fBeatsUntilStep = NoteIndexToBeat( (float)hn.m_iStartIndex ) - fSongBeat;
|
||||
float fPercentFromPerfect = fabsf( fBeatsUntilStep / fMaxBeatDiff );
|
||||
|
||||
//HELPER.Log( "fBeatsUntilStep: %f, fPercentFromPerfect: %f",
|
||||
//LOG->WriteLine( "fBeatsUntilStep: %f, fPercentFromPerfect: %f",
|
||||
// fBeatsUntilStep, fPercentFromPerfect );
|
||||
|
||||
// compute what the score should be for the note we stepped on
|
||||
@@ -325,13 +325,13 @@ void Player::HandlePlayerStep( float fSongBeat, ColumnNumber col, float fMaxBeat
|
||||
|
||||
void Player::CheckForCompleteRow( float fSongBeat, ColumnNumber col, float fMaxBeatDiff )
|
||||
{
|
||||
//HELPER.Log( "Player::CheckForCompleteRow()" );
|
||||
//LOG->WriteLine( "Player::CheckForCompleteRow()" );
|
||||
|
||||
// look for the closest matching step
|
||||
int iIndexStartLookingAt = BeatToNoteIndex( fSongBeat );
|
||||
int iNumElementsToExamine = BeatToNoteIndex( fMaxBeatDiff ); // number of elements to examine on either end of iIndexStartLookingAt
|
||||
|
||||
//HELPER.Log( "iIndexStartLookingAt = %d, iNumElementsToExamine = %d", iIndexStartLookingAt, iNumElementsToExamine );
|
||||
//LOG->WriteLine( "iIndexStartLookingAt = %d, iNumElementsToExamine = %d", iIndexStartLookingAt, iNumElementsToExamine );
|
||||
|
||||
// Start at iIndexStartLookingAt and search outward. The first one that overlaps the player's step is the closest match.
|
||||
for( int delta=0; delta <= iNumElementsToExamine; delta++ )
|
||||
@@ -346,7 +346,7 @@ void Player::CheckForCompleteRow( float fSongBeat, ColumnNumber col, float fMaxB
|
||||
////////////////////////////
|
||||
// check the step to the left of iIndexStartLookingAt
|
||||
////////////////////////////
|
||||
//HELPER.Log( "Checking NoteMetadata[%d]", iCurrentIndexEarlier );
|
||||
//LOG->WriteLine( "Checking NoteMetadata[%d]", iCurrentIndexEarlier );
|
||||
if( m_TapNotes[col][iCurrentIndexEarlier] != '0' ) // these NoteMetadata overlap
|
||||
{
|
||||
m_TapNotes[col][iCurrentIndexEarlier] = '0'; // mark hit
|
||||
@@ -365,7 +365,7 @@ void Player::CheckForCompleteRow( float fSongBeat, ColumnNumber col, float fMaxB
|
||||
////////////////////////////
|
||||
// check the step to the right of iIndexStartLookingAt
|
||||
////////////////////////////
|
||||
//HELPER.Log( "Checking NoteMetadata[%d]", iCurrentIndexLater );
|
||||
//LOG->WriteLine( "Checking NoteMetadata[%d]", iCurrentIndexLater );
|
||||
if( m_TapNotes[col][iCurrentIndexLater] != '0' ) // these NoteMetadata overlap
|
||||
{
|
||||
m_TapNotes[col][iCurrentIndexLater] = '0'; // mark hit
|
||||
@@ -391,7 +391,7 @@ void Player::OnRowDestroyed( float fSongBeat, ColumnNumber col, float fMaxBeatDi
|
||||
float fBeatsUntilStep = fStepBeat - fSongBeat;
|
||||
float fPercentFromPerfect = fabsf( fBeatsUntilStep / fMaxBeatDiff );
|
||||
|
||||
//HELPER.Log( "fBeatsUntilStep: %f, fPercentFromPerfect: %f",
|
||||
//LOG->WriteLine( "fBeatsUntilStep: %f, fPercentFromPerfect: %f",
|
||||
// fBeatsUntilStep, fPercentFromPerfect );
|
||||
|
||||
// compute what the score should be for the note we stepped on
|
||||
@@ -480,7 +480,7 @@ ScoreSummary Player::GetScoreSummary()
|
||||
|
||||
int Player::UpdateTapNotesMissedOlderThan( float fMissIfOlderThanThisBeat )
|
||||
{
|
||||
//HELPER.Log( "NoteMetadata::UpdateTapNotesMissedOlderThan(%f)", fMissIfOlderThanThisBeat );
|
||||
//LOG->WriteLine( "NoteMetadata::UpdateTapNotesMissedOlderThan(%f)", fMissIfOlderThanThisBeat );
|
||||
|
||||
int iMissIfOlderThanThisIndex = BeatToNoteIndex( fMissIfOlderThanThisBeat );
|
||||
|
||||
@@ -489,7 +489,7 @@ int Player::UpdateTapNotesMissedOlderThan( float fMissIfOlderThanThisBeat )
|
||||
// Instead, only check 10 elements back. Even 10 is overkill.
|
||||
int iStartCheckingAt = max( 0, iMissIfOlderThanThisIndex-10 );
|
||||
|
||||
//HELPER.Log( "iStartCheckingAt: %d iMissIfOlderThanThisIndex: %d", iStartCheckingAt, iMissIfOlderThanThisIndex );
|
||||
//LOG->WriteLine( "iStartCheckingAt: %d iMissIfOlderThanThisIndex: %d", iStartCheckingAt, iMissIfOlderThanThisIndex );
|
||||
for( int i=iStartCheckingAt; i<iMissIfOlderThanThisIndex; i++ )
|
||||
{
|
||||
if( m_TapNoteScores[i] != TNS_NONE ) // this index already has a score
|
||||
|
||||
@@ -27,7 +27,6 @@ GraphicProfileOptions GRAPHIC_OPTIONS[NUM_GRAPHIC_PROFILES] =
|
||||
16,
|
||||
16,
|
||||
false,
|
||||
false,
|
||||
},
|
||||
{ // PROFILE_LOW
|
||||
"Low",
|
||||
@@ -36,7 +35,6 @@ GraphicProfileOptions GRAPHIC_OPTIONS[NUM_GRAPHIC_PROFILES] =
|
||||
256,
|
||||
16,
|
||||
16,
|
||||
false,
|
||||
true,
|
||||
},
|
||||
{ // PROFILE_MEDIUM
|
||||
@@ -46,7 +44,6 @@ GraphicProfileOptions GRAPHIC_OPTIONS[NUM_GRAPHIC_PROFILES] =
|
||||
512,
|
||||
16,
|
||||
16,
|
||||
false,
|
||||
true,
|
||||
},
|
||||
{ // PROFILE_HIGH
|
||||
@@ -57,7 +54,6 @@ GraphicProfileOptions GRAPHIC_OPTIONS[NUM_GRAPHIC_PROFILES] =
|
||||
16,
|
||||
32,
|
||||
true,
|
||||
true,
|
||||
},
|
||||
{ // PROFILE_CUSTOM
|
||||
"Custom",
|
||||
@@ -66,7 +62,6 @@ GraphicProfileOptions GRAPHIC_OPTIONS[NUM_GRAPHIC_PROFILES] =
|
||||
512,
|
||||
16,
|
||||
16,
|
||||
false,
|
||||
true,
|
||||
},
|
||||
};
|
||||
@@ -131,6 +126,8 @@ void PrefsManager::ReadPrefsFromDisk()
|
||||
if( name_string == "UseRandomVis" ) m_GameOptions.m_bUseRandomVis = ( value_string == "1" );
|
||||
if( name_string == "SkipCaution" ) m_GameOptions.m_bSkipCaution = ( value_string == "1" );
|
||||
if( name_string == "Announcer" ) m_GameOptions.m_bAnnouncer = ( value_string == "1" );
|
||||
if( name_string == "NumArcadeStages" ) m_GameOptions.m_iNumArcadeStages= atoi( value_string );
|
||||
if( name_string == "JudgementDifficulty" ) m_GameOptions.m_JudgementDifficulty= (GameOptions::JudgementDifficulty) atoi( value_string );
|
||||
}
|
||||
}
|
||||
|
||||
@@ -158,8 +155,6 @@ void PrefsManager::ReadPrefsFromDisk()
|
||||
if( name_string == "MaxTextureSize" ) pGPO->m_dwMaxTextureSize = atoi( value_string );
|
||||
if( name_string == "DisplayColor" ) pGPO->m_dwDisplayColor = atoi( value_string );
|
||||
if( name_string == "TextureColor" ) pGPO->m_dwTextureColor = atoi( value_string );
|
||||
if( name_string == "Shadows" ) pGPO->m_bShadows = ( value_string == "1" );
|
||||
if( name_string == "Backgrounds" ) pGPO->m_bBackgrounds = ( value_string == "1" );
|
||||
}
|
||||
}
|
||||
|
||||
@@ -193,8 +188,6 @@ void PrefsManager::SavePrefsToDisk()
|
||||
ini.SetValue( "GraphicOptions", "MaxTextureSize", ssprintf("%d", pGPO->m_dwMaxTextureSize) );
|
||||
ini.SetValue( "GraphicOptions", "DisplayColor", ssprintf("%d", pGPO->m_dwDisplayColor) );
|
||||
ini.SetValue( "GraphicOptions", "TextureColor", ssprintf("%d", pGPO->m_dwTextureColor) );
|
||||
ini.SetValue( "GraphicOptions", "Shadows", pGPO->m_bShadows ? "1":"0" );
|
||||
ini.SetValue( "GraphicOptions", "Backgrounds", pGPO->m_bBackgrounds ? "1":"0" );
|
||||
|
||||
|
||||
ini.SetValue( "GameOptions", "IgnoreJoyAxes", m_GameOptions.m_bIgnoreJoyAxes ? "1":"0" );
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
-----------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
#include "GameTypes.h"
|
||||
#include "GameConstantsAndTypes.h"
|
||||
|
||||
|
||||
const int NUM_PAD_TO_DEVICE_SLOTS = 3; // three device inputs may map to one pad input
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
#include "dxerr8.h"
|
||||
#include "DXUtil.h"
|
||||
#include "RageUtil.h"
|
||||
#include "RageHelper.h"
|
||||
#include "RageLog.h"
|
||||
#include "ErrorCatcher/ErrorCatcher.h"
|
||||
|
||||
|
||||
@@ -38,7 +38,7 @@ RageBitmapTexture::RageBitmapTexture(
|
||||
const DWORD dwHints ) :
|
||||
RageTexture( pScreen, sFilePath, dwMaxSize, dwTextureColorDepth, dwHints )
|
||||
{
|
||||
// HELPER.Log( "RageBitmapTexture::RageBitmapTexture()" );
|
||||
// LOG->WriteLine( "RageBitmapTexture::RageBitmapTexture()" );
|
||||
|
||||
m_pd3dTexture = NULL;
|
||||
|
||||
@@ -146,7 +146,7 @@ void RageBitmapTexture::Create( DWORD dwMaxSize, DWORD dwTextureColorDepth, DWOR
|
||||
fmtTexture, // our preferred texture format
|
||||
D3DPOOL_MANAGED, // which memory pool
|
||||
(bScaleImageToTextureSize ? D3DX_FILTER_BOX : D3DX_FILTER_NONE) | (bDither ? D3DX_FILTER_DITHER : 0), // filter
|
||||
D3DX_DEFAULT | (bDither ? D3DX_FILTER_DITHER : 0), // mip filter
|
||||
D3DX_FILTER_BOX | (bDither ? D3DX_FILTER_DITHER : 0), // mip filter
|
||||
0, // no color key
|
||||
&ddii, // struct to fill with source image info
|
||||
NULL, // no palette
|
||||
@@ -182,7 +182,7 @@ void RageBitmapTexture::Create( DWORD dwMaxSize, DWORD dwTextureColorDepth, DWOR
|
||||
m_iImageHeight = m_iSourceHeight;
|
||||
}
|
||||
|
||||
HELPER.Log( "RageBitmapTexture: Loaded '%s' (%ux%u) from disk. bScaleImageToTextureSize = %d, source %d,%d; image %d,%d.",
|
||||
LOG->WriteLine( "RageBitmapTexture: Loaded '%s' (%ux%u) from disk. bScaleImageToTextureSize = %d, source %d,%d; image %d,%d.",
|
||||
m_sFilePath,
|
||||
GetTextureWidth(),
|
||||
GetTextureHeight(),
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
#include "RageInput.h"
|
||||
#include <dinput.h>
|
||||
#include "RageUtil.h"
|
||||
#include "RageHelper.h"
|
||||
#include "RageLog.h"
|
||||
#include "ErrorCatcher/ErrorCatcher.h"
|
||||
|
||||
|
||||
@@ -244,6 +244,7 @@ BOOL CALLBACK EnumJoysticksCallback( const DIDEVICEINSTANCE* pdidInstance,
|
||||
HRESULT hr = pDI->CreateDevice( pdidInstance->guidInstance,
|
||||
&pInput->m_pJoystick[i++],
|
||||
NULL );
|
||||
if( FAILED( hr ) )
|
||||
FatalErrorHr( hr, "Error in CreateDevice() for joystick %d.", i );
|
||||
|
||||
return DIENUM_CONTINUE;
|
||||
|
||||
@@ -0,0 +1,87 @@
|
||||
#include "stdafx.h"
|
||||
/*
|
||||
-----------------------------------------------------------------------------
|
||||
Class: RageLog
|
||||
|
||||
Desc: See header.
|
||||
|
||||
Copyright (c) 2001-2002 by the persons listed below. All rights reserved.
|
||||
Chris Danford
|
||||
-----------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
#include "RageLog.h"
|
||||
#include "RageUtil.h"
|
||||
#include <fstream>
|
||||
#include "ErrorCatcher/ErrorCatcher.h"
|
||||
|
||||
#include "dxerr8.h"
|
||||
#pragma comment(lib, "DxErr8.lib")
|
||||
|
||||
|
||||
RageLog* LOG; // global and accessable from anywhere in the program
|
||||
|
||||
|
||||
// constants
|
||||
#define LOG_FILE_NAME "log.txt"
|
||||
|
||||
|
||||
RageLog::RageLog()
|
||||
{
|
||||
// delete old log files
|
||||
DeleteFile( LOG_FILE_NAME );
|
||||
|
||||
// create a new console window and attach standard handles
|
||||
AllocConsole();
|
||||
freopen("CONOUT$","wb",stdout);
|
||||
freopen("CONOUT$","wb",stderr);
|
||||
|
||||
// Open log file and leave it open. Let the OS close it when the app exits
|
||||
m_fileLog = fopen( LOG_FILE_NAME, "w" );
|
||||
|
||||
|
||||
SYSTEMTIME st;
|
||||
GetLocalTime( &st );
|
||||
|
||||
this->WriteLine( "Last compiled on %s.", __TIMESTAMP__ );
|
||||
this->WriteLine( "Log starting %.4d-%.2d-%.2d %.2d:%.2d:%.2d",
|
||||
st.wYear, st.wMonth, st.wDay, st.wHour, st.wMinute, st.wSecond );
|
||||
this->WriteLine( "\n" );
|
||||
}
|
||||
|
||||
RageLog::~RageLog()
|
||||
{
|
||||
FreeConsole();
|
||||
Flush();
|
||||
fclose( m_fileLog );
|
||||
}
|
||||
|
||||
void RageLog::WriteLine( LPCTSTR fmt, ...)
|
||||
{
|
||||
va_list va;
|
||||
va_start(va, fmt);
|
||||
|
||||
CString sBuff = vssprintf( fmt, va );
|
||||
sBuff += "\n";
|
||||
|
||||
fprintf( m_fileLog, sBuff );
|
||||
printf( sBuff );
|
||||
|
||||
#ifdef DEBUG
|
||||
this->Flush(); // implicit flush
|
||||
#endif
|
||||
}
|
||||
|
||||
void RageLog::WriteLineHr( HRESULT hr, LPCTSTR fmt, ...)
|
||||
{
|
||||
va_list va;
|
||||
va_start(va, fmt);
|
||||
CString s = vssprintf( fmt, va );
|
||||
s += ssprintf( "(%s)", DXGetErrorString8(hr) );
|
||||
this->WriteLine( s );
|
||||
}
|
||||
|
||||
void RageLog::Flush()
|
||||
{
|
||||
fflush( m_fileLog );
|
||||
}
|
||||
@@ -0,0 +1,28 @@
|
||||
#pragma once
|
||||
/*
|
||||
-----------------------------------------------------------------------------
|
||||
Class: RageLog
|
||||
|
||||
Desc: Manages logging
|
||||
|
||||
Copyright (c) 2001-2002 by the persons listed below. All rights reserved.
|
||||
Chris Danford
|
||||
-----------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
|
||||
class RageLog
|
||||
{
|
||||
public:
|
||||
RageLog();
|
||||
~RageLog();
|
||||
|
||||
void WriteLine( LPCTSTR fmt, ...);
|
||||
void WriteLineHr( HRESULT hr, LPCTSTR fmt, ...);
|
||||
void Flush();
|
||||
|
||||
protected:
|
||||
FILE* m_fileLog;
|
||||
};
|
||||
|
||||
extern RageLog* LOG; // global and accessable from anywhere in our program
|
||||
@@ -31,7 +31,7 @@
|
||||
#include "dxerr8.h"
|
||||
#include "DXUtil.h"
|
||||
#include "RageUtil.h"
|
||||
#include "RageHelper.h"
|
||||
#include "RageLog.h"
|
||||
#include "ErrorCatcher/ErrorCatcher.h"
|
||||
|
||||
#include <stdio.h>
|
||||
@@ -250,7 +250,7 @@ RageMovieTexture::RageMovieTexture(
|
||||
const DWORD dwHints ) :
|
||||
RageTexture( pScreen, sFilePath, dwMaxSize, dwTextureColorDepth, dwHints )
|
||||
{
|
||||
HELPER.Log( "RageBitmapTexture::RageBitmapTexture()" );
|
||||
LOG->WriteLine( "RageBitmapTexture::RageBitmapTexture()" );
|
||||
|
||||
m_pd3dTexture[0] = m_pd3dTexture[1] = NULL;
|
||||
m_iIndexActiveTexture = 0;
|
||||
@@ -292,7 +292,7 @@ LPDIRECT3DTEXTURE8 RageMovieTexture::GetD3DTexture()
|
||||
// time for it to catch up and copy all the frames it fell behind on.
|
||||
// while( m_pCTR->IsLocked() ) {
|
||||
// ::Sleep(1);
|
||||
// HELPER.Log( "Sleeping waiting for unlock..." );
|
||||
// LOG->WriteLine( "Sleeping waiting for unlock..." );
|
||||
// }
|
||||
|
||||
// restart the movie if we reach the end
|
||||
|
||||
@@ -12,26 +12,26 @@
|
||||
|
||||
#include "RageSound.h"
|
||||
#include "RageUtil.h"
|
||||
#include "RageHelper.h"
|
||||
#include "RageLog.h"
|
||||
#include "ErrorCatcher/ErrorCatcher.h"
|
||||
|
||||
#include "bass/bass.h"
|
||||
#pragma comment(lib, "bass/bass.lib")
|
||||
|
||||
|
||||
|
||||
RageSound* SOUND = NULL;
|
||||
|
||||
|
||||
RageSound::RageSound( HWND hWnd )
|
||||
{
|
||||
HELPER.Log( "RageSound::RageSound()" );
|
||||
LOG->WriteLine( "RageSound::RageSound()" );
|
||||
// save the HWND
|
||||
if( !hWnd )
|
||||
FatalError( "RageSound called with NULL hWnd." );
|
||||
m_hWndApp = hWnd;
|
||||
|
||||
if( BASS_GetVersion() != MAKELONG(1,3) )
|
||||
FatalError( "BASS version 1.3 DLL could not be loaded. Verify that Bass.dll exists in the program directory.");
|
||||
if( BASS_GetVersion() != MAKELONG(1,5) )
|
||||
FatalError( "BASS version 1.5 DLL could not be loaded. Verify that Bass.dll exists in the program directory.");
|
||||
|
||||
if( !BASS_Init( -1, 44100, BASS_DEVICE_LEAVEVOL|BASS_DEVICE_LATENCY, m_hWndApp ) )
|
||||
{
|
||||
@@ -51,7 +51,7 @@ RageSound::RageSound( HWND hWnd )
|
||||
BASS_GetInfo( &m_info );
|
||||
|
||||
|
||||
HELPER.Log(
|
||||
LOG->WriteLine(
|
||||
"Sound card info:\n"
|
||||
" - play latency is %u ms\n"
|
||||
" - total device hardware memory is %u bytes\n"
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
#pragma once
|
||||
/*
|
||||
-----------------------------------------------------------------------------
|
||||
File: RageSound.h
|
||||
@@ -5,14 +6,11 @@
|
||||
Desc: Sound effects library (currently a wrapper around Bass Sound Library).
|
||||
|
||||
Copyright (c) 2001-2002 by the persons listed below. All rights reserved.
|
||||
Chris Danford
|
||||
-----------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
|
||||
#ifndef _RAGESOUND_H_
|
||||
#define _RAGESOUND_H_
|
||||
|
||||
|
||||
#include "bass/bass.h"
|
||||
|
||||
|
||||
@@ -37,6 +35,3 @@ private:
|
||||
|
||||
|
||||
extern RageSound* SOUND; // global and accessable from anywhere in our program
|
||||
|
||||
|
||||
#endif
|
||||
@@ -27,7 +27,7 @@ RageTexture::RageTexture(
|
||||
const DWORD dwTextureColorDepth,
|
||||
const DWORD dwHints )
|
||||
{
|
||||
// HELPER.Log( "RageTexture::RageTexture()" );
|
||||
// LOG->WriteLine( "RageTexture::RageTexture()" );
|
||||
|
||||
// save a pointer to the D3D device
|
||||
m_pd3dDevice = pScreen->GetDevice();
|
||||
@@ -68,7 +68,7 @@ void RageTexture::CreateFrameRects()
|
||||
(j+1)/(float)m_iFramesHigh*m_iImageHeight/(float)m_iTextureHeight );
|
||||
m_TextureCoordRects.Add( frect ); // the index of this array element will be (i + j*m_iFramesWide)
|
||||
|
||||
//HELPER.Log( "Adding frect%d %f %f %f %f", (i + j*m_iFramesWide), frect.left, frect.top, frect.right, frect.bottom );
|
||||
//LOG->WriteLine( "Adding frect%d %f %f %f %f", (i + j*m_iFramesWide), frect.left, frect.top, frect.right, frect.bottom );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
#include "RageBitmapTexture.h"
|
||||
#include "RageMovieTexture.h"
|
||||
#include "RageUtil.h"
|
||||
#include "RageHelper.h"
|
||||
#include "RageLog.h"
|
||||
#include "ErrorCatcher/ErrorCatcher.h"
|
||||
|
||||
RageTextureManager* TEXTURE = NULL;
|
||||
@@ -43,7 +43,7 @@ RageTextureManager::~RageTextureManager()
|
||||
while( pos != NULL ) // iterate over all k/v pairs in map
|
||||
{
|
||||
m_mapPathToTexture.GetNextAssoc( pos, sPath, pTexture );
|
||||
HELPER.Log( "TEXTURE LEAK: '%s', RefCount = %d.", sPath, pTexture->m_iRefCount );
|
||||
LOG->WriteLine( "TEXTURE LEAK: '%s', RefCount = %d.", sPath, pTexture->m_iRefCount );
|
||||
SAFE_DELETE( pTexture );
|
||||
}
|
||||
|
||||
@@ -58,7 +58,7 @@ RageTexture* RageTextureManager::LoadTexture( CString sTexturePath, const DWORD
|
||||
{
|
||||
sTexturePath.MakeLower();
|
||||
|
||||
// HELPER.Log( "RageTextureManager::LoadTexture(%s).", sTexturePath );
|
||||
// LOG->WriteLine( "RageTextureManager::LoadTexture(%s).", sTexturePath );
|
||||
|
||||
// holder for the new texture
|
||||
RageTexture* pTexture;
|
||||
@@ -74,7 +74,7 @@ RageTexture* RageTextureManager::LoadTexture( CString sTexturePath, const DWORD
|
||||
if( bForceReload )
|
||||
pTexture->Reload( m_dwMaxTextureSize, m_dwTextureColorDepth, dwHints );
|
||||
|
||||
HELPER.Log( "RageTextureManager: '%s' now has %d references.", sTexturePath, pTexture->m_iRefCount );
|
||||
LOG->WriteLine( "RageTextureManager: '%s' now has %d references.", sTexturePath, pTexture->m_iRefCount );
|
||||
}
|
||||
else // the texture is not already loaded
|
||||
{
|
||||
@@ -87,7 +87,7 @@ RageTexture* RageTextureManager::LoadTexture( CString sTexturePath, const DWORD
|
||||
pTexture = (RageTexture*) new RageBitmapTexture( m_pScreen, sTexturePath, m_dwMaxTextureSize, m_dwTextureColorDepth, dwHints );
|
||||
|
||||
|
||||
HELPER.Log( "RageTextureManager: Finished loading '%s' - %d references.", sTexturePath );
|
||||
LOG->WriteLine( "RageTextureManager: Finished loading '%s' - %d references.", sTexturePath );
|
||||
|
||||
|
||||
m_mapPathToTexture.SetAt( sTexturePath, pTexture );
|
||||
@@ -113,11 +113,11 @@ void RageTextureManager::UnloadTexture( CString sTexturePath )
|
||||
{
|
||||
sTexturePath.MakeLower();
|
||||
|
||||
// HELPER.Log( "RageTextureManager::UnloadTexture(%s).", sTexturePath );
|
||||
// LOG->WriteLine( "RageTextureManager::UnloadTexture(%s).", sTexturePath );
|
||||
|
||||
if( sTexturePath == "" )
|
||||
{
|
||||
HELPER.Log( "RageTextureManager::UnloadTexture(): tried to Unload a blank texture." );
|
||||
LOG->WriteLine( "RageTextureManager::UnloadTexture(): tried to Unload a blank texture." );
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -128,13 +128,13 @@ void RageTextureManager::UnloadTexture( CString sTexturePath )
|
||||
pTexture->m_iRefCount--;
|
||||
if( pTexture->m_iRefCount == 0 ) // there are no more references to this texture
|
||||
{
|
||||
HELPER.Log( ssprintf("RageTextureManager: '%s' will be deleted. It has %d references.", sTexturePath, pTexture->m_iRefCount) );
|
||||
LOG->WriteLine( ssprintf("RageTextureManager: '%s' will be deleted. It has %d references.", sTexturePath, pTexture->m_iRefCount) );
|
||||
SAFE_DELETE( pTexture ); // free the texture
|
||||
m_mapPathToTexture.RemoveKey( sTexturePath ); // and remove the key in the map
|
||||
}
|
||||
else
|
||||
{
|
||||
HELPER.Log( "RageTextureManager: '%s' will not be deleted. It still has %d references.", sTexturePath, pTexture->m_iRefCount );
|
||||
LOG->WriteLine( "RageTextureManager: '%s' will not be deleted. It still has %d references.", sTexturePath, pTexture->m_iRefCount );
|
||||
}
|
||||
}
|
||||
else // texture not found
|
||||
|
||||
@@ -293,7 +293,7 @@ DWORD GetFileSizeInBytes( const CString &sFilePath )
|
||||
|
||||
bool DoesFileExist( const CString &sPath )
|
||||
{
|
||||
//HELPER.Log( "DoesFileExist(%s)", sPath );
|
||||
//LOG->WriteLine( "DoesFileExist(%s)", sPath );
|
||||
|
||||
DWORD dwAttr = GetFileAttributes( sPath );
|
||||
if( dwAttr == (DWORD)-1 )
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
|
||||
#include "RandomSample.h"
|
||||
#include "RageUtil.h"
|
||||
#include "RageHelper.h"
|
||||
#include "RageLog.h"
|
||||
#include "ErrorCatcher/ErrorCatcher.h"
|
||||
|
||||
|
||||
@@ -47,7 +47,7 @@ bool RandomSample::LoadSoundDir( CString sDir )
|
||||
|
||||
bool RandomSample::LoadSound( CString sSoundFilePath )
|
||||
{
|
||||
HELPER.Log( "RandomSample::LoadSound( %s )", sSoundFilePath );
|
||||
LOG->WriteLine( "RandomSample::LoadSound( %s )", sSoundFilePath );
|
||||
|
||||
RageSoundSample* pSS = new RageSoundSample;
|
||||
pSS->Load( sSoundFilePath );
|
||||
@@ -63,7 +63,7 @@ void RandomSample::PlayRandom()
|
||||
// play one of the samples
|
||||
if( m_pSamples.GetSize() == 0 )
|
||||
{
|
||||
HELPER.Log( "WARNING: Tried to play a RandomSample that has 0 sounds loaded." );
|
||||
LOG->WriteLine( "WARNING: Tried to play a RandomSample that has 0 sounds loaded." );
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@@ -11,13 +11,13 @@
|
||||
|
||||
#include "ScoreDisplayRolling.h"
|
||||
#include "RageUtil.h"
|
||||
#include "RageHelper.h"
|
||||
#include "RageLog.h"
|
||||
#include "ThemeManager.h"
|
||||
|
||||
|
||||
ScoreDisplayRolling::ScoreDisplayRolling()
|
||||
{
|
||||
HELPER.Log( "ScoreDisplayRolling::ScoreDisplayRolling()" );
|
||||
LOG->WriteLine( "ScoreDisplayRolling::ScoreDisplayRolling()" );
|
||||
|
||||
// init the text
|
||||
Load( THEME->GetPathTo(FONT_SCORE_NUMBERS) );
|
||||
|
||||
@@ -0,0 +1,52 @@
|
||||
#include "stdafx.h"
|
||||
/*
|
||||
-----------------------------------------------------------------------------
|
||||
Class: ScrollBar
|
||||
|
||||
Desc: See header.
|
||||
|
||||
Copyright (c) 2001-2002 by the persons listed below. All rights reserved.
|
||||
Chris Danford
|
||||
-----------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
#include "ScrollBar.h"
|
||||
#include "ThemeManager.h"
|
||||
#include "GameConstantsAndTypes.h"
|
||||
|
||||
|
||||
const float BAR_HEIGHT = 376;
|
||||
|
||||
ScrollBar::ScrollBar()
|
||||
{
|
||||
m_sprBackground.Load( THEME->GetPathTo(GRAPHIC_SCROLLBAR_PARTS) );
|
||||
m_sprBackground.StopAnimating();
|
||||
m_sprBackground.SetState( 2 );
|
||||
m_sprBackground.SetZoomY( BAR_HEIGHT/m_sprBackground.GetUnzoomedHeight() );
|
||||
this->AddActor( &m_sprBackground );
|
||||
|
||||
m_sprTopButton.Load( THEME->GetPathTo(GRAPHIC_SCROLLBAR_PARTS) );
|
||||
m_sprTopButton.StopAnimating();
|
||||
m_sprTopButton.SetState( 0 );
|
||||
m_sprTopButton.SetY( -BAR_HEIGHT/2 );
|
||||
this->AddActor( &m_sprTopButton );
|
||||
|
||||
m_sprBottomButton.Load( THEME->GetPathTo(GRAPHIC_SCROLLBAR_PARTS) );
|
||||
m_sprBottomButton.StopAnimating();
|
||||
m_sprBottomButton.SetState( 3 );
|
||||
m_sprBottomButton.SetY( BAR_HEIGHT/2 );
|
||||
this->AddActor( &m_sprBottomButton );
|
||||
|
||||
m_sprScrollThumb.Load( THEME->GetPathTo(GRAPHIC_SCROLLBAR_PARTS) );
|
||||
m_sprScrollThumb.StopAnimating();
|
||||
m_sprScrollThumb.SetState( 1 );
|
||||
m_sprScrollThumb.SetY( CENTER_Y );
|
||||
this->AddActor( &m_sprScrollThumb );
|
||||
}
|
||||
|
||||
void ScrollBar::SetPercentage( float fPercentageFromTop )
|
||||
{
|
||||
if( fPercentageFromTop < 0 ) fPercentageFromTop += 1;
|
||||
fPercentageFromTop = fmodf( fPercentageFromTop, 1 );
|
||||
m_sprScrollThumb.SetY( -BAR_HEIGHT/2+16 + fPercentageFromTop*(BAR_HEIGHT-32) );
|
||||
}
|
||||
@@ -0,0 +1,27 @@
|
||||
#pragma once
|
||||
/*
|
||||
-----------------------------------------------------------------------------
|
||||
Class: ScrollBar
|
||||
|
||||
Desc: A graphic displayed in the ScrollBar during Dancing.
|
||||
|
||||
Copyright (c) 2001-2002 by the persons listed below. All rights reserved.
|
||||
Chris Danford
|
||||
-----------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
#include "ActorFrame.h"
|
||||
#include "Sprite.h"
|
||||
|
||||
|
||||
class ScrollBar : public ActorFrame
|
||||
{
|
||||
public:
|
||||
ScrollBar();
|
||||
|
||||
void SetPercentage( float fPercentageFromTop );
|
||||
|
||||
private:
|
||||
Sprite m_sprTopButton, m_sprBottomButton;
|
||||
Sprite m_sprBackground, m_sprScrollThumb;
|
||||
};
|
||||
+34
-15
@@ -15,7 +15,7 @@
|
||||
|
||||
#include "Song.h"
|
||||
#include <math.h> // for fmod
|
||||
#include "RageHelper.h"
|
||||
#include "RageLog.h"
|
||||
#include "ErrorCatcher/ErrorCatcher.h"
|
||||
|
||||
|
||||
@@ -79,7 +79,7 @@ Song::Song()
|
||||
|
||||
void Song::GetBeatAndBPSFromElapsedTime( float fElapsedTime, float &fBeatOut, float &fBPSOut )
|
||||
{
|
||||
// HELPER.Log( "GetBeatAndBPSFromElapsedTime( fElapsedTime = %f )", fElapsedTime );
|
||||
// LOG->WriteLine( "GetBeatAndBPSFromElapsedTime( fElapsedTime = %f )", fElapsedTime );
|
||||
// This function is a nightmare. Don't even try to understand it. :-)
|
||||
|
||||
fElapsedTime += m_fOffsetInSeconds;
|
||||
@@ -174,10 +174,29 @@ float Song::GetElapsedTimeFromBeat( float fBeat )
|
||||
return fElapsedTimeBestGuess;
|
||||
}
|
||||
|
||||
void Song::GetMainAndSubTitlesFromFullTitle( CString sFullTitle, CString &sMainTitleOut, CString &sSubTitleOut )
|
||||
{
|
||||
char szSeps[] = { '-', '~' };
|
||||
for( int i=0; i<sizeof(szSeps); i++ )
|
||||
{
|
||||
const char c = szSeps[i];
|
||||
int iBeginIndex = sFullTitle.Find( c );
|
||||
if( iBeginIndex == -1 )
|
||||
continue;
|
||||
int iEndIndex = sFullTitle.Find( c, iBeginIndex+1 );
|
||||
if( iEndIndex == -1 )
|
||||
continue;
|
||||
sMainTitleOut = sFullTitle.Left( iBeginIndex-1 );
|
||||
sSubTitleOut = sFullTitle.Mid( iBeginIndex, iEndIndex-iBeginIndex+1 );
|
||||
return;
|
||||
}
|
||||
sMainTitleOut = sFullTitle;
|
||||
sSubTitleOut = "";
|
||||
};
|
||||
|
||||
bool Song::LoadFromSongDir( CString sDir )
|
||||
{
|
||||
HELPER.Log( "Song::LoadFromSongDir(%s)", sDir );
|
||||
LOG->WriteLine( "Song::LoadFromSongDir(%s)", sDir );
|
||||
|
||||
// make sure there is a trailing '\\' at the end of sDir
|
||||
if( sDir.Right(1) != "\\" )
|
||||
@@ -222,7 +241,7 @@ bool Song::LoadFromSongDir( CString sDir )
|
||||
|
||||
bool Song::LoadFromBMSDir( CString sDir )
|
||||
{
|
||||
HELPER.Log( "Song::LoadFromBMSDir(%s)", sDir );
|
||||
LOG->WriteLine( "Song::LoadFromBMSDir(%s)", sDir );
|
||||
|
||||
// make sure there is a trailing '\\' at the end of sDir
|
||||
if( sDir.Right(1) != "\\" )
|
||||
@@ -323,7 +342,7 @@ bool Song::LoadFromBMSDir( CString sDir )
|
||||
// add, then sort
|
||||
m_BPMSegments.Add( new_seg );
|
||||
SortBPMSegmentsArray( m_BPMSegments );
|
||||
HELPER.Log( "Inserting new BPM change at beat %f, BPM %f", new_seg.m_fStartBeat, new_seg.m_fBPM );
|
||||
LOG->WriteLine( "Inserting new BPM change at beat %f, BPM %f", new_seg.m_fStartBeat, new_seg.m_fBPM );
|
||||
}
|
||||
else if( -1 != value_name.Find("#backbmp") )
|
||||
{
|
||||
@@ -352,7 +371,7 @@ bool Song::LoadFromBMSDir( CString sDir )
|
||||
}
|
||||
|
||||
const int iNumNotesInThisMeasure = arrayNotes.GetSize();
|
||||
//HELPER.Log( "%s:%s: iMeasureNo = %d, iTrackNum = %d, iNumNotesInThisMeasure = %d",
|
||||
//LOG->WriteLine( "%s:%s: iMeasureNo = %d, iTrackNum = %d, iNumNotesInThisMeasure = %d",
|
||||
// valuename, sNoteData, iMeasureNo, iTrackNum, iNumNotesInThisMeasure );
|
||||
for( int j=0; j<iNumNotesInThisMeasure; j++ )
|
||||
{
|
||||
@@ -372,7 +391,7 @@ bool Song::LoadFromBMSDir( CString sDir )
|
||||
float fBPS;
|
||||
fBPS = m_BPMSegments[0].m_fBPM/60.0f;
|
||||
m_fOffsetInSeconds = fBeatOffset / fBPS;
|
||||
//HELPER.Log( "Found offset to be index %d, beat %f", iStepIndex, NoteIndexToBeat(iStepIndex) );
|
||||
//LOG->WriteLine( "Found offset to be index %d, beat %f", iStepIndex, NoteIndexToBeat(iStepIndex) );
|
||||
break;
|
||||
case 03: // bpm
|
||||
BPMSegment new_seg;
|
||||
@@ -389,7 +408,7 @@ bool Song::LoadFromBMSDir( CString sDir )
|
||||
}
|
||||
|
||||
for( i=0; i<m_BPMSegments.GetSize(); i++ )
|
||||
HELPER.Log( "There is a BPM change at beat %f, BPM %f, index %d",
|
||||
LOG->WriteLine( "There is a BPM change at beat %f, BPM %f, index %d",
|
||||
m_BPMSegments[i].m_fStartBeat, m_BPMSegments[i].m_fBPM, i );
|
||||
|
||||
|
||||
@@ -402,7 +421,7 @@ bool Song::LoadFromBMSDir( CString sDir )
|
||||
|
||||
bool Song::LoadFromDWIFile( CString sPath )
|
||||
{
|
||||
HELPER.Log( "Song::LoadFromDWIFile(%s)", sPath );
|
||||
LOG->WriteLine( "Song::LoadFromDWIFile(%s)", sPath );
|
||||
|
||||
// save song file path
|
||||
m_sSongFilePath = sPath;
|
||||
@@ -523,7 +542,7 @@ bool Song::LoadFromDWIFile( CString sPath )
|
||||
new_seg.m_fStartBeat = fFreezeBeat;
|
||||
new_seg.m_fFreezeSeconds = fFreezeSeconds;
|
||||
|
||||
HELPER.Log( "Adding a freeze segment: beat: %f, seconds = %f", new_seg.m_fStartBeat, new_seg.m_fFreezeSeconds );
|
||||
LOG->WriteLine( "Adding a freeze segment: beat: %f, seconds = %f", new_seg.m_fStartBeat, new_seg.m_fFreezeSeconds );
|
||||
|
||||
m_FreezeSegments.Add( new_seg ); // add to back for now (we'll sort later)
|
||||
SortFreezeSegmentsArray( m_FreezeSegments );
|
||||
@@ -580,7 +599,7 @@ bool Song::LoadFromDWIFile( CString sPath )
|
||||
|
||||
bool Song::LoadFromSMDir( CString sDir )
|
||||
{
|
||||
HELPER.Log( "Song::LoadFromSMDir(%s)", sDir );
|
||||
LOG->WriteLine( "Song::LoadFromSMDir(%s)", sDir );
|
||||
|
||||
int i;
|
||||
|
||||
@@ -716,7 +735,7 @@ bool Song::LoadFromSMDir( CString sDir )
|
||||
new_seg.m_fStartBeat = fFreezeBeat;
|
||||
new_seg.m_fFreezeSeconds = fFreezeSeconds;
|
||||
|
||||
HELPER.Log( "Adding a freeze segment: beat: %f, seconds = %f", new_seg.m_fStartBeat, new_seg.m_fFreezeSeconds );
|
||||
LOG->WriteLine( "Adding a freeze segment: beat: %f, seconds = %f", new_seg.m_fStartBeat, new_seg.m_fFreezeSeconds );
|
||||
|
||||
m_FreezeSegments.Add( new_seg ); // add to back for now (we'll sort later)
|
||||
SortFreezeSegmentsArray( m_FreezeSegments );
|
||||
@@ -746,7 +765,7 @@ bool Song::LoadFromSMDir( CString sDir )
|
||||
}
|
||||
|
||||
else
|
||||
HELPER.Log( "Unexpected value named '%s'", sValueName );
|
||||
LOG->WriteLine( "Unexpected value named '%s'", sValueName );
|
||||
}
|
||||
|
||||
TidyUpData();
|
||||
@@ -986,13 +1005,13 @@ void Song::SaveOffsetChangeToDisk()
|
||||
*/
|
||||
void Song::Save()
|
||||
{
|
||||
HELPER.Log( "Song::Save()" );
|
||||
LOG->WriteLine( "Song::Save()" );
|
||||
|
||||
int i;
|
||||
|
||||
if( -1 != m_sSongDir.Find("DWI Support") )
|
||||
{
|
||||
HELPER.Log("WARNING: Can't save to DWI support folder!");
|
||||
LOG->WriteLine("WARNING: Can't save to DWI support folder!");
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
//#include <d3dxmath.h>
|
||||
#include "SongManager.h"
|
||||
#include "IniFile.h"
|
||||
#include "RageHelper.h"
|
||||
#include "RageLog.h"
|
||||
#include "ErrorCatcher/ErrorCatcher.h"
|
||||
|
||||
SongManager* SONG = NULL; // global and accessable from anywhere in our program
|
||||
@@ -71,7 +71,7 @@ void SongManager::InitSongArrayFromDisk()
|
||||
m_arrayGroupNames.Add( sGroupName );
|
||||
}
|
||||
|
||||
HELPER.Log( "Found %d Songs.", m_pSongs.GetSize() );
|
||||
LOG->WriteLine( "Found %d Songs.", m_pSongs.GetSize() );
|
||||
}
|
||||
|
||||
void SongManager::LoadStepManiaSongDir( CString sDir )
|
||||
@@ -111,7 +111,7 @@ void SongManager::LoadStepManiaSongDir( CString sDir )
|
||||
if( arrayGroupBanners.GetSize() > 0 )
|
||||
{
|
||||
m_mapGroupToBannerPath[sGroupDirName] = ssprintf("%s\\%s\\%s", sDir, sGroupDirName, arrayGroupBanners[0] );
|
||||
HELPER.Log( ssprintf("Group banner for '%s' is '%s'.", sGroupDirName, m_mapGroupToBannerPath[sGroupDirName]) );
|
||||
LOG->WriteLine( ssprintf("Group banner for '%s' is '%s'.", sGroupDirName, m_mapGroupToBannerPath[sGroupDirName]) );
|
||||
}
|
||||
|
||||
// Find all Song folders in this group directory
|
||||
@@ -213,7 +213,7 @@ void SongManager::ReadStatisticsFromDisk()
|
||||
IniFile ini;
|
||||
ini.SetPath( g_sStatisticsFileName );
|
||||
if( !ini.ReadFile() ) {
|
||||
HELPER.Log( "WARNING: Could not read config file '%s'.", g_sStatisticsFileName );
|
||||
LOG->WriteLine( "WARNING: Could not read config file '%s'.", g_sStatisticsFileName );
|
||||
return; // load nothing
|
||||
}
|
||||
|
||||
|
||||
@@ -12,10 +12,9 @@
|
||||
|
||||
#include "Sprite.h"
|
||||
#include "RageTextureManager.h"
|
||||
#include "PrefsManager.h"
|
||||
#include "IniFile.h"
|
||||
#include <math.h>
|
||||
#include "RageHelper.h"
|
||||
#include "RageLog.h"
|
||||
#include "ErrorCatcher/ErrorCatcher.h"
|
||||
|
||||
|
||||
@@ -32,7 +31,7 @@ Sprite::Sprite()
|
||||
|
||||
Sprite::~Sprite()
|
||||
{
|
||||
// HELPER.Log( "Sprite Destructor" );
|
||||
// LOG->WriteLine( "Sprite Destructor" );
|
||||
|
||||
TEXTURE->UnloadTexture( m_sTexturePath );
|
||||
}
|
||||
@@ -40,7 +39,7 @@ Sprite::~Sprite()
|
||||
|
||||
bool Sprite::LoadFromTexture( CString sTexturePath, DWORD dwHints, bool bForceReload )
|
||||
{
|
||||
HELPER.Log( ssprintf("Sprite::LoadFromTexture(%s)", sTexturePath) );
|
||||
LOG->WriteLine( ssprintf("Sprite::LoadFromTexture(%s)", sTexturePath) );
|
||||
|
||||
//Init();
|
||||
return LoadTexture( sTexturePath, dwHints, bForceReload );
|
||||
@@ -56,7 +55,7 @@ bool Sprite::LoadFromTexture( CString sTexturePath, DWORD dwHints, bool bForceRe
|
||||
// Delay0000=2.0
|
||||
bool Sprite::LoadFromSpriteFile( CString sSpritePath, DWORD dwHints, bool bForceReload )
|
||||
{
|
||||
HELPER.Log( ssprintf("Sprite::LoadFromSpriteFile(%s)", sSpritePath) );
|
||||
LOG->WriteLine( ssprintf("Sprite::LoadFromSpriteFile(%s)", sSpritePath) );
|
||||
|
||||
//Init();
|
||||
|
||||
@@ -269,7 +268,7 @@ void Sprite::RenderPrimitives()
|
||||
//////////////////////
|
||||
// render the shadow
|
||||
//////////////////////
|
||||
if( m_bShadow && PREFS && PREFS->GetCurrentGraphicProfileOptions()->m_bShadows )
|
||||
if( m_bShadow )
|
||||
{
|
||||
SCREEN->PushMatrix();
|
||||
SCREEN->TranslateLocal( m_fShadowLength, m_fShadowLength, 0 ); // shift by 5 units
|
||||
|
||||
@@ -28,7 +28,7 @@
|
||||
//
|
||||
// Rage global classes
|
||||
//
|
||||
#include "RageHelper.h"
|
||||
#include "RageLog.h"
|
||||
#include "RageScreen.h"
|
||||
#include "RageTextureManager.h"
|
||||
#include "RageSound.h"
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 5.9 KiB After Width: | Height: | Size: 7.2 KiB |
@@ -30,8 +30,8 @@
|
||||
// StepMania common classes
|
||||
//
|
||||
#include "Font.h"
|
||||
#include "GameConstants.h"
|
||||
#include "GameTypes.h"
|
||||
#include "GameConstantsAndTypes.h"
|
||||
#include "GameConstantsAndTypes.h"
|
||||
#include "GameInput.h"
|
||||
#include "StyleInput.h"
|
||||
#include "Song.h"
|
||||
@@ -46,7 +46,7 @@
|
||||
#include "WindowPlayerOptions.h"
|
||||
#include "WindowMusicScroll.h"
|
||||
|
||||
#include "ScreenDimensions.h"
|
||||
#include "GameConstantsAndTypes.h"
|
||||
|
||||
// error catcher stuff
|
||||
#include "ErrorCatcher/ErrorCatcher.h"
|
||||
@@ -254,10 +254,8 @@ void MainLoop()
|
||||
{
|
||||
Update();
|
||||
Render();
|
||||
//if( !g_bFullscreen )
|
||||
#ifdef DEBUG
|
||||
::Sleep(1 ); // give some time for the movie decoding thread
|
||||
#endif
|
||||
if( SCREEN && SCREEN->IsWindowed() )
|
||||
::Sleep( 0 ); // give some time to other processes
|
||||
}
|
||||
} // end while( WM_QUIT != msg.message )
|
||||
|
||||
@@ -312,7 +310,7 @@ BOOL CALLBACK ErrorWndProc( HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam )
|
||||
}
|
||||
break;
|
||||
case IDC_BUTTON_REPORT:
|
||||
GotoURL( "Docs/report.htm" );
|
||||
GotoURL( "http://sourceforge.net/tracker/?func=add&group_id=37892&atid=421366" );
|
||||
break;
|
||||
case IDC_BUTTON_RESTART:
|
||||
{
|
||||
@@ -417,7 +415,10 @@ LRESULT CALLBACK WndProc( HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam )
|
||||
ApplyGraphicOptions();
|
||||
return 0;
|
||||
case IDM_CHANGEDETAIL:
|
||||
PREFS->m_GraphicProfile = GraphicProfile( (PREFS->m_GraphicProfile+1)%NUM_GRAPHIC_PROFILES );
|
||||
if( PREFS->m_GraphicProfile == PROFILE_LOW )
|
||||
PREFS->m_GraphicProfile = PROFILE_MEDIUM;
|
||||
else
|
||||
PREFS->m_GraphicProfile = PROFILE_LOW;
|
||||
ApplyGraphicOptions();
|
||||
return 0;
|
||||
case IDM_EXIT:
|
||||
@@ -487,6 +488,7 @@ HRESULT CreateObjects( HWND hWnd )
|
||||
//
|
||||
srand( (unsigned)time(NULL) ); // seed number generator
|
||||
|
||||
LOG = new RageLog();
|
||||
SOUND = new RageSound( hWnd );
|
||||
MUSIC = new RageSoundStream;
|
||||
INPUTM = new RageInput( hWnd );
|
||||
@@ -555,6 +557,7 @@ void DestroyObjects()
|
||||
SAFE_DELETE( SOUND );
|
||||
SAFE_DELETE( TEXTURE );
|
||||
SAFE_DELETE( SCREEN );
|
||||
SAFE_DELETE( LOG );
|
||||
}
|
||||
|
||||
|
||||
|
||||
+32
-16
@@ -100,14 +100,6 @@ SOURCE=.\RageBitmapTexture.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\RageHelper.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\RageHelper.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\RageInput.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
@@ -116,6 +108,14 @@ SOURCE=.\RageInput.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\RageLog.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\RageLog.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\RageMovieTexture.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
@@ -216,14 +216,6 @@ SOURCE=.\WindowConfigurePads.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\WindowCustomGraphicOptions.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\WindowCustomGraphicOptions.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\WindowDancing.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
@@ -744,6 +736,22 @@ SOURCE=.\Banner.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\BannerWithFrame.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\BannerWithFrame.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\BonusInfoFrame.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\BonusInfoFrame.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\BPMDisplay.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
@@ -840,6 +848,14 @@ SOURCE=.\MusicWheel.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\ScrollBar.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\ScrollBar.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\SongInfoFrame.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
@@ -158,12 +158,6 @@
|
||||
<File
|
||||
RelativePath=".\WindowConfigurePads.h">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="WindowCustomGraphicOptions.cpp">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="WindowCustomGraphicOptions.h">
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\WindowDancing.cpp">
|
||||
</File>
|
||||
@@ -322,7 +316,7 @@
|
||||
RelativePath=".\FontManager.h">
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\GameConstants.h">
|
||||
RelativePath="GameConstantsAndTypes.h">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="GameDef.cpp">
|
||||
@@ -440,9 +434,6 @@
|
||||
<Filter
|
||||
Name="System"
|
||||
Filter="">
|
||||
<File
|
||||
RelativePath=".\ScreenDimensions.h">
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\StdAfx.cpp">
|
||||
</File>
|
||||
@@ -569,6 +560,18 @@
|
||||
<File
|
||||
RelativePath=".\Banner.h">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="BannerWithFrame.cpp">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="BannerWithFrame.h">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="BonusInfoFrame.cpp">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="BonusInfoFrame.h">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="CroppedSprite.cpp">
|
||||
</File>
|
||||
@@ -635,6 +638,12 @@
|
||||
<File
|
||||
RelativePath=".\MusicWheel.h">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="ScrollBar.cpp">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="ScrollBar.h">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="SongInfoFrame.cpp">
|
||||
</File>
|
||||
@@ -781,18 +790,18 @@
|
||||
<File
|
||||
RelativePath=".\RageBitmapTexture.h">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="RageHelper.cpp">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="RageHelper.h">
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\RageInput.cpp">
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\RageInput.h">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="RageLog.cpp">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="RageLog.h">
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\RageMovieTexture.cpp">
|
||||
</File>
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
*/
|
||||
|
||||
#include "StyleDef.h"
|
||||
#include "RageHelper.h"
|
||||
#include "RageLog.h"
|
||||
#include "RageUtil.h"
|
||||
#include "ErrorCatcher/ErrorCatcher.h"
|
||||
#include "GameDef.h"
|
||||
@@ -19,7 +19,7 @@
|
||||
|
||||
StyleDef::StyleDef( GameDef* pGameDef, CString sStyleFilePath )
|
||||
{
|
||||
HELPER.Log( "StyleDef::StyleDef( '%s )", sStyleFilePath );
|
||||
LOG->WriteLine( "StyleDef::StyleDef( '%s )", sStyleFilePath );
|
||||
|
||||
// extract the game name
|
||||
CString sThrowAway;
|
||||
@@ -140,4 +140,18 @@ StyleDef::StyleDef( GameDef* pGameDef, CString sStyleFilePath )
|
||||
|
||||
for( int c=0; c<m_iColsPerPlayer; c++ )
|
||||
m_iColumnDrawOrder[c] = atoi( arrayColDrawOrder[c] );
|
||||
}
|
||||
|
||||
void StyleDef::GetTransformedNoteDataForStyle( PlayerNumber p, NoteData* pOriginal, NoteData &newNoteData )
|
||||
{
|
||||
TrackNumber iNewToOriginalTrack[MAX_COLS_PER_PLAYER];
|
||||
for( int col=0; col<m_iColsPerPlayer; col++ )
|
||||
{
|
||||
ColumnInfo colInfo = m_ColumnInfo[p][col];
|
||||
TrackNumber originalTrack = colInfo.track;
|
||||
|
||||
iNewToOriginalTrack[col] = originalTrack;
|
||||
}
|
||||
|
||||
newNoteData.LoadTransformed( pOriginal, m_iColsPerPlayer, iNewToOriginalTrack );
|
||||
}
|
||||
@@ -59,7 +59,7 @@ public:
|
||||
return GameInput( n, b );
|
||||
};
|
||||
|
||||
inline StyleInput GameInputToStyleInput( const GameInput GameI )
|
||||
inline StyleInput StyleDef::GameInputToStyleInput( const GameInput &GameI )
|
||||
{
|
||||
for( int p=0; p<NUM_PLAYERS; p++ )
|
||||
{
|
||||
@@ -72,22 +72,10 @@ public:
|
||||
}
|
||||
}
|
||||
}
|
||||
return StyleInput(); // didn't find a StyleInput
|
||||
};
|
||||
|
||||
void GetTransformedNoteDataForStyle( PlayerNumber p, NoteData* pOriginal, NoteData &newNoteData )
|
||||
{
|
||||
TrackNumber iNewToOriginalTrack[MAX_COLS_PER_PLAYER];
|
||||
for( int col=0; col<m_iColsPerPlayer; col++ )
|
||||
{
|
||||
ColumnInfo colInfo = m_ColumnInfo[p][col];
|
||||
TrackNumber originalTrack = colInfo.track;
|
||||
|
||||
iNewToOriginalTrack[col] = originalTrack;
|
||||
}
|
||||
|
||||
newNoteData.LoadTransformed( pOriginal, m_iColsPerPlayer, iNewToOriginalTrack );
|
||||
return StyleInput(); // Didn't find a match. Return blank.
|
||||
}
|
||||
|
||||
void GetTransformedNoteDataForStyle( PlayerNumber p, NoteData* pOriginal, NoteData &newNoteData );
|
||||
|
||||
};
|
||||
|
||||
|
||||
@@ -30,6 +30,10 @@ TextBanner::TextBanner()
|
||||
m_textSubTitle.SetHorizAlign( align_left );
|
||||
m_textArtist.SetHorizAlign( align_left );
|
||||
|
||||
m_textTitle.TurnShadowOff();
|
||||
m_textSubTitle.TurnShadowOff();
|
||||
m_textArtist.TurnShadowOff();
|
||||
|
||||
this->AddActor( &m_textTitle );
|
||||
this->AddActor( &m_textSubTitle );
|
||||
this->AddActor( &m_textArtist );
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
*/
|
||||
|
||||
#include "ThemeManager.h"
|
||||
#include "RageHelper.h"
|
||||
#include "RageLog.h"
|
||||
#include "ErrorCatcher/ErrorCatcher.h"
|
||||
|
||||
|
||||
@@ -25,7 +25,7 @@ ThemeManager::ThemeManager()
|
||||
for( int i=0; i<arrayThemeNames.GetSize(); i++ )
|
||||
AssertThemeIsComplete( arrayThemeNames[i] );
|
||||
|
||||
SetTheme( DEFAULT_THEME_NAME );
|
||||
SwitchTheme( DEFAULT_THEME_NAME );
|
||||
}
|
||||
|
||||
void ThemeManager::GetThemeNames( CStringArray& AddTo )
|
||||
@@ -43,7 +43,7 @@ void ThemeManager::GetThemeNames( CStringArray& AddTo )
|
||||
}
|
||||
}
|
||||
|
||||
bool ThemeManager::SetTheme( CString sThemeName ) // return false if theme doesn't exist
|
||||
bool ThemeManager::SwitchTheme( CString sThemeName ) // return false if theme doesn't exist
|
||||
{
|
||||
sThemeName.MakeLower();
|
||||
m_sCurThemeName = sThemeName;
|
||||
@@ -103,6 +103,7 @@ CString ThemeManager::ElementToAssetPath( ThemeElement te )
|
||||
case GRAPHIC_RESULTS_GRADE_FRAME: sAssetPath = "Graphics\\results grade frame 1x2"; break;
|
||||
case GRAPHIC_RESULTS_JUDGE_LABELS: sAssetPath = "Graphics\\results judge labels 1x6"; break;
|
||||
case GRAPHIC_RESULTS_SCORE_LABELS: sAssetPath = "Graphics\\results score labels 1x2"; break;
|
||||
case GRAPHIC_RESULTS_GRADES: sAssetPath = "Graphics\\results grades 1x7"; break;
|
||||
case GRAPHIC_FALLBACK_BANNER: sAssetPath = "Graphics\\Fallback Banner"; break;
|
||||
case GRAPHIC_FALLBACK_BACKGROUND: sAssetPath = "Graphics\\Fallback Background"; break;
|
||||
case GRAPHIC_FALLBACK_CD_TITLE: sAssetPath = "Graphics\\Fallback CD Title"; break;
|
||||
@@ -112,6 +113,7 @@ CString ThemeManager::ElementToAssetPath( ThemeElement te )
|
||||
case GRAPHIC_LIFEMETER_FRAME: sAssetPath = "Graphics\\Life Meter Frame"; break;
|
||||
case GRAPHIC_LIFEMETER_PILLS: sAssetPath = "Graphics\\life meter pills 17x1"; break;
|
||||
case GRAPHIC_COMBO: sAssetPath = "Graphics\\combo"; break;
|
||||
case GRAPHIC_SCROLLBAR_PARTS: sAssetPath = "Graphics\\scrollbar parts"; break;
|
||||
case GRAPHIC_CLOSING_STAR: sAssetPath = "Graphics\\closing star"; break;
|
||||
case GRAPHIC_OPENING_STAR: sAssetPath = "Graphics\\opening star"; break;
|
||||
case GRAPHIC_CAUTION: sAssetPath = "Graphics\\Caution"; break;
|
||||
@@ -119,7 +121,6 @@ CString ThemeManager::ElementToAssetPath( ThemeElement te )
|
||||
case GRAPHIC_HERE_WE_GO: sAssetPath = "Graphics\\here we go"; break;
|
||||
case GRAPHIC_CLEARED: sAssetPath = "Graphics\\cleared"; break;
|
||||
case GRAPHIC_FAILED: sAssetPath = "Graphics\\failed"; break;
|
||||
case GRAPHIC_GRADES: sAssetPath = "Graphics\\grades 1x8"; break;
|
||||
case GRAPHIC_KEEP_ALIVE: sAssetPath = "Graphics\\keep alive"; break;
|
||||
case GRAPHIC_DANCER_P1: sAssetPath = "Graphics\\dancer p1"; break;
|
||||
case GRAPHIC_DANCER_P2: sAssetPath = "Graphics\\dancer p2"; break;
|
||||
@@ -145,6 +146,8 @@ CString ThemeManager::ElementToAssetPath( ThemeElement te )
|
||||
case GRAPHIC_SONG_OPTIONS_BACKGROUND: sAssetPath = "Graphics\\song options background"; break;
|
||||
case GRAPHIC_SYNCHRONIZE_BACKGROUND: sAssetPath = "Graphics\\synchronize background"; break;
|
||||
case GRAPHIC_SYNCHRONIZE_TOP_EDGE: sAssetPath = "Graphics\\synchronize top edge"; break;
|
||||
case GRAPHIC_SELECT_GAME_BACKGROUND: sAssetPath = "Graphics\\select game background"; break;
|
||||
case GRAPHIC_SELECT_GAME_TOP_EDGE: sAssetPath = "Graphics\\select game top edge"; break;
|
||||
case GRAPHIC_TITLE_MENU_LOGO: sAssetPath = "Graphics\\title menu logo"; break;
|
||||
case GRAPHIC_SELECT_DIFFICULTY_BACKGROUND: sAssetPath = "Graphics\\select difficulty background"; break;
|
||||
case GRAPHIC_SELECT_DIFFICULTY_TOP_EDGE: sAssetPath = "Graphics\\select difficulty top edge"; break;
|
||||
@@ -173,6 +176,7 @@ CString ThemeManager::ElementToAssetPath( ThemeElement te )
|
||||
case GRAPHIC_SELECT_MUSIC_RADAR_BASE: sAssetPath = "Graphics\\select music radar base"; break;
|
||||
case GRAPHIC_SELECT_MUSIC_RADAR_WORDS: sAssetPath = "Graphics\\select music radar words 1x5"; break;
|
||||
case GRAPHIC_SELECT_MUSIC_SCORE_FRAME: sAssetPath = "Graphics\\select music score frame"; break;
|
||||
case GRAPHIC_SELECT_MUSIC_SMALL_GRADES: sAssetPath = "Graphics\\select music small grades 1x7"; break;
|
||||
case GRAPHIC_SELECT_GROUP_EXPLANATION: sAssetPath = "Graphics\\select group explanation"; break;
|
||||
case GRAPHIC_SELECT_GROUP_INFO_FRAME: sAssetPath = "Graphics\\select group info frame"; break;
|
||||
case GRAPHIC_SELECT_GROUP_BUTTON: sAssetPath = "Graphics\\select group button"; break;
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
#pragma once
|
||||
/*
|
||||
-----------------------------------------------------------------------------
|
||||
Class: ThemeManager
|
||||
@@ -10,10 +11,6 @@
|
||||
-----------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
#ifndef _ThemeManager_H_
|
||||
#define _ThemeManager_H_
|
||||
|
||||
|
||||
#include "RageUtil.h"
|
||||
|
||||
|
||||
@@ -28,6 +25,7 @@ enum ThemeElement {
|
||||
GRAPHIC_CLEARED,
|
||||
GRAPHIC_CLOSING_STAR,
|
||||
GRAPHIC_COMBO,
|
||||
GRAPHIC_SCROLLBAR_PARTS,
|
||||
GRAPHIC_DANCER_P1,
|
||||
GRAPHIC_DANCER_P2,
|
||||
GRAPHIC_DANGER_BACKGROUND,
|
||||
@@ -38,11 +36,14 @@ enum ThemeElement {
|
||||
GRAPHIC_FALLBACK_BACKGROUND,
|
||||
GRAPHIC_FALLBACK_BANNER,
|
||||
GRAPHIC_FALLBACK_CD_TITLE,
|
||||
GRAPHIC_GAME_OPTIONS_BACKGROUND,
|
||||
GRAPHIC_GAME_OPTIONS_TOP_EDGE,
|
||||
GRAPHIC_GRADES,
|
||||
GRAPHIC_SELECT_GAME_BACKGROUND,
|
||||
GRAPHIC_SELECT_GAME_TOP_EDGE,
|
||||
GRAPHIC_RESULTS_GRADES,
|
||||
GRAPHIC_SELECT_MUSIC_SMALL_GRADES,
|
||||
GRAPHIC_GRAPHIC_OPTIONS_BACKGROUND,
|
||||
GRAPHIC_GRAPHIC_OPTIONS_TOP_EDGE,
|
||||
GRAPHIC_GAME_OPTIONS_BACKGROUND,
|
||||
GRAPHIC_GAME_OPTIONS_TOP_EDGE,
|
||||
GRAPHIC_HERE_WE_GO,
|
||||
GRAPHIC_JUDGEMENT,
|
||||
GRAPHIC_KEEP_ALIVE,
|
||||
@@ -184,7 +185,7 @@ public:
|
||||
ThemeManager();
|
||||
|
||||
void GetThemeNames( CStringArray& AddTo );
|
||||
bool SetTheme( CString sThemeName ); // return false if theme doesn't exist
|
||||
bool SwitchTheme( CString sThemeName ); // return false if theme doesn't exist
|
||||
void AssertThemeIsComplete( CString sThemeName ); // return false if theme doesn't exist
|
||||
CString ElementToAssetPath( ThemeElement te );
|
||||
CString GetPathTo( ThemeElement te );
|
||||
@@ -198,8 +199,4 @@ protected:
|
||||
|
||||
|
||||
|
||||
|
||||
extern ThemeManager* THEME; // global and accessable from anywhere in our program
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
#include "TipDisplay.h"
|
||||
#include "RageUtil.h"
|
||||
#include "ThemeManager.h"
|
||||
#include "RageHelper.h"
|
||||
#include "RageLog.h"
|
||||
|
||||
|
||||
const float TIP_FADE_TIME = 0.3f;
|
||||
@@ -21,7 +21,7 @@ const float TIP_SHOW_TIME = 2;
|
||||
|
||||
TipDisplay::TipDisplay()
|
||||
{
|
||||
HELPER.Log( "TipDisplay::TipDisplay()" );
|
||||
LOG->WriteLine( "TipDisplay::TipDisplay()" );
|
||||
|
||||
m_textTip.Load( THEME->GetPathTo(FONT_NORMAL) );
|
||||
this->AddActor( &m_textTip );
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
#include "RageUtil.h"
|
||||
|
||||
#include "TransitionFade.h"
|
||||
#include "ScreenDimensions.h"
|
||||
#include "GameConstantsAndTypes.h"
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
#include "RageUtil.h"
|
||||
|
||||
#include "TransitionFadeWipe.h"
|
||||
#include "ScreenDimensions.h"
|
||||
#include "GameConstantsAndTypes.h"
|
||||
#include "ThemeManager.h"
|
||||
|
||||
//#define RECTANGLE_WIDTH 20
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
#include "RageUtil.h"
|
||||
|
||||
#include "TransitionInvisible.h"
|
||||
#include "ScreenDimensions.h"
|
||||
#include "GameConstantsAndTypes.h"
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -12,18 +12,19 @@
|
||||
#include "RageUtil.h"
|
||||
|
||||
#include "TransitionKeepAlive.h"
|
||||
#include "ScreenDimensions.h"
|
||||
#include "GameConstantsAndTypes.h"
|
||||
#include "ThemeManager.h"
|
||||
|
||||
|
||||
const float KEEP_ALIVE_TRANSITION_TIME = 1.0f;
|
||||
const float KEEP_ALIVE_FORWARD_TRANSITION_TIME = 0.8f;
|
||||
const float KEEP_ALIVE_BACKWARD_TRANSITION_TIME = 0.4f;
|
||||
|
||||
TransitionKeepAlive::TransitionKeepAlive()
|
||||
{
|
||||
this->SetTransitionTime( KEEP_ALIVE_TRANSITION_TIME );
|
||||
|
||||
m_sprLogo.Load( THEME->GetPathTo(GRAPHIC_KEEP_ALIVE) );
|
||||
m_sprLogo.SetXY( CENTER_X, CENTER_Y );
|
||||
|
||||
m_rect.StretchTo( CRect(0,0,SCREEN_WIDTH,SCREEN_HEIGHT) );
|
||||
}
|
||||
|
||||
void TransitionKeepAlive::Update( float fDeltaTime )
|
||||
@@ -37,15 +38,60 @@ void TransitionKeepAlive::Update( float fDeltaTime )
|
||||
|
||||
void TransitionKeepAlive::RenderPrimitives()
|
||||
{
|
||||
float fPercentClosed = 1 - this->GetPercentageOpen();
|
||||
fPercentClosed = min( 1, fPercentClosed*2 );
|
||||
const float fPercentColor = fPercentClosed;
|
||||
const float fPercentAlpha = min( fPercentClosed * 2, 1 );
|
||||
if( m_TransitionState == closing_left ) // we're going back
|
||||
{
|
||||
// Draw a fade
|
||||
|
||||
m_sprLogo.SetDiffuseColor( D3DXCOLOR(fPercentColor,fPercentColor,fPercentColor,fPercentAlpha) );
|
||||
m_sprLogo.SetZoomY( fPercentClosed );
|
||||
if( fPercentClosed > 0 )
|
||||
m_sprLogo.Draw();
|
||||
const float fPercentageOpaque = 1 - GetPercentageOpen();
|
||||
if( fPercentageOpaque == 0 )
|
||||
return; // draw nothing
|
||||
|
||||
D3DXCOLOR colorTemp = m_Color * fPercentageOpaque;
|
||||
m_rect.SetDiffuseColor( colorTemp );
|
||||
m_rect.Draw();
|
||||
}
|
||||
else // we're going forward
|
||||
{
|
||||
// draw keep alive graphic
|
||||
|
||||
float fPercentClosed = 1 - this->GetPercentageOpen();
|
||||
fPercentClosed = min( 1, fPercentClosed*2 );
|
||||
const float fPercentColor = fPercentClosed;
|
||||
const float fPercentAlpha = min( fPercentClosed * 2, 1 );
|
||||
|
||||
m_sprLogo.SetDiffuseColor( D3DXCOLOR(fPercentColor,fPercentColor,fPercentColor,fPercentAlpha) );
|
||||
m_sprLogo.SetZoomY( fPercentClosed );
|
||||
if( fPercentClosed > 0 )
|
||||
m_sprLogo.Draw();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void TransitionKeepAlive::OpenWipingRight( WindowMessage send_when_done )
|
||||
{
|
||||
this->SetTransitionTime( KEEP_ALIVE_FORWARD_TRANSITION_TIME );
|
||||
|
||||
Transition::OpenWipingRight( send_when_done );
|
||||
}
|
||||
|
||||
void TransitionKeepAlive::OpenWipingLeft( WindowMessage send_when_done )
|
||||
{
|
||||
this->SetTransitionTime( KEEP_ALIVE_BACKWARD_TRANSITION_TIME );
|
||||
|
||||
Transition::OpenWipingLeft( send_when_done );
|
||||
}
|
||||
|
||||
void TransitionKeepAlive::CloseWipingRight(WindowMessage send_when_done )
|
||||
{
|
||||
this->SetTransitionTime( KEEP_ALIVE_FORWARD_TRANSITION_TIME );
|
||||
|
||||
Transition::CloseWipingRight( send_when_done );
|
||||
}
|
||||
|
||||
void TransitionKeepAlive::CloseWipingLeft( WindowMessage send_when_done )
|
||||
{
|
||||
this->SetTransitionTime( KEEP_ALIVE_BACKWARD_TRANSITION_TIME );
|
||||
|
||||
Transition::CloseWipingLeft( send_when_done );
|
||||
}
|
||||
|
||||
|
||||
@@ -24,8 +24,14 @@ public:
|
||||
virtual void Update( float fDeltaTime );
|
||||
virtual void RenderPrimitives();
|
||||
|
||||
virtual void OpenWipingRight( WindowMessage send_when_done = SM_None );
|
||||
virtual void OpenWipingLeft( WindowMessage send_when_done = SM_None );
|
||||
virtual void CloseWipingRight(WindowMessage send_when_done = SM_None );
|
||||
virtual void CloseWipingLeft( WindowMessage send_when_done = SM_None );
|
||||
|
||||
protected:
|
||||
Sprite m_sprLogo;
|
||||
RectangleActor m_rect;
|
||||
};
|
||||
|
||||
|
||||
|
||||
@@ -14,9 +14,6 @@
|
||||
#include "TransitionRectWipe.h"
|
||||
|
||||
|
||||
#define SCREEN_WIDTH 640
|
||||
#define SCREEN_HEIGHT 480
|
||||
|
||||
#define RECTANGLE_WIDTH 20
|
||||
#define NUM_RECTANGLES (SCREEN_WIDTH/RECTANGLE_WIDTH)
|
||||
#define FADE_RECTS_WIDE (NUM_RECTANGLES/4) // number of rects from fade start to fade end
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
#include "RageUtil.h"
|
||||
|
||||
#include "TransitionStarWipe.h"
|
||||
#include "ScreenDimensions.h"
|
||||
#include "GameConstantsAndTypes.h"
|
||||
#include "ThemeManager.h"
|
||||
|
||||
|
||||
|
||||
+8
-103
@@ -1,10 +1,10 @@
|
||||
log.txt: last compiled on Sun Apr 7 14:19:25 2002.
|
||||
Log starting 2002-04-28 12:00:05
|
||||
Log starting 2002-04-30 13:16:42
|
||||
|
||||
|
||||
RageSound::RageSound()
|
||||
Sound card info:
|
||||
- play latency is 2 ms
|
||||
- play latency is 3 ms
|
||||
- total device hardware memory is 0 bytes
|
||||
- free device hardware memory is 0 bytes
|
||||
- number of free sample slots in the hardware is 94
|
||||
@@ -149,18 +149,10 @@ Present Parameters: 640, 480, 22, 1, 0, 1, 0, 1, 1, 80, 0, 0, 0
|
||||
Mode change was successful.
|
||||
BitmapText::LoadFromFontName(Themes\default\Fonts\Normal.font)
|
||||
RageBitmapTexture: Loaded 'themes\default\fonts\normal 16x16.png' (512x512) from disk. bScaleImageToTextureSize = 0, source 512,512; image 512,512.
|
||||
RageTextureManager: Finished loading 'themes\default\fonts\normal 16x16.png' - 1237280 references.
|
||||
RageTextureManager: Finished loading 'themes\default\fonts\normal 16x16.png' - 1237292 references.
|
||||
FontManager: Loading 'themes\default\fonts\normal.font' from disk.
|
||||
BitmapText::LoadFromFontName(Themes\default\Fonts\Normal.font)
|
||||
FontManager: The Font 'themes\default\fonts\normal.font' now has 1 references.
|
||||
BitmapText::LoadFromFontName(Themes\default\Fonts\Normal.font)
|
||||
FontManager: The Font 'themes\default\fonts\normal.font' now has 2 references.
|
||||
BitmapText::LoadFromFontName(Themes\default\Fonts\Normal.font)
|
||||
FontManager: The Font 'themes\default\fonts\normal.font' now has 3 references.
|
||||
BitmapText::LoadFromFontName(Themes\default\Fonts\Normal.font)
|
||||
FontManager: The Font 'themes\default\fonts\normal.font' now has 4 references.
|
||||
BitmapText::LoadFromFontName(Themes\default\Fonts\Normal.font)
|
||||
FontManager: The Font 'themes\default\fonts\normal.font' now has 5 references.
|
||||
RageScreen::SwitchDisplayModes( 1, 640, 480, 16 )
|
||||
Testing format: display 22, back buffer 23, windowed 1...
|
||||
This won't work. Keep searching.
|
||||
@@ -174,96 +166,9 @@ Testing format: display 22, back buffer 22, windowed 1...
|
||||
This will work.
|
||||
Present Parameters: 640, 480, 22, 1, 0, 1, 0, 1, 1, 80, 0, 0, 0
|
||||
Mode change was successful.
|
||||
FPS: 2
|
||||
RageBitmapTexture: Loaded 'themes\default\fonts\normal 16x16.png' (512x512) from disk. bScaleImageToTextureSize = 0, source 512,512; image 512,512.
|
||||
WindowTitleMenu::WindowTitleMenu()
|
||||
Sprite::LoadFromTexture(Themes\default\Graphics\title menu background (no alpha).png)
|
||||
RageBitmapTexture: Loaded 'themes\default\graphics\title menu background (no alpha).png' (512x512) from disk. bScaleImageToTextureSize = 1, source 640,480; image 512,512.
|
||||
RageTextureManager: Finished loading 'themes\default\graphics\title menu background (no alpha).png' - 1236964 references.
|
||||
Sprite::LoadFromTexture(Themes\default\Graphics\title menu logo (1 alpha).png)
|
||||
RageBitmapTexture: Loaded 'themes\default\graphics\title menu logo (1 alpha).png' (512x512) from disk. bScaleImageToTextureSize = 0, source 512,315; image 512,315.
|
||||
RageTextureManager: Finished loading 'themes\default\graphics\title menu logo (1 alpha).png' - 1236964 references.
|
||||
BitmapText::LoadFromFontName(Themes\default\Fonts\Normal.font)
|
||||
FontManager: The Font 'themes\default\fonts\normal.font' now has 6 references.
|
||||
BitmapText::LoadFromFontName(Themes\default\Fonts\Normal.font)
|
||||
FontManager: The Font 'themes\default\fonts\normal.font' now has 7 references.
|
||||
BitmapText::LoadFromFontName(Themes\default\Fonts\Bold.font)
|
||||
RageBitmapTexture: Loaded 'themes\default\fonts\bold 8x8.png' (256x256) from disk. bScaleImageToTextureSize = 0, source 256,256; image 256,256.
|
||||
RageTextureManager: Finished loading 'themes\default\fonts\bold 8x8.png' - 1236968 references.
|
||||
FontManager: Loading 'themes\default\fonts\bold.font' from disk.
|
||||
BitmapText::LoadFromFontName(Themes\default\Fonts\Bold.font)
|
||||
FontManager: The Font 'themes\default\fonts\bold.font' now has 1 references.
|
||||
BitmapText::LoadFromFontName(Themes\default\Fonts\Bold.font)
|
||||
FontManager: The Font 'themes\default\fonts\bold.font' now has 2 references.
|
||||
BitmapText::LoadFromFontName(Themes\default\Fonts\Bold.font)
|
||||
FontManager: The Font 'themes\default\fonts\bold.font' now has 3 references.
|
||||
BitmapText::LoadFromFontName(Themes\default\Fonts\Bold.font)
|
||||
FontManager: The Font 'themes\default\fonts\bold.font' now has 4 references.
|
||||
BitmapText::LoadFromFontName(Themes\default\Fonts\Bold.font)
|
||||
FontManager: The Font 'themes\default\fonts\bold.font' now has 5 references.
|
||||
BitmapText::LoadFromFontName(Themes\default\Fonts\Bold.font)
|
||||
FontManager: The Font 'themes\default\fonts\bold.font' now has 6 references.
|
||||
BitmapText::LoadFromFontName(Themes\default\Fonts\Bold.font)
|
||||
FontManager: The Font 'themes\default\fonts\bold.font' now has 7 references.
|
||||
BitmapText::LoadFromFontName(Themes\default\Fonts\Bold.font)
|
||||
FontManager: The Font 'themes\default\fonts\bold.font' now has 8 references.
|
||||
BitmapText::LoadFromFontName(Themes\default\Fonts\Bold.font)
|
||||
FontManager: The Font 'themes\default\fonts\bold.font' now has 9 references.
|
||||
BitmapText::LoadFromFontName(Themes\default\Fonts\Bold.font)
|
||||
FontManager: The Font 'themes\default\fonts\bold.font' now has 10 references.
|
||||
RandomStream::LoadSound( Themes\default\Announcer\title\Dance Dance Revolution.mp3 )
|
||||
RandomSample::LoadSound( Themes\default\Sounds\title change.mp3 )
|
||||
RageSoundSample::Load( Themes\default\Sounds\title change.mp3 )
|
||||
RandomSample::LoadSound( Themes\default\Sounds\select.mp3 )
|
||||
RageSoundSample::Load( Themes\default\Sounds\select.mp3 )
|
||||
RandomSample::LoadSound( Themes\default\Sounds\invalid.mp3 )
|
||||
RageSoundSample::Load( Themes\default\Sounds\invalid.mp3 )
|
||||
FPS: 1
|
||||
FPS: 63
|
||||
FPS: 188
|
||||
FPS: 248
|
||||
FPS: 159
|
||||
FPS: 32
|
||||
FPS: 219
|
||||
FPS: 278
|
||||
FPS: 235
|
||||
FPS: 30
|
||||
FPS: 150
|
||||
FPS: 290
|
||||
FPS: 148
|
||||
FPS: 48
|
||||
FPS: 78
|
||||
FPS: 70
|
||||
FPS: 51
|
||||
FPS: 83
|
||||
FPS: 137
|
||||
FPS: 32
|
||||
FPS: 92
|
||||
FPS: 44
|
||||
FPS: 82
|
||||
FPS: 58
|
||||
WindowManager::~WindowManager()
|
||||
WindowTitleMenu::~WindowTitleMenu()
|
||||
FontManager: 'themes\default\fonts\bold.font' will not be deleted. It still has 10 references.
|
||||
FontManager: 'themes\default\fonts\bold.font' will not be deleted. It still has 9 references.
|
||||
FontManager: 'themes\default\fonts\bold.font' will not be deleted. It still has 8 references.
|
||||
FontManager: 'themes\default\fonts\bold.font' will not be deleted. It still has 7 references.
|
||||
FontManager: 'themes\default\fonts\bold.font' will not be deleted. It still has 6 references.
|
||||
FontManager: 'themes\default\fonts\bold.font' will not be deleted. It still has 5 references.
|
||||
FontManager: 'themes\default\fonts\bold.font' will not be deleted. It still has 4 references.
|
||||
FontManager: 'themes\default\fonts\bold.font' will not be deleted. It still has 3 references.
|
||||
FontManager: 'themes\default\fonts\bold.font' will not be deleted. It still has 2 references.
|
||||
FontManager: 'themes\default\fonts\bold.font' will not be deleted. It still has 1 references.
|
||||
FontManager: 'themes\default\fonts\bold.font' will be deleted. It has 0 references.
|
||||
RageTextureManager: 'themes\default\fonts\bold 8x8.png' will be deleted. It has 0 references.
|
||||
FontManager: 'themes\default\fonts\normal.font' will not be deleted. It still has 7 references.
|
||||
FontManager: 'themes\default\fonts\normal.font' will not be deleted. It still has 6 references.
|
||||
RageTextureManager: 'themes\default\graphics\title menu logo (1 alpha).png' will be deleted. It has 0 references.
|
||||
RageTextureManager: 'themes\default\graphics\title menu background (no alpha).png' will be deleted. It has 0 references.
|
||||
FontManager: 'themes\default\fonts\normal.font' will not be deleted. It still has 5 references.
|
||||
FontManager: 'themes\default\fonts\normal.font' will not be deleted. It still has 4 references.
|
||||
FontManager: 'themes\default\fonts\normal.font' will not be deleted. It still has 3 references.
|
||||
FontManager: 'themes\default\fonts\normal.font' will not be deleted. It still has 2 references.
|
||||
FontManager: 'themes\default\fonts\normal.font' will not be deleted. It still has 1 references.
|
||||
FontManager: 'themes\default\fonts\normal.font' will be deleted. It has 0 references.
|
||||
RageTextureManager: 'themes\default\fonts\normal 16x16.png' will be deleted. It has 0 references.
|
||||
WARNING: Didn't find an empty system messages slot.
|
||||
WARNING: Didn't find an empty system messages slot.
|
||||
Sprite::LoadFromTexture(Themes\default\Graphics\results banner frame.png)
|
||||
RageBitmapTexture: Loaded 'themes\default\graphics\results banner frame.png' (256x128) from disk. bScaleImageToTextureSize = 0, source 256,100; image 256,100.
|
||||
RageTextureManager: Finished loading 'themes\default\graphics\results banner frame.png' - 1236440 references.
|
||||
|
||||
@@ -0,0 +1,587 @@
|
||||
<?xml version="1.0" encoding = "Windows-1252"?>
|
||||
<VisualStudioProject
|
||||
ProjectType="Visual C++"
|
||||
Version="7.00"
|
||||
Name="ZipArchive"
|
||||
SccProjectName="ZipArchive"
|
||||
SccLocalPath="."
|
||||
Keyword="MFCProj">
|
||||
<Platforms>
|
||||
<Platform
|
||||
Name="Win32"/>
|
||||
</Platforms>
|
||||
<Configurations>
|
||||
<Configuration
|
||||
Name="Unicode Static Release|Win32"
|
||||
OutputDirectory=".\Unicode_Static_Release"
|
||||
IntermediateDirectory=".\Unicode_Static_Release"
|
||||
ConfigurationType="4"
|
||||
UseOfMFC="1"
|
||||
ATLMinimizesCRunTimeLibraryUsage="FALSE"
|
||||
CharacterSet="1">
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
InlineFunctionExpansion="1"
|
||||
PreprocessorDefinitions="NDEBUG,WIN32,_WINDOWS,ZLIB_DLL,ZIP_ARCHIVE_MFC_PROJ"
|
||||
StringPooling="TRUE"
|
||||
RuntimeLibrary="0"
|
||||
EnableFunctionLevelLinking="TRUE"
|
||||
UsePrecompiledHeader="2"
|
||||
PrecompiledHeaderThrough="stdafx.h"
|
||||
PrecompiledHeaderFile=".\Unicode_Static_Release/ZipArchive.pch"
|
||||
AssemblerListingLocation=".\Unicode_Static_Release/"
|
||||
ObjectFile=".\Unicode_Static_Release/"
|
||||
ProgramDataBaseFileName=".\Unicode_Static_Release/"
|
||||
WarningLevel="3"
|
||||
SuppressStartupBanner="TRUE"/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"/>
|
||||
<Tool
|
||||
Name="VCLibrarianTool"
|
||||
OutputFile=".\Unicode_Static_Release\ZipArchive.lib"
|
||||
SuppressStartupBanner="TRUE"/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"/>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"
|
||||
PreprocessorDefinitions="NDEBUG"
|
||||
Culture="1033"/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"/>
|
||||
</Configuration>
|
||||
<Configuration
|
||||
Name="Static Debug|Win32"
|
||||
OutputDirectory=".\Static_Debug"
|
||||
IntermediateDirectory=".\Static_Debug"
|
||||
ConfigurationType="4"
|
||||
UseOfMFC="1"
|
||||
ATLMinimizesCRunTimeLibraryUsage="FALSE"
|
||||
CharacterSet="2">
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
PreprocessorDefinitions="_DEBUG,WIN32,_WINDOWS,ZLIB_DLL,ZIP_ARCHIVE_MFC_PROJ,NDEBUG"
|
||||
BasicRuntimeChecks="3"
|
||||
RuntimeLibrary="1"
|
||||
UsePrecompiledHeader="2"
|
||||
PrecompiledHeaderThrough="stdafx.h"
|
||||
PrecompiledHeaderFile=".\Static_Debug/ZipArchive.pch"
|
||||
AssemblerListingLocation=".\Static_Debug/"
|
||||
ObjectFile=".\Static_Debug/"
|
||||
ProgramDataBaseFileName=".\Static_Debug/"
|
||||
BrowseInformation="1"
|
||||
WarningLevel="4"
|
||||
SuppressStartupBanner="TRUE"
|
||||
DebugInformationFormat="4"/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"/>
|
||||
<Tool
|
||||
Name="VCLibrarianTool"
|
||||
OutputFile=".\Static_Debug\ZipArchive.lib"
|
||||
SuppressStartupBanner="TRUE"/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"/>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"
|
||||
PreprocessorDefinitions="_DEBUG"
|
||||
Culture="1033"/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"/>
|
||||
</Configuration>
|
||||
<Configuration
|
||||
Name="Unicode Release|Win32"
|
||||
OutputDirectory=".\Unicode_Release"
|
||||
IntermediateDirectory=".\Unicode_Release"
|
||||
ConfigurationType="4"
|
||||
UseOfMFC="2"
|
||||
ATLMinimizesCRunTimeLibraryUsage="FALSE"
|
||||
CharacterSet="1">
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
InlineFunctionExpansion="1"
|
||||
PreprocessorDefinitions="NDEBUG;WIN32;_WINDOWS;ZLIB_DLL;ZIP_ARCHIVE_MFC_PROJ"
|
||||
StringPooling="TRUE"
|
||||
RuntimeLibrary="2"
|
||||
EnableFunctionLevelLinking="TRUE"
|
||||
UsePrecompiledHeader="2"
|
||||
PrecompiledHeaderThrough="stdafx.h"
|
||||
PrecompiledHeaderFile=".\Unicode_Release/ZipArchive.pch"
|
||||
AssemblerListingLocation=".\Unicode_Release/"
|
||||
ObjectFile=".\Unicode_Release/"
|
||||
ProgramDataBaseFileName=".\Unicode_Release/"
|
||||
WarningLevel="4"
|
||||
SuppressStartupBanner="TRUE"/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"/>
|
||||
<Tool
|
||||
Name="VCLibrarianTool"
|
||||
OutputFile=".\Unicode_Release\ZipArchive.lib"
|
||||
SuppressStartupBanner="TRUE"/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"/>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"
|
||||
PreprocessorDefinitions="_AFXDLL;NDEBUG"
|
||||
Culture="1033"/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"/>
|
||||
</Configuration>
|
||||
<Configuration
|
||||
Name="Unicode Debug|Win32"
|
||||
OutputDirectory=".\Unicode_Debug"
|
||||
IntermediateDirectory=".\Unicode_Debug"
|
||||
ConfigurationType="4"
|
||||
UseOfMFC="2"
|
||||
ATLMinimizesCRunTimeLibraryUsage="FALSE"
|
||||
CharacterSet="1">
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
PreprocessorDefinitions="_DEBUG;WIN32;_WINDOWS;ZLIB_DLL;ZIP_ARCHIVE_MFC_PROJ"
|
||||
BasicRuntimeChecks="3"
|
||||
RuntimeLibrary="3"
|
||||
UsePrecompiledHeader="2"
|
||||
PrecompiledHeaderThrough="stdafx.h"
|
||||
PrecompiledHeaderFile=".\Unicode_Debug/ZipArchive.pch"
|
||||
AssemblerListingLocation=".\Unicode_Debug/"
|
||||
ObjectFile=".\Unicode_Debug/"
|
||||
ProgramDataBaseFileName=".\Unicode_Debug/"
|
||||
BrowseInformation="1"
|
||||
WarningLevel="4"
|
||||
SuppressStartupBanner="TRUE"
|
||||
DebugInformationFormat="4"/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"/>
|
||||
<Tool
|
||||
Name="VCLibrarianTool"
|
||||
OutputFile=".\Unicode_Debug\ZipArchive.lib"
|
||||
SuppressStartupBanner="TRUE"/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"/>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"
|
||||
PreprocessorDefinitions="_AFXDLL;_DEBUG"
|
||||
Culture="1033"/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"/>
|
||||
</Configuration>
|
||||
<Configuration
|
||||
Name="Debug|Win32"
|
||||
OutputDirectory=".\Debug"
|
||||
IntermediateDirectory=".\Debug"
|
||||
ConfigurationType="4"
|
||||
UseOfMFC="2"
|
||||
ATLMinimizesCRunTimeLibraryUsage="FALSE"
|
||||
CharacterSet="2">
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
PreprocessorDefinitions="_DEBUG;WIN32;_WINDOWS;ZLIB_DLL;ZIP_ARCHIVE_MFC_PROJ"
|
||||
BasicRuntimeChecks="3"
|
||||
RuntimeLibrary="3"
|
||||
UsePrecompiledHeader="2"
|
||||
PrecompiledHeaderThrough="stdafx.h"
|
||||
PrecompiledHeaderFile=".\Debug/ZipArchive.pch"
|
||||
AssemblerListingLocation=".\Debug/"
|
||||
ObjectFile=".\Debug/"
|
||||
ProgramDataBaseFileName=".\Debug/"
|
||||
BrowseInformation="1"
|
||||
WarningLevel="3"
|
||||
SuppressStartupBanner="TRUE"
|
||||
DebugInformationFormat="4"/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"/>
|
||||
<Tool
|
||||
Name="VCLibrarianTool"
|
||||
OutputFile=".\Debug\ZipArchive.lib"
|
||||
SuppressStartupBanner="TRUE"/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"/>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"
|
||||
PreprocessorDefinitions="_AFXDLL;_DEBUG"
|
||||
Culture="1033"/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"/>
|
||||
</Configuration>
|
||||
<Configuration
|
||||
Name="Static Release|Win32"
|
||||
OutputDirectory=".\Static_Release"
|
||||
IntermediateDirectory=".\Static_Release"
|
||||
ConfigurationType="4"
|
||||
UseOfMFC="1"
|
||||
ATLMinimizesCRunTimeLibraryUsage="FALSE"
|
||||
CharacterSet="2">
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
InlineFunctionExpansion="1"
|
||||
PreprocessorDefinitions="NDEBUG,WIN32,_WINDOWS,ZLIB_DLL,ZIP_ARCHIVE_MFC_PROJ"
|
||||
StringPooling="TRUE"
|
||||
RuntimeLibrary="0"
|
||||
EnableFunctionLevelLinking="TRUE"
|
||||
UsePrecompiledHeader="2"
|
||||
PrecompiledHeaderThrough="stdafx.h"
|
||||
PrecompiledHeaderFile=".\Static_Release/ZipArchive.pch"
|
||||
AssemblerListingLocation=".\Static_Release/"
|
||||
ObjectFile=".\Static_Release/"
|
||||
ProgramDataBaseFileName=".\Static_Release/"
|
||||
WarningLevel="3"
|
||||
SuppressStartupBanner="TRUE"/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"/>
|
||||
<Tool
|
||||
Name="VCLibrarianTool"
|
||||
OutputFile=".\Static_Release\ZipArchive.lib"
|
||||
SuppressStartupBanner="TRUE"/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"/>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"
|
||||
PreprocessorDefinitions="NDEBUG"
|
||||
Culture="1033"/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"/>
|
||||
</Configuration>
|
||||
<Configuration
|
||||
Name="Release|Win32"
|
||||
OutputDirectory=".\Release"
|
||||
IntermediateDirectory=".\Release"
|
||||
ConfigurationType="4"
|
||||
UseOfMFC="2"
|
||||
ATLMinimizesCRunTimeLibraryUsage="FALSE"
|
||||
CharacterSet="2">
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
InlineFunctionExpansion="1"
|
||||
PreprocessorDefinitions="NDEBUG;WIN32;_WINDOWS;ZLIB_DLL;ZIP_ARCHIVE_MFC_PROJ"
|
||||
StringPooling="TRUE"
|
||||
RuntimeLibrary="2"
|
||||
EnableFunctionLevelLinking="TRUE"
|
||||
UsePrecompiledHeader="2"
|
||||
PrecompiledHeaderThrough="stdafx.h"
|
||||
PrecompiledHeaderFile=".\Release/ZipArchive.pch"
|
||||
AssemblerListingLocation=".\Release/"
|
||||
ObjectFile=".\Release/"
|
||||
ProgramDataBaseFileName=".\Release/"
|
||||
WarningLevel="3"
|
||||
SuppressStartupBanner="TRUE"/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"/>
|
||||
<Tool
|
||||
Name="VCLibrarianTool"
|
||||
OutputFile=".\Release\ZipArchive.lib"
|
||||
SuppressStartupBanner="TRUE"/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"/>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"
|
||||
PreprocessorDefinitions="_AFXDLL;NDEBUG"
|
||||
Culture="1033"/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"/>
|
||||
</Configuration>
|
||||
</Configurations>
|
||||
<Files>
|
||||
<Filter
|
||||
Name="Source Files"
|
||||
Filter="cpp;c;cxx;rc;def;r;odl;idl;hpj;bat">
|
||||
<File
|
||||
RelativePath=".\ZipArchive.cpp">
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\ZipAutoBuffer.cpp">
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\ZipCentralDir.cpp">
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\ZipCompatibility.cpp">
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\ZipException.cpp">
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\ZipFile.cpp">
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\ZipFileHeader.cpp">
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\ZipInternalInfo.cpp">
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\ZipMemFile.cpp">
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\ZipPathComponent.cpp">
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\ZipPlatform.cpp">
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\ZipPlatformComm.cpp">
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\ZipStorage.cpp">
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\ZipString.cpp">
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\stdafx.cpp">
|
||||
<FileConfiguration
|
||||
Name="Unicode Static Release|Win32">
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
UsePrecompiledHeader="1"/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="Static Debug|Win32">
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
UsePrecompiledHeader="1"/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="Unicode Release|Win32">
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
UsePrecompiledHeader="1"/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="Unicode Debug|Win32">
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
UsePrecompiledHeader="1"/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="Debug|Win32">
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
UsePrecompiledHeader="1"/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="Static Release|Win32">
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
UsePrecompiledHeader="1"/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="Release|Win32">
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
UsePrecompiledHeader="1"/>
|
||||
</FileConfiguration>
|
||||
</File>
|
||||
<Filter
|
||||
Name="zlib_c"
|
||||
Filter="">
|
||||
<File
|
||||
RelativePath=".\zlib\adler32.c">
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\zlib\compress.c">
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\zlib\crc32.c">
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\zlib\deflate.c">
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\zlib\gvmat32c.c">
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\zlib\infblock.c">
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\zlib\infcodes.c">
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\zlib\inffast.c">
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\zlib\inflate.c">
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\zlib\inftrees.c">
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\zlib\infutil.c">
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\zlib\maketree.c">
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\zlib\trees.c">
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\zlib\uncompr.c">
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\zlib\zutil.c">
|
||||
</File>
|
||||
</Filter>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="Header Files"
|
||||
Filter="h;hpp;hxx;hm;inl">
|
||||
<File
|
||||
RelativePath=".\ZipAbstractFile.h">
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\ZipArchive.h">
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\ZipAutoBuffer.h">
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\ZipBaseException.h">
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\ZipCentralDir.h">
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\ZipCollections.h">
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\ZipCompatibility.h">
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\ZipException.h">
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\ZipFile.h">
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\ZipFileHeader.h">
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\ZipFileMapping.h">
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\ZipInternalInfo.h">
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\ZipMemFile.h">
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\ZipPathComponent.h">
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\ZipPlatform.h">
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\ZipStorage.h">
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\ZipString.h">
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\stdafx.h">
|
||||
</File>
|
||||
<Filter
|
||||
Name="zlib_h"
|
||||
Filter="">
|
||||
<File
|
||||
RelativePath=".\zlib\deflate.h">
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\zlib\infblock.h">
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\zlib\infcodes.h">
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\zlib\inffast.h">
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\zlib\inffixed.h">
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\zlib\inftrees.h">
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\zlib\infutil.h">
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\zlib\trees.h">
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\zlib\zconf.h">
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\zlib\zlib.h">
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\zlib\zutil.h">
|
||||
</File>
|
||||
</Filter>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="Information"
|
||||
Filter="txt">
|
||||
<File
|
||||
RelativePath=".\Appnote.txt">
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\ChangeLog.txt">
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\License.txt">
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\Readme.txt">
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\faq.txt">
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\gpl.txt">
|
||||
</File>
|
||||
</Filter>
|
||||
</Files>
|
||||
<Globals>
|
||||
</Globals>
|
||||
</VisualStudioProject>
|
||||
+3
-20
@@ -14,7 +14,7 @@
|
||||
|
||||
#include "NoteMetadata.h"
|
||||
|
||||
#include "GameTypes.h"
|
||||
#include "GameConstantsAndTypes.h"
|
||||
#include "RageUtil.h"
|
||||
//enum DanceStyle; // why is this needed?
|
||||
|
||||
@@ -72,25 +72,8 @@ public:
|
||||
|
||||
CString GetMainTitle() {return m_sMainTitle; };
|
||||
CString GetSubTitle() {return m_sSubTitle; };
|
||||
void GetMainAndSubTitlesFromFullTitle( CString sFullTitle, CString &sMainTitleOut, CString &sSubTitleOut )
|
||||
{
|
||||
char szSeps[] = { '-', '~' };
|
||||
for( int i=0; i<sizeof(szSeps); i++ )
|
||||
{
|
||||
const char c = szSeps[i];
|
||||
int iBeginIndex = sFullTitle.Find( c );
|
||||
if( iBeginIndex == -1 )
|
||||
continue;
|
||||
int iEndIndex = sFullTitle.Find( c, iBeginIndex+1 );
|
||||
if( iEndIndex == -1 )
|
||||
continue;
|
||||
sMainTitleOut = sFullTitle.Left( iBeginIndex-1 );
|
||||
sSubTitleOut = sFullTitle.Mid( iBeginIndex, iEndIndex-iBeginIndex+1 );
|
||||
return;
|
||||
}
|
||||
sMainTitleOut = sFullTitle;
|
||||
sSubTitleOut = "";
|
||||
};
|
||||
CString GetFullTitle() {return m_sMainTitle + " " + m_sSubTitle; };
|
||||
void GetMainAndSubTitlesFromFullTitle( CString sFullTitle, CString &sMainTitleOut, CString &sSubTitleOut );
|
||||
|
||||
CString GetArtist() {return m_sArtist; };
|
||||
CString GetCredit() {return m_sCredit; };
|
||||
|
||||
Reference in New Issue
Block a user