Main Page | Class Hierarchy | Alphabetical List | Data Structures | Directories | File List | Data Fields | Globals

EffectReverse Class Reference

Inheritance diagram for EffectReverse:

Inheritance graph
[legend]
Collaboration diagram for EffectReverse:

Collaboration graph
[legend]

Detailed Description

Blit with reversed left and right side.

Definition at line 9 of file EffectReverse.h.

Public Member Functions

virtual void blit (SDL_Surface *screen, SDL_Surface *surface, int x, int y)
 Reverse left and right.


Member Function Documentation

void EffectReverse::blit SDL_Surface *  screen,
SDL_Surface *  surface,
int  x,
int  y
[virtual]
 

Reverse left and right.

Implements ViewEffect.

Definition at line 19 of file EffectReverse.cpp.

00020 {
00021     SurfaceLock lock1(screen);
00022     SurfaceLock lock2(surface);
00023 
00024     for (int py = 0; py < surface->h; ++py) {
00025         for (int px = 0; px < surface->w; ++px) {
00026             SDL_Color pixel = PixelTool::getColor(surface, px, py);
00027             if (pixel.unused == 255) {
00028                 PixelTool::putColor(screen,
00029                         x + surface->w - 1 - px, y + py, pixel);
00030             }
00031         }
00032     }
00033 }


The documentation for this class was generated from the following files:
Generated on Wed Jun 1 09:55:00 2005 for Fish Fillets - Next Generation by  doxygen 1.4.2