mirror of
https://github.com/blupi-games/planetblupi
synced 2024-12-30 10:15:36 +01:00
Cosmetic: apply clang-format
This commit is contained in:
parent
914878634a
commit
1e8e8213a7
@ -1915,9 +1915,8 @@ CDecor::CelOkForAction (
|
|||||||
cel.x--;
|
cel.x--;
|
||||||
cel.y--;
|
cel.y--;
|
||||||
|
|
||||||
if (
|
if (!bStrong || bTransport || bVehicule || m_blupi[rank].perso == 8) // disciple
|
||||||
!bStrong || bTransport || bVehicule ||
|
// ?
|
||||||
m_blupi[rank].perso == 8) // disciple ?
|
|
||||||
{
|
{
|
||||||
error = Errors::MISC; // pas assez fort
|
error = Errors::MISC; // pas assez fort
|
||||||
}
|
}
|
||||||
@ -1970,9 +1969,8 @@ CDecor::CelOkForAction (
|
|||||||
cel.x--;
|
cel.x--;
|
||||||
cel.y--;
|
cel.y--;
|
||||||
|
|
||||||
if (
|
if (!bStrong || bTransport || bVehicule || m_blupi[rank].perso == 8) // disciple
|
||||||
!bStrong || bTransport || bVehicule ||
|
// ?
|
||||||
m_blupi[rank].perso == 8) // disciple ?
|
|
||||||
{
|
{
|
||||||
error = Errors::MISC; // pas assez fort
|
error = Errors::MISC; // pas assez fort
|
||||||
}
|
}
|
||||||
|
@ -125,7 +125,8 @@ CPixmap::CreateMainTexture ()
|
|||||||
|
|
||||||
Sint32
|
Sint32
|
||||||
CPixmap::Blit (
|
CPixmap::Blit (
|
||||||
Sint32 dstCh, SDL_Texture * src, const SDL_Rect & dstRect, double angle, SDL_RendererFlip flip)
|
Sint32 dstCh, SDL_Texture * src, const SDL_Rect & dstRect, double angle,
|
||||||
|
SDL_RendererFlip flip)
|
||||||
{
|
{
|
||||||
Sint32 res;
|
Sint32 res;
|
||||||
auto target = SDL_GetRenderTarget (g_renderer);
|
auto target = SDL_GetRenderTarget (g_renderer);
|
||||||
@ -150,8 +151,7 @@ CPixmap::Blit (
|
|||||||
if (this->mainTexture)
|
if (this->mainTexture)
|
||||||
SDL_SetRenderTarget (g_renderer, target ? target : this->mainTexture);
|
SDL_SetRenderTarget (g_renderer, target ? target : this->mainTexture);
|
||||||
res = SDL_RenderCopyEx (
|
res = SDL_RenderCopyEx (
|
||||||
g_renderer, src, nullptr, &dstRect, angle,
|
g_renderer, src, nullptr, &dstRect, angle, nullptr, flip);
|
||||||
nullptr, flip);
|
|
||||||
if (this->mainTexture)
|
if (this->mainTexture)
|
||||||
SDL_SetRenderTarget (g_renderer, target);
|
SDL_SetRenderTarget (g_renderer, target);
|
||||||
}
|
}
|
||||||
@ -159,8 +159,7 @@ CPixmap::Blit (
|
|||||||
{
|
{
|
||||||
SDL_SetRenderTarget (g_renderer, m_SDLTextureInfo[dstCh].texture);
|
SDL_SetRenderTarget (g_renderer, m_SDLTextureInfo[dstCh].texture);
|
||||||
res = SDL_RenderCopyEx (
|
res = SDL_RenderCopyEx (
|
||||||
g_renderer, src, nullptr, &dstRect, angle,
|
g_renderer, src, nullptr, &dstRect, angle, nullptr, flip);
|
||||||
nullptr, flip);
|
|
||||||
SDL_SetRenderTarget (g_renderer, target);
|
SDL_SetRenderTarget (g_renderer, target);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -436,8 +435,7 @@ CPixmap::Cache (
|
|||||||
switch (mode)
|
switch (mode)
|
||||||
{
|
{
|
||||||
case FIX:
|
case FIX:
|
||||||
case FIX_REVERSABLE:
|
case FIX_REVERSABLE: {
|
||||||
{
|
|
||||||
if (channel == CHBACK && (ow < LXIMAGE () || oh < LYIMAGE ()))
|
if (channel == CHBACK && (ow < LXIMAGE () || oh < LYIMAGE ()))
|
||||||
{
|
{
|
||||||
if (!wideName.empty ())
|
if (!wideName.empty ())
|
||||||
@ -467,8 +465,7 @@ CPixmap::Cache (
|
|||||||
}
|
}
|
||||||
|
|
||||||
case EXPAND:
|
case EXPAND:
|
||||||
case EXPAND_REVERSABLE:
|
case EXPAND_REVERSABLE: {
|
||||||
{
|
|
||||||
auto isFlipped = flip == SDL_FLIP_HORIZONTAL;
|
auto isFlipped = flip == SDL_FLIP_HORIZONTAL;
|
||||||
|
|
||||||
SDL_Rect src, dst;
|
SDL_Rect src, dst;
|
||||||
|
@ -106,7 +106,9 @@ public:
|
|||||||
void FromGameToDisplay (Sint32 & x, Sint32 & y);
|
void FromGameToDisplay (Sint32 & x, Sint32 & y);
|
||||||
|
|
||||||
Sint32 Blit (
|
Sint32 Blit (
|
||||||
Sint32 dstCh, SDL_Texture * src, const SDL_Rect & dstRect, double angle, SDL_RendererFlip flip);
|
Sint32 dstCh, SDL_Texture * src, const SDL_Rect & dstRect, double angle,
|
||||||
|
SDL_RendererFlip flip);
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
Sint32 BltFast (
|
Sint32 BltFast (
|
||||||
Sint32 dstCh, size_t srcCh, Rect dstR, Rect srcR,
|
Sint32 dstCh, size_t srcCh, Rect dstR, Rect srcR,
|
||||||
@ -136,8 +138,10 @@ protected:
|
|||||||
SDL_Cursor * m_lpCurrentCursor;
|
SDL_Cursor * m_lpCurrentCursor;
|
||||||
SDL_Cursor * m_lpSDLCursors[MAXCURSORS];
|
SDL_Cursor * m_lpSDLCursors[MAXCURSORS];
|
||||||
SDL_Surface * m_lpSDLBlupi;
|
SDL_Surface * m_lpSDLBlupi;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
SDL_Texture * mainTexture;
|
SDL_Texture * mainTexture;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
std::unordered_map<size_t, TextureInfo> m_SDLTextureInfo;
|
std::unordered_map<size_t, TextureInfo> m_SDLTextureInfo;
|
||||||
};
|
};
|
||||||
|
10
src/text.cxx
10
src/text.cxx
@ -145,7 +145,11 @@ public:
|
|||||||
TTF_SetFontDirection (this->font, TTF_DIRECTION_RTL);
|
TTF_SetFontDirection (this->font, TTF_DIRECTION_RTL);
|
||||||
}
|
}
|
||||||
|
|
||||||
~Font () { this->cache.Clear (); TTF_CloseFont (this->font); }
|
~Font ()
|
||||||
|
{
|
||||||
|
this->cache.Clear ();
|
||||||
|
TTF_CloseFont (this->font);
|
||||||
|
}
|
||||||
|
|
||||||
TTF_Font * GetFont () { return this->font; }
|
TTF_Font * GetFont () { return this->font; }
|
||||||
|
|
||||||
@ -390,9 +394,7 @@ public:
|
|||||||
TTF_SetFontScriptName (this->arabicWhite->GetFont (), "Arab");
|
TTF_SetFontScriptName (this->arabicWhite->GetFont (), "Arab");
|
||||||
}
|
}
|
||||||
|
|
||||||
~Fonts ()
|
~Fonts () {}
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
void Clear ()
|
void Clear ()
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user