Commit 0037b3a2 authored by Gildas Bazin's avatar Gildas Bazin

* modules/gui/skins2/*: a couple of msvc build fixes. Patch courtesy of Brian...

* modules/gui/skins2/*: a couple of msvc build fixes. Patch courtesy of Brian Robb (vascy at hotmail).
parent eacdb0f5
...@@ -30,6 +30,8 @@ BitmapFont::BitmapFont( intf_thread_t *pIntf, const GenericBitmap &rBitmap, ...@@ -30,6 +30,8 @@ BitmapFont::BitmapFont( intf_thread_t *pIntf, const GenericBitmap &rBitmap,
const string &rType ): const string &rType ):
GenericFont( pIntf ), m_rBitmap( rBitmap ) GenericFont( pIntf ), m_rBitmap( rBitmap )
{ {
int i;
// Build the character table // Build the character table
if( rType == "digits" ) if( rType == "digits" )
{ {
...@@ -37,7 +39,7 @@ BitmapFont::BitmapFont( intf_thread_t *pIntf, const GenericBitmap &rBitmap, ...@@ -37,7 +39,7 @@ BitmapFont::BitmapFont( intf_thread_t *pIntf, const GenericBitmap &rBitmap,
m_height = 13; m_height = 13;
m_advance = 12; m_advance = 12;
m_skip = 6; m_skip = 6;
for( int i = 0; i <= 9; i++ ) for( i = 0; i <= 9; i++ )
{ {
m_table['0'+i].m_xPos = i * m_width; m_table['0'+i].m_xPos = i * m_width;
} }
...@@ -49,14 +51,14 @@ BitmapFont::BitmapFont( intf_thread_t *pIntf, const GenericBitmap &rBitmap, ...@@ -49,14 +51,14 @@ BitmapFont::BitmapFont( intf_thread_t *pIntf, const GenericBitmap &rBitmap,
m_height = 6; m_height = 6;
m_advance = 5; m_advance = 5;
m_skip = 5; m_skip = 5;
for( int i = 0; i < 26; i++ ) for( i = 0; i < 26; i++ )
{ {
m_table['A'+i].m_xPos = m_table['a'+i].m_xPos = i * m_width; m_table['A'+i].m_xPos = m_table['a'+i].m_xPos = i * m_width;
} }
m_table[(size_t)'"'].m_xPos = 26 * m_width; m_table[(size_t)'"'].m_xPos = 26 * m_width;
m_table[(size_t)'@'].m_xPos = 27 * m_width; m_table[(size_t)'@'].m_xPos = 27 * m_width;
m_table[(size_t)' '].m_xPos = 29 * m_width; m_table[(size_t)' '].m_xPos = 29 * m_width;
for( int i = 0; i <= 9; i++ ) for( i = 0; i <= 9; i++ )
{ {
m_table['0'+i].m_xPos = i * m_width; m_table['0'+i].m_xPos = i * m_width;
m_table['0'+i].m_yPos = m_height; m_table['0'+i].m_yPos = m_height;
...@@ -64,7 +66,7 @@ BitmapFont::BitmapFont( intf_thread_t *pIntf, const GenericBitmap &rBitmap, ...@@ -64,7 +66,7 @@ BitmapFont::BitmapFont( intf_thread_t *pIntf, const GenericBitmap &rBitmap,
static const char specialChars[] = {'.', ':', '(', ')', '-', '\'', static const char specialChars[] = {'.', ':', '(', ')', '-', '\'',
'!', '_', '+', '\\', '/', '[', ']', '^', '&', '%', ',', '=', '$', '!', '_', '+', '\\', '/', '[', ']', '^', '&', '%', ',', '=', '$',
'#'}; '#'};
for( int i = 0; i < 19; i++ ) for( i = 0; i < 19; i++ )
{ {
m_table[(size_t)specialChars[i]].m_xPos = (11 + i) * m_width; m_table[(size_t)specialChars[i]].m_xPos = (11 + i) * m_width;
m_table[(size_t)specialChars[i]].m_yPos = m_height; m_table[(size_t)specialChars[i]].m_yPos = m_height;
......
...@@ -47,8 +47,10 @@ class ThemeRepository; ...@@ -47,8 +47,10 @@ class ThemeRepository;
#endif #endif
#ifdef _MSC_VER #ifdef _MSC_VER
// turn off 'warning C4355: 'this' : used in base member initializer list' // turn off 'warning C4355: 'this' : used in base member initializer list'
#pragma warning ( disable:4355 ) #pragma warning ( disable:4355 )
// turn off 'identifier was truncated to '255' characters in the debug info'
#pragma warning ( disable:4786 )
#endif #endif
// Useful macros // Useful macros
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment