sdl_ext.hh File Reference

#include "global.hh"

Include dependency graph for sdl_ext.hh:

This graph shows which files directly or indirectly include this file:


Classes

struct  SDLEXT_Coord
 Two-dimensional coordinate structure. More...

Defines

#define SDLEXT_DI_HCENTER   0x01
#define SDLEXT_DI_VCENTER   0x02
#define SDLEXT_DI_RIGHT   0x04
#define SDLEXT_DI_BOTTOM   0x08

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=1)
 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.

Define Documentation

#define SDLEXT_DI_BOTTOM   0x08

#define SDLEXT_DI_HCENTER   0x01

#define SDLEXT_DI_RIGHT   0x04

#define SDLEXT_DI_VCENTER   0x02


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 = 1 
)

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:51 2008 for Mega Maryo by  doxygen 1.5.5