sdl_ext.cc File Reference

#include "global.hh"
#include "sdl_ext.hh"

Include dependency graph for sdl_ext.cc:


Functions

void Slock (SDL_Surface *screen)
 Locks a surface.
void Sulock (SDL_Surface *screen)
 Unlocks a surface.
SDL_Surface * Image_Load (const char *filename, bool bOptimize)
 Loads an image and optionally optimizes the loaded surface.
SDL_Surface * Surface_Optimize (SDL_Surface *pSurface)
 Optimizes a surface for faster blitting.
Uint32 GetPixel (SDL_Surface *screen, int x, int y)
 Retrieve pixel data from a surface.
void DrawPixel (SDL_Surface *screen, int x, int y, Uint8 r, Uint8 g, Uint8 b)
 Draw a pixel on a surface.
void DrawCircle (SDL_Surface *screen, int radius, int x, int y, Uint8 r, Uint8 g, Uint8 b)
 Draw a circle on a surface.
void DrawRect (SDL_Surface *screen, SDL_Rect *rect, Uint8 r, Uint8 g, Uint8 b)
 Draw a rectangle on a surface.
void DrawLine (SDL_Surface *screen, SDLEXT_Coord *coord1, SDLEXT_Coord *coord2, Uint8 r, Uint8 g, Uint8 b)
 Draw a line on a surface.
void DrawIMG (SDL_Surface *screen, SDL_Surface *img, int x, int y, int flags)
 Draw an image on a surface.

Function Documentation

void DrawCircle ( SDL_Surface *  screen,
int  radius,
int  x,
int  y,
Uint8  r,
Uint8  g,
Uint8  b 
)

Draw a circle on a surface.

void DrawIMG ( SDL_Surface *  screen,
SDL_Surface *  img,
int  x,
int  y,
int  flags 
)

Draw an image on a surface.

void DrawLine ( SDL_Surface *  screen,
SDLEXT_Coord coord1,
SDLEXT_Coord coord2,
Uint8  r,
Uint8  g,
Uint8  b 
)

Draw a line on a surface.

Parameters:
screen  The target surface to draw the line on.
coord1  Coordinate one (from).
coord2  Coordinate two (to).

void DrawPixel ( SDL_Surface *  screen,
int  x,
int  y,
Uint8  r,
Uint8  g,
Uint8  b 
)

Draw a pixel on a surface.

void DrawRect ( SDL_Surface *  screen,
SDL_Rect *  rect,
Uint8  r,
Uint8  g,
Uint8  b 
)

Draw a rectangle on a surface.

Uint32 GetPixel ( SDL_Surface *  screen,
int  x,
int  y 
)

Retrieve pixel data from a surface.

SDL_Surface* Image_Load ( const char *  filename,
bool  bOptimize 
)

Loads an image and optionally optimizes the loaded surface.

void Slock ( SDL_Surface *  screen  ) 

Locks a surface.

void Sulock ( SDL_Surface *  screen  ) 

Unlocks a surface.

SDL_Surface* Surface_Optimize ( SDL_Surface *  pSurface  ) 

Optimizes a surface for faster blitting.

Remarks:
Returns a surface in case of success. Returns 0 in case of failure.
After executing this function, the specified surface for 'pSurface' won't be useable anymore (it's freed). Please replace the specified surface immediately with the return value of this function.


Generated on Fri Feb 22 09:36:50 2008 for Mega Maryo by  doxygen 1.5.5