surface.cpp File Reference

#include <SDL_image.h>
#include <cmath>
#include "../sdl/sdlstretch.h"
#include "surface.h"
#include "blitter.h"
#include "../basegfx.h"
#include "../basestrm.h"
#include "../misc.h"
#include "../util/messaginghub.h"
#include <iostream>

Include dependency graph for surface.cpp:

Go to the source code of this file.

Classes

class  ColorMerger_MaskApply< pixelsize >

Functions

void writeDefaultPixelFormat (SDLmm::PixelFormat pf, tnstream &stream)
SDL_PixelFormat * readSDLPixelFormat (tnstream &stream)
SurfacegetFieldMask ()
void applyFieldMask (Surface &s, int x, int y, bool detecColorKey)
void applyLegacyFieldMask (Surface &s, int x, int y, bool detectColorKey)
 applies a field mask that uses FEFEFE Color as Colorkey to load old images
Surface rotateSurface (Surface &s, int degrees)

Variables

const int surfaceVersion = 2


Function Documentation

void applyFieldMask ( Surface s,
int  x,
int  y,
bool  detecColorKey 
)

Definition at line 593 of file surface.cpp.

References MegaBlitter< BytesPerSourcePixel, BytesPerTargetPixel, SourceColorTransform, ColorMerger, SourcePixelSelector, TargetPixelSelector, MyColorConverter >::blit(), Surface::detectColorKey(), and getFieldMask().

Referenced by loadASCFieldImage(), loadASCFieldImageArray(), and BuildingType::runTextIO().

void applyLegacyFieldMask ( Surface s,
int  x,
int  y,
bool  detectColorKey 
)

applies a field mask that uses FEFEFE Color as Colorkey to load old images

Definition at line 611 of file surface.cpp.

References Surface::createSurface(), Surface::detectColorKey(), getFieldMask(), and Surface::hasAlpha().

Referenced by loadASCFieldImageArray().

Surface& getFieldMask (  ) 

Definition at line 543 of file surface.cpp.

References RWOPS_Handler::Close(), fatalError(), RWOPS_Handler::Get(), tfileerror::getFileName(), tnstream::reading, and SDL_RWFromStream().

Referenced by applyFieldMask(), and applyLegacyFieldMask().

SDL_PixelFormat* readSDLPixelFormat ( tnstream stream  ) 

Definition at line 117 of file surface.cpp.

References tnstream::getLocation(), and tnstream::readInt().

Referenced by Surface::readDefaultPixelFormat().

Surface rotateSurface ( Surface s,
int  degrees 
)

Definition at line 674 of file surface.cpp.

References Surface::detectColorKey(), Surface::Duplicate(), and getPixelRotationLocation().

void writeDefaultPixelFormat ( SDLmm::PixelFormat  pf,
tnstream stream 
)

Definition at line 96 of file surface.cpp.

References tnstream::writeInt().


Variable Documentation

const int surfaceVersion = 2

Definition at line 216 of file surface.cpp.

Referenced by Surface::read(), and Surface::write().


Generated on Mon May 21 01:43:28 2012 for Advanced Strategic Command by  doxygen 1.5.1