Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Namespace Members | Class Members | File Members | Related Pages

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 "../messaginghub.h"
#include <iostream>

Include dependency graph for graphics/surface.cpp:

Go to the source code of this file.

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 586 of file graphics/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 604 of file graphics/surface.cpp.

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

Referenced by loadASCFieldImageArray().

Surface& getFieldMask  ) 
 

Definition at line 536 of file graphics/surface.cpp.

References assert, 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 graphics/surface.cpp.

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

Referenced by Surface::readDefaultPixelFormat().

Surface rotateSurface Surface s,
int  degrees
 

Definition at line 667 of file graphics/surface.cpp.

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

void writeDefaultPixelFormat SDLmm::PixelFormat  pf,
tnstream stream
 

Definition at line 96 of file graphics/surface.cpp.

References tnstream::writeInt().


Variable Documentation

const int surfaceVersion = 2
 

Definition at line 216 of file graphics/surface.cpp.

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


Generated on Tue Jun 24 02:10:25 2008 for Advanced Strategic Command by  doxygen 1.4.2