Some style and whitespace fixes
parent
60ae9b1959
commit
3b585d9f51
|
@ -448,8 +448,8 @@ void CImage::SetDataPixels(void *pixels){
|
|||
}
|
||||
}
|
||||
|
||||
void CImage::flipVertically(){
|
||||
|
||||
void CImage::FlipVertically()
|
||||
{
|
||||
SDL_Surface* result = SDL_CreateRGBSurface( m_data->surface->flags,
|
||||
m_data->surface->w,
|
||||
m_data->surface->h,
|
||||
|
@ -467,7 +467,8 @@ void CImage::flipVertically(){
|
|||
Uint32 pitch = m_data->surface->pitch;
|
||||
Uint32 pxLength = pitch*m_data->surface->h;
|
||||
|
||||
for(int line = 0; line < m_data->surface->h; ++line) {
|
||||
for (int line = 0; line < m_data->surface->h; ++line)
|
||||
{
|
||||
Uint32 pos = line * pitch;
|
||||
memcpy(&resultPixels[pos], &srcPixels[(pxLength-pos)-pitch], pitch);
|
||||
}
|
||||
|
|
|
@ -113,7 +113,7 @@ public:
|
|||
std::string GetError();
|
||||
|
||||
//! Flips the image vertically
|
||||
void flipVertically();
|
||||
void FlipVertically();
|
||||
|
||||
//! sets/replaces the pixels from the surface
|
||||
void SetDataPixels(void *pixels);
|
||||
|
|
|
@ -41,6 +41,3 @@ boost::smatch RegexUtils::AssertRegexMatch(const std::string& text, const std::s
|
|||
|
||||
return matches;
|
||||
}
|
||||
|
||||
/*
|
||||
boost::cmatch matches;*/
|
|
@ -487,7 +487,7 @@ bool CEngine::WriteScreenShot(const std::string& fileName, int width, int height
|
|||
CImage img({width, height});
|
||||
|
||||
img.SetDataPixels(pixels);
|
||||
img.flipVertically();
|
||||
img.FlipVertically();
|
||||
|
||||
if ( img.SavePNG(fileName.c_str()) )
|
||||
{
|
||||
|
|
|
@ -19,7 +19,8 @@
|
|||
|
||||
#pragma once
|
||||
|
||||
enum MissionType {
|
||||
enum MissionType
|
||||
{
|
||||
MISSION_NORMAL = 0,
|
||||
MISSION_RETRO,
|
||||
MISSION_CODE_BATTLE
|
||||
|
|
Loading…
Reference in New Issue