BaseSoftRenderSurface Class Reference

#include <BaseSoftRenderSurface.h>

Inheritance diagram for BaseSoftRenderSurface:

RenderSurface SoftRenderSurface< uintX > List of all members.

Public Member Functions

virtual ~BaseSoftRenderSurface ()
virtual ECode BeginPainting ()
virtual ECode EndPainting ()
virtual TextureGetSurfaceAsTexture ()
virtual void SetOrigin (sint32 x, sint32 y)
virtual void GetOrigin (sint32 &x, sint32 &y) const
virtual void GetSurfaceDims (Pentagram::Rect &) const
virtual void GetClippingRect (Pentagram::Rect &) const
virtual void SetClippingRect (const Pentagram::Rect &)
virtual sint16 CheckClipped (const Pentagram::Rect &) const
virtual void SetFlipped (bool flipped)
virtual bool IsFlipped () const
virtual void CreateNativePalette (Pentagram::Palette *palette)

Protected Member Functions

 BaseSoftRenderSurface (SDL_Surface *)
 BaseSoftRenderSurface (int w, int h)
 BaseSoftRenderSurface (int w, int h, int bpp, int rsft, int gsft, int bsft, int asft)
 BaseSoftRenderSurface (int w, int h, uint8 *buf)
virtual ECode GenericLock ()
virtual ECode GenericUnlock ()
void SetPixelsPointer ()

Protected Attributes

uint8pixels
uint8pixels00
uint16zbuffer
uint8zbuffer00
int bytes_per_pixel
int bits_per_pixel
int format_type
sint32 ox
sint32 oy
sint32 width
sint32 height
sint32 pitch
sint32 zpitch
bool flipped
Pentagram::Rect clip_window
uint32 lock_count
SDL_Surface * sdl_surf
Texturertt_tex

Detailed Description

Definition at line 33 of file BaseSoftRenderSurface.h.


Constructor & Destructor Documentation

BaseSoftRenderSurface::BaseSoftRenderSurface ( SDL_Surface *   )  [protected]

Definition at line 41 of file BaseSoftRenderSurface.cpp.

References bits_per_pixel, bytes_per_pixel, clip_window, RenderSurface::format, height, pitch, Pentagram::Rect::ResizeAbs(), sdl_surf, SetPixelsPointer(), and width.

BaseSoftRenderSurface::BaseSoftRenderSurface ( int  w,
int  h 
) [protected]

Definition at line 209 of file BaseSoftRenderSurface.cpp.

References bits_per_pixel, Texture::buffer, bytes_per_pixel, Texture::CalcLOG2s(), clip_window, Texture::format, RenderSurface::format, Texture::height, height, pitch, pixels00, Pentagram::Rect::ResizeAbs(), rtt_tex, SetPixelsPointer(), TEX_FMT_NATIVE, Texture::width, and width.

BaseSoftRenderSurface::BaseSoftRenderSurface ( int  w,
int  h,
int  bpp,
int  rsft,
int  gsft,
int  bsft,
int  asft 
) [protected]

Definition at line 122 of file BaseSoftRenderSurface.cpp.

References bits_per_pixel, bytes_per_pixel, clip_window, RenderSurface::format, height, pitch, Pentagram::Rect::ResizeAbs(), SetPixelsPointer(), and width.

BaseSoftRenderSurface::BaseSoftRenderSurface ( int  w,
int  h,
uint8 buf 
) [protected]

Definition at line 186 of file BaseSoftRenderSurface.cpp.

References bits_per_pixel, bytes_per_pixel, clip_window, RenderSurface::format, height, pitch, pixels00, Pentagram::Rect::ResizeAbs(), SetPixelsPointer(), and width.

BaseSoftRenderSurface::~BaseSoftRenderSurface (  )  [virtual]

Definition at line 240 of file BaseSoftRenderSurface.cpp.

References pixels00, rtt_tex, and zbuffer00.


Member Function Documentation

ECode BaseSoftRenderSurface::BeginPainting (  )  [virtual]

Begin painting to the buffer. MUST BE CALLED BEFORE DOING ANYTHING TO THE SURFACE!

Implements RenderSurface.

Definition at line 262 of file BaseSoftRenderSurface.cpp.

References ECode::failed(), flipped, GenericLock(), lock_count, perr, pitch, pixels, pixels00, sdl_surf, and SetPixelsPointer().

Referenced by GUIApp::CreateHWCursors().

sint16 BaseSoftRenderSurface::CheckClipped ( const Pentagram::Rect  )  const [virtual]

Check Clipped. -1 if off screen, 0 if not clipped, 1 if clipped.

Implements RenderSurface.

Definition at line 513 of file BaseSoftRenderSurface.cpp.

References clip_window, Pentagram::Rect::Intersect(), and Pentagram::Rect::IsValid().

void BaseSoftRenderSurface::CreateNativePalette ( Pentagram::Palette palette  )  [virtual]

Implements RenderSurface.

Definition at line 368 of file BaseSoftRenderSurface.cpp.

References Pentagram::Palette::matrix, Pentagram::Palette::native, Pentagram::Palette::native_untransformed, Pentagram::Palette::palette, Pentagram::Palette::xform, and Pentagram::Palette::xform_untransformed.

ECode BaseSoftRenderSurface::EndPainting (  )  [virtual]

Finish paining to the buffer.

Implements RenderSurface.

Definition at line 314 of file BaseSoftRenderSurface.cpp.

References ECode::failed(), GenericUnlock(), lock_count, perr, pixels, pixels00, and sdl_surf.

Referenced by GUIApp::CreateHWCursors().

virtual ECode BaseSoftRenderSurface::GenericLock (  )  [inline, protected, virtual]

Definition at line 77 of file BaseSoftRenderSurface.h.

Referenced by BeginPainting().

virtual ECode BaseSoftRenderSurface::GenericUnlock (  )  [inline, protected, virtual]

Definition at line 78 of file BaseSoftRenderSurface.h.

Referenced by EndPainting().

void BaseSoftRenderSurface::GetClippingRect ( Pentagram::Rect  )  const [virtual]

Get Clipping Rectangle.

Implements RenderSurface.

Definition at line 487 of file BaseSoftRenderSurface.cpp.

References clip_window.

void BaseSoftRenderSurface::GetOrigin ( sint32 x,
sint32 y 
) const [virtual]

Set the Origin of the Surface.

Implements RenderSurface.

Definition at line 474 of file BaseSoftRenderSurface.cpp.

References ox, and oy.

Texture * BaseSoftRenderSurface::GetSurfaceAsTexture (  )  [virtual]

Get the surface as a Texture. Only valid for SecondaryRenderSurfaces.

Implements RenderSurface.

Definition at line 353 of file BaseSoftRenderSurface.cpp.

References perr, and rtt_tex.

void BaseSoftRenderSurface::GetSurfaceDims ( Pentagram::Rect  )  const [virtual]

Get the Surface Dimensions.

Implements RenderSurface.

Definition at line 446 of file BaseSoftRenderSurface.cpp.

References height, ox, oy, Pentagram::Rect::Set(), and width.

bool BaseSoftRenderSurface::IsFlipped (  )  const [virtual]

Has the render surface been flipped?

Implements RenderSurface.

Definition at line 558 of file BaseSoftRenderSurface.cpp.

References flipped.

void BaseSoftRenderSurface::SetClippingRect ( const Pentagram::Rect  )  [virtual]

Set Clipping Rectangle.

Implements RenderSurface.

Definition at line 498 of file BaseSoftRenderSurface.cpp.

References clip_window, height, Pentagram::Rect::Intersect(), ox, oy, and width.

void BaseSoftRenderSurface::SetFlipped ( bool  flipped  )  [virtual]

Flip the surface.

Implements RenderSurface.

Definition at line 529 of file BaseSoftRenderSurface.cpp.

References clip_window, flipped, Pentagram::Rect::h, height, oy, pitch, SetPixelsPointer(), Pentagram::Rect::y, and zpitch.

void BaseSoftRenderSurface::SetOrigin ( sint32  x,
sint32  y 
) [virtual]

Set the Origin of the Surface.

Implements RenderSurface.

Definition at line 456 of file BaseSoftRenderSurface.cpp.

References clip_window, Pentagram::Rect::MoveRel(), ox, oy, and SetPixelsPointer().

void BaseSoftRenderSurface::SetPixelsPointer (  )  [inline, protected]

Definition at line 81 of file BaseSoftRenderSurface.h.

References bytes_per_pixel, flipped, height, ox, oy, pitch, pixels, pixels00, zbuffer, zbuffer00, and zpitch.

Referenced by BaseSoftRenderSurface(), BeginPainting(), SetFlipped(), and SetOrigin().


Member Data Documentation

int BaseSoftRenderSurface::bits_per_pixel [protected]

Definition at line 46 of file BaseSoftRenderSurface.h.

Referenced by BaseSoftRenderSurface().

int BaseSoftRenderSurface::bytes_per_pixel [protected]

Definition at line 45 of file BaseSoftRenderSurface.h.

Referenced by BaseSoftRenderSurface(), and SetPixelsPointer().

Pentagram::Rect BaseSoftRenderSurface::clip_window [protected]

Definition at line 57 of file BaseSoftRenderSurface.h.

Referenced by BaseSoftRenderSurface(), SoftRenderSurface< uintX >::Blit(), CheckClipped(), SoftRenderSurface< uintX >::FadedBlit(), SoftRenderSurface< uintX >::Fill32(), SoftRenderSurface< uintX >::FillAlpha(), GetClippingRect(), SoftRenderSurface< uintX >::MaskedBlit(), SetClippingRect(), SetFlipped(), and SetOrigin().

bool BaseSoftRenderSurface::flipped [protected]

Definition at line 54 of file BaseSoftRenderSurface.h.

Referenced by BeginPainting(), IsFlipped(), SetFlipped(), and SetPixelsPointer().

int BaseSoftRenderSurface::format_type [protected]

Definition at line 47 of file BaseSoftRenderSurface.h.

sint32 BaseSoftRenderSurface::height [protected]

Definition at line 51 of file BaseSoftRenderSurface.h.

Referenced by BaseSoftRenderSurface(), GetSurfaceDims(), SetClippingRect(), SetFlipped(), and SetPixelsPointer().

uint32 BaseSoftRenderSurface::lock_count [protected]

Definition at line 60 of file BaseSoftRenderSurface.h.

Referenced by BeginPainting(), and EndPainting().

sint32 BaseSoftRenderSurface::ox [protected]

Definition at line 50 of file BaseSoftRenderSurface.h.

Referenced by GetOrigin(), GetSurfaceDims(), SetClippingRect(), SetOrigin(), and SetPixelsPointer().

sint32 BaseSoftRenderSurface::oy [protected]

Definition at line 50 of file BaseSoftRenderSurface.h.

Referenced by GetOrigin(), GetSurfaceDims(), SetClippingRect(), SetFlipped(), SetOrigin(), and SetPixelsPointer().

sint32 BaseSoftRenderSurface::pitch [protected]

Definition at line 52 of file BaseSoftRenderSurface.h.

Referenced by BaseSoftRenderSurface(), BeginPainting(), SoftRenderSurface< uintX >::Blit(), SoftRenderSurface< uintX >::FadedBlit(), SoftRenderSurface< uintX >::Fill32(), SoftRenderSurface< uintX >::FillAlpha(), SoftRenderSurface< uintX >::MaskedBlit(), SoftRenderSurface< uintX >::ScalerBlit(), SetFlipped(), SetPixelsPointer(), and SoftRenderSurface< uintX >::StretchBlit().

uint8* BaseSoftRenderSurface::pixels [protected]

Definition at line 37 of file BaseSoftRenderSurface.h.

Referenced by BeginPainting(), SoftRenderSurface< uintX >::Blit(), EndPainting(), SoftRenderSurface< uintX >::FadedBlit(), SoftRenderSurface< uintX >::Fill32(), SoftRenderSurface< uintX >::FillAlpha(), SoftRenderSurface< uintX >::MaskedBlit(), SoftRenderSurface< uintX >::ScalerBlit(), SetPixelsPointer(), and SoftRenderSurface< uintX >::StretchBlit().

uint8* BaseSoftRenderSurface::pixels00 [protected]

Definition at line 38 of file BaseSoftRenderSurface.h.

Referenced by BaseSoftRenderSurface(), BeginPainting(), EndPainting(), SetPixelsPointer(), and ~BaseSoftRenderSurface().

Texture* BaseSoftRenderSurface::rtt_tex [protected]

Definition at line 66 of file BaseSoftRenderSurface.h.

Referenced by BaseSoftRenderSurface(), GetSurfaceAsTexture(), and ~BaseSoftRenderSurface().

SDL_Surface* BaseSoftRenderSurface::sdl_surf [protected]

Definition at line 63 of file BaseSoftRenderSurface.h.

Referenced by BaseSoftRenderSurface(), BeginPainting(), and EndPainting().

sint32 BaseSoftRenderSurface::width [protected]

Definition at line 51 of file BaseSoftRenderSurface.h.

Referenced by BaseSoftRenderSurface(), GetSurfaceDims(), and SetClippingRect().

uint16* BaseSoftRenderSurface::zbuffer [protected]

Definition at line 41 of file BaseSoftRenderSurface.h.

Referenced by SetPixelsPointer().

uint8* BaseSoftRenderSurface::zbuffer00 [protected]

Definition at line 42 of file BaseSoftRenderSurface.h.

Referenced by SetPixelsPointer(), and ~BaseSoftRenderSurface().

sint32 BaseSoftRenderSurface::zpitch [protected]

Definition at line 53 of file BaseSoftRenderSurface.h.

Referenced by SetFlipped(), and SetPixelsPointer().


The documentation for this class was generated from the following files:
Generated on Fri Jul 27 22:28:44 2007 for pentagram by  doxygen 1.4.7