mirror of
https://github.com/blupi-games/planetblupi
synced 2024-12-30 10:15:36 +01:00
Fix all warnings
This commit is contained in:
parent
edcd2c36cb
commit
14428f6d49
@ -30,6 +30,7 @@ CButton::CButton()
|
||||
m_bMouseDown = false;
|
||||
m_bMinimizeRedraw = false;
|
||||
m_bRedraw = false;
|
||||
m_message = static_cast<unsigned int> (-1);
|
||||
}
|
||||
|
||||
// Destructeur.
|
||||
@ -428,7 +429,7 @@ bool CButton::MouseUp(POINT pos)
|
||||
|
||||
if ( !bDetect ) return false;
|
||||
|
||||
if ( m_message != -1 )
|
||||
if ( m_message != static_cast<unsigned int> (-1) )
|
||||
{
|
||||
CEvent::PushUserEvent (m_message);
|
||||
}
|
||||
|
@ -33,10 +33,6 @@
|
||||
// Bitmap de la carte.
|
||||
|
||||
static Uint32 g_map32_bits[DIMMAPY][DIMMAPX];
|
||||
static bool g_bPalette;
|
||||
|
||||
|
||||
|
||||
|
||||
// Initialise les couleurs pour la carte.
|
||||
|
||||
|
@ -3013,7 +3013,6 @@ void CDecor::CelHiliRepeat(int list)
|
||||
const char *CDecor::GetResHili(POINT posMouse)
|
||||
{
|
||||
int icon;
|
||||
const char *res = nullptr;
|
||||
|
||||
// Les valeurs `corner == true` correspondent aux objets placés
|
||||
// au coin inf/droit de la cellule.
|
||||
|
23
src/def.h
23
src/def.h
@ -79,17 +79,18 @@
|
||||
#define DIRECT_N (6*16) // nord
|
||||
#define DIRECT_NE (7*16) // nord-est
|
||||
|
||||
// NO
|
||||
// O | N
|
||||
// \ | /
|
||||
// \ | /
|
||||
// \|/
|
||||
// SO -------o------- NE
|
||||
// /|\
|
||||
// / | \
|
||||
// / | \
|
||||
// S | E
|
||||
// (y) SE (x)
|
||||
/* NO
|
||||
* O | N
|
||||
* \ | /
|
||||
* \ | /
|
||||
* \|/
|
||||
* SO -------o------- NE
|
||||
* /|\
|
||||
* / | \
|
||||
* / | \
|
||||
* S | E
|
||||
* (y) SE (x)
|
||||
*/
|
||||
|
||||
|
||||
// Actions :
|
||||
|
@ -152,7 +152,7 @@ protected:
|
||||
int m_mission;
|
||||
int m_private;
|
||||
int m_maxMission;
|
||||
int m_phase;
|
||||
unsigned int m_phase;
|
||||
int m_index;
|
||||
bool m_bSchool;
|
||||
bool m_bPrivate;
|
||||
|
@ -215,8 +215,6 @@ void CMenu::Draw()
|
||||
int i, state, icon;
|
||||
POINT pos;
|
||||
RECT oldClip, clipRect;
|
||||
bool bLeft = true;
|
||||
bool bRight = true;
|
||||
char text[50];
|
||||
char* pText;
|
||||
|
||||
@ -229,9 +227,6 @@ void CMenu::Draw()
|
||||
clipRect.bottom = POSDRAWY+DIMDRAWY;
|
||||
m_pPixmap->SetClipping(clipRect);
|
||||
|
||||
if ( m_pos.x-150 < POSDRAWX ) bLeft = false;
|
||||
if ( m_pos.x+m_dim.x+150 > POSDRAWX+DIMDRAWX ) bRight = false;
|
||||
|
||||
for ( i=0 ; i<m_nbButtons ; i++ )
|
||||
{
|
||||
pos.x = m_pos.x+((i/m_nbCel.y)*(DIMBUTTONX+MARGMENU));
|
||||
|
@ -268,8 +268,8 @@ bool CPixmap::Cache(int channel, SDL_Surface *surface, POINT totalDim)
|
||||
|
||||
m_lpSDLTexture[channel] = SDL_CreateTextureFromSurface (g_renderer, surface);
|
||||
|
||||
if (m_lpSDLTexture[channel] == nullptr )
|
||||
return false;
|
||||
if (!m_lpSDLTexture[channel])
|
||||
return false;
|
||||
|
||||
m_totalDim[channel] = totalDim;
|
||||
m_iconDim[channel] = totalDim;
|
||||
@ -334,7 +334,6 @@ bool CPixmap::DrawIcon(int chDst, int channel, int rank, POINT pos, bool bMask)
|
||||
{
|
||||
int nbx, nby;
|
||||
RECT rect;
|
||||
COLORREF oldColor1, oldColor2;
|
||||
|
||||
if ( channel < 0 || channel >= MAXIMAGE ) return false;
|
||||
if ( channel != CHMAP && m_lpSDLTexture[channel] == nullptr ) return false;
|
||||
@ -352,9 +351,6 @@ bool CPixmap::DrawIcon(int chDst, int channel, int rank, POINT pos, bool bMask)
|
||||
rect.right = rect.left + m_iconDim[channel].x;
|
||||
rect.bottom = rect.top + m_iconDim[channel].y;
|
||||
|
||||
oldColor1 = m_colorSurface[2*channel+0];
|
||||
oldColor2 = m_colorSurface[2*channel+1];
|
||||
|
||||
return !BltFast (chDst, channel, pos, rect);
|
||||
}
|
||||
|
||||
@ -372,7 +368,6 @@ bool CPixmap::DrawIconDemi(int chDst, int channel, int rank, POINT pos, bool bMa
|
||||
{
|
||||
int nbx, nby;
|
||||
RECT rect;
|
||||
COLORREF oldColor1, oldColor2;
|
||||
|
||||
if ( channel < 0 || channel >= MAXIMAGE ) return false;
|
||||
if (m_lpSDLTexture[channel] == nullptr ) return false;
|
||||
@ -392,9 +387,6 @@ bool CPixmap::DrawIconDemi(int chDst, int channel, int rank, POINT pos, bool bMa
|
||||
rect.right = rect.left + m_iconDim[channel].x;
|
||||
rect.bottom = rect.top +(m_iconDim[channel].y/2);
|
||||
|
||||
oldColor1 = m_colorSurface[2*channel+0];
|
||||
oldColor2 = m_colorSurface[2*channel+1];
|
||||
|
||||
return !BltFast (chDst, channel, pos, rect);
|
||||
}
|
||||
|
||||
@ -405,7 +397,6 @@ bool CPixmap::DrawIconPart(int chDst, int channel, int rank, POINT pos,
|
||||
{
|
||||
int nbx, nby;
|
||||
RECT rect;
|
||||
COLORREF oldColor1, oldColor2;
|
||||
|
||||
if ( channel < 0 || channel >= MAXIMAGE ) return false;
|
||||
if (m_lpSDLTexture[channel] == nullptr ) return false;
|
||||
@ -426,9 +417,6 @@ bool CPixmap::DrawIconPart(int chDst, int channel, int rank, POINT pos,
|
||||
pos.y += startY;
|
||||
rect.top += startY;
|
||||
|
||||
oldColor1 = m_colorSurface[2*channel+0];
|
||||
oldColor2 = m_colorSurface[2*channel+1];
|
||||
|
||||
return !BltFast (chDst, channel, pos, rect);
|
||||
}
|
||||
|
||||
@ -436,14 +424,9 @@ bool CPixmap::DrawIconPart(int chDst, int channel, int rank, POINT pos,
|
||||
|
||||
bool CPixmap::DrawPart(int chDst, int channel, POINT dest, RECT rect, bool bMask)
|
||||
{
|
||||
COLORREF oldColor1, oldColor2;
|
||||
|
||||
if ( channel < 0 || channel >= MAXIMAGE ) return false;
|
||||
if (m_lpSDLTexture[channel] == nullptr ) return false;
|
||||
|
||||
oldColor1 = m_colorSurface[2*channel+0];
|
||||
oldColor2 = m_colorSurface[2*channel+1];
|
||||
|
||||
return !BltFast (chDst, channel, dest, rect);
|
||||
}
|
||||
|
||||
@ -529,15 +512,7 @@ bool CPixmap::BuildIconMask(int channelMask, int rankMask,
|
||||
|
||||
bool CPixmap::Display()
|
||||
{
|
||||
RECT MapRect;
|
||||
|
||||
m_bBackDisplayed = true;
|
||||
|
||||
MapRect.left = 0;
|
||||
MapRect.top = 0;
|
||||
MapRect.right = m_dim.x;
|
||||
MapRect.bottom = m_dim.y;
|
||||
|
||||
SDL_RenderPresent (g_renderer);
|
||||
return true;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user