libtonc: tonc_sbmp8.c File Reference

Tonclib

tonc_sbmp8.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 u8 pixel_t

Functions

void sbmp8_floodfill_internal (const TSurface *dst, int x, int y, u8 clrNew, u8 clrOld)
u32 sbmp8_get_pixel (const TSurface *src, int x, int y)
 Get the pixel value of src at (x, y).
void sbmp8_plot (const TSurface *dst, int x, int y, u32 clr)
 Plot a single pixel on a 8-bit buffer.
void sbmp8_hline (const TSurface *dst, int x1, int y, int x2, u32 clr)
 Draw a horizontal line on an 8-bit buffer.
void sbmp8_vline (const TSurface *dst, int x, int y1, int y2, u32 clr)
 Draw a vertical line on an 8-bit buffer.
void sbmp8_line (const TSurface *dst, int x1, int y1, int x2, int y2, u32 clr)
 Draw a line on an 8-bit buffer.
void sbmp8_rect (const TSurface *dst, int left, int top, int right, int bottom, u32 clr)
 Draw a rectangle in 8-bit mode.
void sbmp8_frame (const TSurface *dst, int left, int top, int right, int bottom, u32 clr)
 Draw a rectangle in 8-bit mode.
void sbmp8_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 sbmp8_floodfill (const TSurface *dst, int x, int y, u32 clr)
 Floodfill an area of the same color with new color clr.
void sbmp8_floodfill_internal (const TSurface *dst, int x, int y, pixel_t clrNew, pixel_t clrOld)
 Internal routine for floodfill.

Variables

EWRAM_DATA TSurface m4_surface
const TSurfaceProcTab bmp8_tab

Detailed Description

Author:
J Vijn
Date:
20080127 - 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 bmp8_tab

EWRAM_DATA TSurface m4_surface

Initial value:

 
{
    (u8*)m4_mem, M4_WIDTH, M4_WIDTH, M4_HEIGHT, SRF_BMP8, 8, 
    256, pal_bg_mem
}


Generated on Mon Aug 25 17:03:56 2008 for libtonc by  doxygen 1.5.3