Fixed extended ASCII support in BitmapText
This commit is contained in:
@@ -5,8 +5,6 @@ Fix
|
|||||||
on Ez2, the Ranking doesn't save (AAA, AA, A, B e.t.c.)
|
on Ez2, the Ranking doesn't save (AAA, AA, A, B e.t.c.)
|
||||||
but the score does, any ideas why?
|
but the score does, any ideas why?
|
||||||
|
|
||||||
timing window in INI
|
|
||||||
|
|
||||||
if you do an entire song in it. and save it'll crash
|
if you do an entire song in it. and save it'll crash
|
||||||
|
|
||||||
re-add texture hints
|
re-add texture hints
|
||||||
@@ -15,18 +13,10 @@ refresh rates screwed up
|
|||||||
|
|
||||||
pump life meter
|
pump life meter
|
||||||
|
|
||||||
Don't unload textures after loading them once
|
|
||||||
|
|
||||||
|
|
||||||
SMANIAC difficulty BLUE DUDE! DO IT!
|
SMANIAC difficulty BLUE DUDE! DO IT!
|
||||||
yes because basically these days, Oni challenge modes are defined as smaniac
|
yes because basically these days, Oni challenge modes are defined as smaniac
|
||||||
Spig301: so really, challenge = smaniac
|
Spig301: so really, challenge = smaniac
|
||||||
|
|
||||||
|
|
||||||
the CDTitles DWI style arent being read anymore.
|
|
||||||
|
|
||||||
faster IniFile (with std::map?)
|
|
||||||
|
|
||||||
fix movie texture crash
|
fix movie texture crash
|
||||||
|
|
||||||
The "groove bar" reports at the results screen is broken.
|
The "groove bar" reports at the results screen is broken.
|
||||||
|
|||||||
@@ -114,6 +114,9 @@ void BitmapText::SetText( CString sText )
|
|||||||
strncpy( m_szText, sText, MAX_TEXT_CHARS );
|
strncpy( m_szText, sText, MAX_TEXT_CHARS );
|
||||||
m_szText[MAX_TEXT_CHARS-1] = '\0';
|
m_szText[MAX_TEXT_CHARS-1] = '\0';
|
||||||
|
|
||||||
|
/*
|
||||||
|
Do NOT stop out all extended ASCII chars. Why was this here? -Chris
|
||||||
|
|
||||||
int iLength = strlen( m_szText );
|
int iLength = strlen( m_szText );
|
||||||
|
|
||||||
//
|
//
|
||||||
@@ -124,7 +127,7 @@ void BitmapText::SetText( CString sText )
|
|||||||
if( m_szText[i] < 0 || m_szText[i] > MAX_FONT_CHARS-1 )
|
if( m_szText[i] < 0 || m_szText[i] > MAX_FONT_CHARS-1 )
|
||||||
m_szText[i] = ' ';
|
m_szText[i] = ' ';
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
//
|
//
|
||||||
// break the string into lines
|
// break the string into lines
|
||||||
//
|
//
|
||||||
@@ -224,7 +227,7 @@ void BitmapText::DrawPrimitives()
|
|||||||
for( int j=0; j<iLineLength; j++ ) // for each character in the line
|
for( int j=0; j<iLineLength; j++ ) // for each character in the line
|
||||||
{
|
{
|
||||||
const char c = szLine[j];
|
const char c = szLine[j];
|
||||||
const int iFrameNo = m_pFont->m_iCharToFrameNo[c];
|
const int iFrameNo = m_pFont->m_iCharToFrameNo[ (unsigned char)c ];
|
||||||
if( iFrameNo == -1 ) // this font doesn't impelemnt this character
|
if( iFrameNo == -1 ) // this font doesn't impelemnt this character
|
||||||
throw RageException( "The font '%s' does not implement the character '%c'", m_sFontFilePath, c );
|
throw RageException( "The font '%s' does not implement the character '%c'", m_sFontFilePath, c );
|
||||||
const int iCharWidth = m_pFont->m_iFrameNoToWidth[iFrameNo];
|
const int iCharWidth = m_pFont->m_iFrameNoToWidth[iFrameNo];
|
||||||
|
|||||||
@@ -45,8 +45,8 @@ protected:
|
|||||||
Font* m_pFont;
|
Font* m_pFont;
|
||||||
|
|
||||||
// recalculate the items below on SetText()
|
// recalculate the items below on SetText()
|
||||||
TCHAR m_szText[MAX_TEXT_CHARS];
|
char m_szText[MAX_TEXT_CHARS];
|
||||||
TCHAR* m_szTextLines[MAX_TEXT_LINES]; // pointers into m_szText
|
char* m_szTextLines[MAX_TEXT_LINES]; // pointers into m_szText
|
||||||
int m_iLineLengths[MAX_TEXT_LINES]; // in characters
|
int m_iLineLengths[MAX_TEXT_LINES]; // in characters
|
||||||
int m_iNumLines;
|
int m_iNumLines;
|
||||||
int m_iLineWidths[MAX_TEXT_LINES]; // in source pixels
|
int m_iLineWidths[MAX_TEXT_LINES]; // in source pixels
|
||||||
|
|||||||
@@ -157,7 +157,7 @@ int Font::GetLineWidthInSourcePixels( const char *szLine, int iLength )
|
|||||||
for( int i=0; i<iLength; i++ )
|
for( int i=0; i<iLength; i++ )
|
||||||
{
|
{
|
||||||
const char c = szLine[i];
|
const char c = szLine[i];
|
||||||
const int iFrameNo = m_iCharToFrameNo[c];
|
const int iFrameNo = m_iCharToFrameNo[ (unsigned char)c ];
|
||||||
if( iFrameNo == -1 ) // this font doesn't impelemnt this character
|
if( iFrameNo == -1 ) // this font doesn't impelemnt this character
|
||||||
throw RageException( "The font '%s' does not implement the character '%c'", m_sTexturePath, c );
|
throw RageException( "The font '%s' does not implement the character '%c'", m_sTexturePath, c );
|
||||||
|
|
||||||
|
|||||||
@@ -26,7 +26,7 @@ ScoreDisplayOni::ScoreDisplayOni()
|
|||||||
LOG->Trace( "ScoreDisplayOni::ScoreDisplayOni()" );
|
LOG->Trace( "ScoreDisplayOni::ScoreDisplayOni()" );
|
||||||
|
|
||||||
// init the text
|
// init the text
|
||||||
BitmapText::LoadFromTextureAndChars( THEME->GetPathTo("Graphics","gameplay score numbers"), "01234 :56789%." );
|
BitmapText::LoadFromNumbers( THEME->GetPathTo("Numbers","gameplay score numbers") );
|
||||||
TurnShadowOff();
|
TurnShadowOff();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -25,26 +25,8 @@ ScreenManager* SCREENMAN = NULL; // global and accessable from anywhere in our p
|
|||||||
|
|
||||||
#define STATS_X THEME->GetMetricF("ScreenManager","StatsX")
|
#define STATS_X THEME->GetMetricF("ScreenManager","StatsX")
|
||||||
#define STATS_Y THEME->GetMetricF("ScreenManager","StatsY")
|
#define STATS_Y THEME->GetMetricF("ScreenManager","StatsY")
|
||||||
#define CREDITS_P1_X THEME->GetMetricF("ScreenManager","CreditsP1X")
|
#define CREDITS_X( p ) THEME->GetMetricF("ScreenManager",ssprintf("CreditsP%dX",p+1))
|
||||||
#define CREDITS_P1_Y THEME->GetMetricF("ScreenManager","CreditsP1Y")
|
#define CREDITS_Y( p ) THEME->GetMetricF("ScreenManager",ssprintf("CreditsP%dY",p+1))
|
||||||
#define CREDITS_P2_X THEME->GetMetricF("ScreenManager","CreditsP2X")
|
|
||||||
#define CREDITS_P2_Y THEME->GetMetricF("ScreenManager","CreditsP2Y")
|
|
||||||
|
|
||||||
float CREDITS_X( int p ) {
|
|
||||||
switch( p ) {
|
|
||||||
case PLAYER_1: return CREDITS_P1_X;
|
|
||||||
case PLAYER_2: return CREDITS_P2_X;
|
|
||||||
default: ASSERT(0); return 0;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
float CREDITS_Y( int p ) {
|
|
||||||
switch( p ) {
|
|
||||||
case PLAYER_1: return CREDITS_P1_Y;
|
|
||||||
case PLAYER_2: return CREDITS_P2_Y;
|
|
||||||
default: ASSERT(0); return 0;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
ScreenManager::ScreenManager()
|
ScreenManager::ScreenManager()
|
||||||
|
|||||||
Reference in New Issue
Block a user