tonc_sbmp16.c File Reference
#include "tonc_surface.h"
#include "tonc_video.h"
Defines | |
#define | PXSIZE sizeof(pixel_t) |
#define | PXPTR(psrf, x, y) (pixel_t*)(psrf->data + (y)*psrf->pitch + (x)*sizeof(pixel_t) ) |
#define | BLIT_CLIP(_ax, _aw, _w, _bx) |
Typedefs | |
typedef u16 | pixel_t |
Functions | |
void | sbmp16_floodfill_internal (const TSurface *dst, int x, int y, u16 clrNew, u16 clrOld) |
u32 | sbmp16_get_pixel (const TSurface *src, int x, int y) |
Get the pixel value of src at (x, y). | |
void | sbmp16_plot (const TSurface *dst, int x, int y, u32 clr) |
Plot a single pixel on a 16-bit buffer. | |
void | sbmp16_hline (const TSurface *dst, int x1, int y, int x2, u32 clr) |
Draw a horizontal line on an 16bit buffer. | |
void | sbmp16_vline (const TSurface *dst, int x, int y1, int y2, u32 clr) |
Draw a vertical line on an 16bit buffer. | |
void | sbmp16_line (const TSurface *dst, int x1, int y1, int x2, int y2, u32 clr) |
Draw a line on an 16bit buffer. | |
void | sbmp16_rect (const TSurface *dst, int left, int top, int right, int bottom, u32 clr) |
Draw a rectangle in 16bit mode. | |
void | sbmp16_frame (const TSurface *dst, int left, int top, int right, int bottom, u32 clr) |
Draw a rectangle in 16bit mode. | |
void | sbmp16_blit (const TSurface *dst, int dstX, int dstY, uint width, uint height, const TSurface *src, int srcX, int srcY) |
16bpp blitter. Copies a rectangle from one surface to another. | |
void | sbmp16_floodfill (const TSurface *dst, int x, int y, u32 clr) |
Floodfill an area of the same color with new color clr. | |
void | sbmp16_floodfill_internal (const TSurface *dst, int x, int y, pixel_t clrNew, pixel_t clrOld) |
Internal routine for floodfill. | |
Variables | |
const TSurface | m3_surface |
EWRAM_DATA TSurface | m5_surface |
const TSurfaceProcTab | bmp16_tab |
Detailed Description
- Author:
- J Vijn
- Date:
- 20080120 - 20080128
- Todo:
- Code consistency.
Define Documentation
#define BLIT_CLIP | ( | _ax, | |||
_aw, | |||||
_w, | |||||
_bx | ) |
Value:
do { \ if( (_ax) >= (_aw) || (_ax)+(_w) <= 0 ) \ return; \ if( (_ax)<0 ) \ { _w += (_ax); _bx += (_ax); _ax= 0; } \ if( (_w) > (_aw)-(_ax) ) \ _w = (_aw)-(_ax); \ } while(0)
Variable Documentation
const TSurfaceProcTab bmp16_tab |
Initial value:
{ "bmp16", sbmp16_get_pixel, sbmp16_plot, sbmp16_hline, sbmp16_vline, sbmp16_line, sbmp16_rect, sbmp16_frame, sbmp16_blit, sbmp16_floodfill, }
const TSurface m3_surface |
EWRAM_DATA TSurface m5_surface |
Generated on Mon Aug 25 17:03:56 2008 for libtonc by 1.5.3