#include <RenderSurface.h>
Inheritance diagram for RenderSurface:
Public Member Functions | |
virtual | ~RenderSurface () |
virtual ECode | BeginPainting ()=0 |
virtual ECode | EndPainting ()=0 |
virtual Texture * | GetSurfaceAsTexture ()=0 |
virtual void | SetOrigin (sint32 x, sint32 y)=0 |
virtual void | GetOrigin (sint32 &x, sint32 &y) const =0 |
virtual void | GetSurfaceDims (Pentagram::Rect &) const =0 |
virtual void | GetClippingRect (Pentagram::Rect &) const =0 |
virtual void | SetClippingRect (const Pentagram::Rect &)=0 |
virtual sint16 | CheckClipped (const Pentagram::Rect &) const =0 |
virtual void | SetFlipped (bool flipped)=0 |
virtual bool | IsFlipped () const =0 |
virtual void | CreateNativePalette (Pentagram::Palette *palette)=0 |
virtual void | Fill8 (uint8 index, sint32 sx, sint32 sy, sint32 w, sint32 h)=0 |
virtual void | Fill32 (uint32 rgb, sint32 sx, sint32 sy, sint32 w, sint32 h)=0 |
virtual void | FillAlpha (uint8 alpha, sint32 sx, sint32 sy, sint32 w, sint32 h)=0 |
virtual void | Paint (Shape *s, uint32 frame, sint32 x, sint32 y, bool untformed_pal=false)=0 |
virtual void | PaintNoClip (Shape *s, uint32 frame, sint32 x, sint32 y, bool untformed_pal=false)=0 |
virtual void | PaintTranslucent (Shape *s, uint32 frame, sint32 x, sint32 y, bool untformed_pal=false)=0 |
virtual void | PaintMirrored (Shape *s, uint32 frame, sint32 x, sint32 y, bool trans=false, bool untformed_pal=false)=0 |
virtual void | PaintInvisible (Shape *s, uint32 frame, sint32 x, sint32 y, bool trans, bool mirrored, bool untformed_pal=false)=0 |
virtual void | PaintHighlight (Shape *s, uint32 frame, sint32 x, sint32 y, bool trans, bool mirrored, uint32 col32, bool untformed_pal=false)=0 |
virtual void | PaintHighlightInvis (Shape *s, uint32 frame, sint32 x, sint32 y, bool trans, bool mirrored, uint32 col32, bool untformed_pal=false)=0 |
virtual void | PaintMasked (Shape *s, uint32 framenum, sint32 x, sint32 y, bool trans=false, bool mirrored=false, uint32 col32=0, bool untformed_pal=false)=0 |
virtual void | DrawLine32 (uint32 rgb, sint32 sx, sint32 sy, sint32 ex, sint32 ey)=0 |
virtual void | PrintTextFixed (FixedWidthFont *, const char *text, int x, int y)=0 |
virtual void | PrintCharFixed (FixedWidthFont *, int character, int x, int y)=0 |
virtual void | Blit (Texture *, sint32 sx, sint32 sy, sint32 w, sint32 h, sint32 dx, sint32 dy, bool alpha_blend=false)=0 |
virtual void | FadedBlit (Texture *, sint32 sx, sint32 sy, sint32 w, sint32 h, sint32 dx, sint32 dy, uint32 col32, bool alpha_blend=false)=0 |
virtual void | MaskedBlit (Texture *, sint32 sx, sint32 sy, sint32 w, sint32 h, sint32 dx, sint32 dy, uint32 col32, bool alpha_blend=false)=0 |
virtual void | StretchBlit (Texture *, sint32 sx, sint32 sy, sint32 sw, sint32 sh, sint32 dx, sint32 dy, sint32 dw, sint32 dh, bool bilinear=false, bool clampedges=false)=0 |
virtual bool | ScalerBlit (Texture *, sint32 sx, sint32 sy, sint32 sw, sint32 sh, sint32 dx, sint32 dy, sint32 dw, sint32 dh, const Pentagram::Scaler *, bool clampedges=false)=0 |
Static Public Member Functions | |
static RenderSurface * | SetVideoMode (uint32 width, uint32 height, uint32 bpp, bool fullscreen, bool use_opengl) |
static RenderSurface * | CreateSecondaryRenderSurface (uint32 width, uint32 height) |
Static Public Attributes | |
static Format | format |
static uint8 | Gamma10toGamma22 [256] |
static uint8 | Gamma22toGamma10 [256] |
Classes | |
struct | Format |
Definition at line 51 of file RenderSurface.h.
RenderSurface::~RenderSurface | ( | ) | [virtual] |
Definition at line 152 of file RenderSurface.cpp.
virtual ECode RenderSurface::BeginPainting | ( | ) | [pure virtual] |
Begin painting to the buffer. MUST BE CALLED BEFORE DOING ANYTHING TO THE SURFACE!
Implemented in BaseSoftRenderSurface.
Referenced by Pathfinder::newNode(), ScalerGump::Paint(), GUIApp::paint(), Pathfinder::pathfind(), SKFPlayer::run(), and SKFPlayer::start().
virtual void RenderSurface::Blit | ( | Texture * | , | |
sint32 | sx, | |||
sint32 | sy, | |||
sint32 | w, | |||
sint32 | h, | |||
sint32 | dx, | |||
sint32 | dy, | |||
bool | alpha_blend = false | |||
) | [pure virtual] |
Blit a region from a Texture (Alpha == 0 -> skipped).
Implemented in SoftRenderSurface< uintX >.
Referenced by TTFRenderedText::draw(), SKFPlayer::paint(), GUIApp::paint(), InverterGump::PaintChildren(), PentagramMenuGump::PaintThis(), MiniMapGump::PaintThis(), and GameWidget::PaintThis().
virtual sint16 RenderSurface::CheckClipped | ( | const Pentagram::Rect & | ) | const [pure virtual] |
Check Clipped. -1 if off screen, 0 if not clipped, 1 if clipped.
Implemented in BaseSoftRenderSurface.
Referenced by ItemSorter::AddItem(), and Gump::PaintThis().
virtual void RenderSurface::CreateNativePalette | ( | Pentagram::Palette * | palette | ) | [pure virtual] |
RenderSurface * RenderSurface::CreateSecondaryRenderSurface | ( | uint32 | width, | |
uint32 | height | |||
) | [static] |
Create a SecondaryRenderSurface with an associated Texture object.
Definition at line 141 of file RenderSurface.cpp.
References format, RenderSurface::Format::s_bpp, and width.
Referenced by GameMapGump::ConCmd_dumpMap(), CreditsGump::InitGump(), InverterGump::PaintChildren(), ScalerGump::SetupScalers(), and SKFPlayer::SKFPlayer().
virtual ECode RenderSurface::EndPainting | ( | ) | [pure virtual] |
Finish paining to the buffer.
Implemented in BaseSoftRenderSurface.
Referenced by ScalerGump::Paint(), GUIApp::paint(), SKFPlayer::run(), and SKFPlayer::start().
virtual void RenderSurface::FadedBlit | ( | Texture * | , | |
sint32 | sx, | |||
sint32 | sy, | |||
sint32 | w, | |||
sint32 | h, | |||
sint32 | dx, | |||
sint32 | dy, | |||
uint32 | col32, | |||
bool | alpha_blend = false | |||
) | [pure virtual] |
Blit a region from a Texture with a Colour blend (AlphaTex == 0 -> skipped. AlphaCol32 -> Blend Factors).
Implemented in SoftRenderSurface< uintX >.
Referenced by TTFRenderedText::drawBlended(), and SKFPlayer::paint().
virtual void RenderSurface::Fill32 | ( | uint32 | rgb, | |
sint32 | sx, | |||
sint32 | sy, | |||
sint32 | w, | |||
sint32 | h | |||
) | [pure virtual] |
Fill buffer (using a RGB colour).
Implemented in SoftRenderSurface< uintX >, SoftRenderSurface< uintX >, and SoftRenderSurface< uintX >.
Referenced by ShapeRenderedText::draw(), JPRenderedText::draw(), drawbox(), Console::DrawConsole(), drawdot(), CreditsGump::InitGump(), ShapeViewerGump::PaintThis(), PentagramMenuGump::PaintThis(), MiniStatsGump::PaintThis(), MiniMapGump::PaintThis(), GameWidget::PaintThis(), FastAreaVisGump::PaintThis(), DesktopGump::PaintThis(), CreditsGump::PaintThis(), BindGump::PaintThis(), CreditsGump::Run(), and SKFPlayer::start().
virtual void RenderSurface::FillAlpha | ( | uint8 | alpha, | |
sint32 | sx, | |||
sint32 | sy, | |||
sint32 | w, | |||
sint32 | h | |||
) | [pure virtual] |
Fill alpha channel.
Implemented in SoftRenderSurface< uintX >.
Referenced by EditWidget::PaintComposited(), TextWidget::PaintThis(), and EditWidget::PaintThis().
virtual void RenderSurface::GetClippingRect | ( | Pentagram::Rect & | ) | const [pure virtual] |
Get Clipping Rectangle.
Implemented in BaseSoftRenderSurface.
Referenced by Gump::Paint(), PentagramMenuGump::PaintChildren(), and Gump::PaintCompositing().
Set the Origin of the Surface.
Implemented in BaseSoftRenderSurface.
Referenced by Gump::Paint(), and Gump::PaintCompositing().
virtual Texture* RenderSurface::GetSurfaceAsTexture | ( | ) | [pure virtual] |
Get the surface as a Texture. Only valid for SecondaryRenderSurfaces.
Implemented in BaseSoftRenderSurface.
Referenced by GameMapGump::ConCmd_dumpMap(), SKFPlayer::paint(), ScalerGump::Paint(), InverterGump::PaintChildren(), and CreditsGump::PaintThis().
virtual void RenderSurface::GetSurfaceDims | ( | Pentagram::Rect & | ) | const [pure virtual] |
Get the Surface Dimensions.
Implemented in BaseSoftRenderSurface.
Referenced by drawbox(), drawdot(), drawedge(), GUIApp::getMouseDirection(), GUIApp::getMouseLength(), GUIApp::GraphicSysInit(), GUIApp::paint(), DesktopGump::RenderSurfaceChanged(), GUIApp::setMouseCoords(), GUIApp::setupCoreGumps(), and GUIApp::shutdownGame().
virtual bool RenderSurface::IsFlipped | ( | ) | const [pure virtual] |
Has the render surface been flipped?
Implemented in BaseSoftRenderSurface.
Referenced by InverterGump::PaintChildren().
virtual void RenderSurface::MaskedBlit | ( | Texture * | , | |
sint32 | sx, | |||
sint32 | sy, | |||
sint32 | w, | |||
sint32 | h, | |||
sint32 | dx, | |||
sint32 | dy, | |||
uint32 | col32, | |||
bool | alpha_blend = false | |||
) | [pure virtual] |
Blit a region from a Texture with a Colour blend masked based on DestAlpha (AlphaTex == 0 || AlphaDest == 0 -> skipped. AlphaCol32 -> Blend Factors).
Implemented in SoftRenderSurface< uintX >.
Referenced by TTFRenderedText::draw(), and TTFRenderedText::drawBlended().
virtual void RenderSurface::Paint | ( | Shape * | s, | |
uint32 | frame, | |||
sint32 | x, | |||
sint32 | y, | |||
bool | untformed_pal = false | |||
) | [pure virtual] |
Paint a Shape.
Implemented in SoftRenderSurface< uintX >.
Referenced by ShapeRenderedText::draw(), JPRenderedText::draw(), GUIApp::paint(), ItemSorter::PaintSortItem(), ShapeViewerGump::PaintThis(), PaperdollGump::PaintThis(), Gump::PaintThis(), ContainerGump::PaintThis(), and SKFPlayer::run().
virtual void RenderSurface::PaintHighlight | ( | Shape * | s, | |
uint32 | frame, | |||
sint32 | x, | |||
sint32 | y, | |||
bool | trans, | |||
bool | mirrored, | |||
uint32 | col32, | |||
bool | untformed_pal = false | |||
) | [pure virtual] |
Paint a Highlighted Shape of using the 32 Bit Colour col32 (0xAARRGGBB Alpha is blend level).
Implemented in SoftRenderSurface< uintX >.
Referenced by ShapeRenderedText::drawBlended(), JPRenderedText::drawBlended(), and ItemSorter::PaintSortItem().
virtual void RenderSurface::PaintHighlightInvis | ( | Shape * | s, | |
uint32 | frame, | |||
sint32 | x, | |||
sint32 | y, | |||
bool | trans, | |||
bool | mirrored, | |||
uint32 | col32, | |||
bool | untformed_pal = false | |||
) | [pure virtual] |
Paint a Invisible Highlighted Shape of using the 32 Bit Colour col32 (0xAARRGGBB Alpha is blend level).
Implemented in SoftRenderSurface< uintX >.
Referenced by ItemSorter::PaintDisplayList(), and ItemSorter::PaintSortItem().
virtual void RenderSurface::PaintInvisible | ( | Shape * | s, | |
uint32 | frame, | |||
sint32 | x, | |||
sint32 | y, | |||
bool | trans, | |||
bool | mirrored, | |||
bool | untformed_pal = false | |||
) | [pure virtual] |
Paint an Invisible Shape.
Implemented in SoftRenderSurface< uintX >.
Referenced by ItemSorter::PaintSortItem(), PaperdollGump::PaintThis(), and ContainerGump::PaintThis().
virtual void RenderSurface::PaintMirrored | ( | Shape * | s, | |
uint32 | frame, | |||
sint32 | x, | |||
sint32 | y, | |||
bool | trans = false , |
|||
bool | untformed_pal = false | |||
) | [pure virtual] |
Paint a Mirrored Shape.
Implemented in SoftRenderSurface< uintX >.
Referenced by ItemSorter::PaintSortItem().
virtual void RenderSurface::PaintNoClip | ( | Shape * | s, | |
uint32 | frame, | |||
sint32 | x, | |||
sint32 | y, | |||
bool | untformed_pal = false | |||
) | [pure virtual] |
Paint a Shape without clipping.
Implemented in SoftRenderSurface< uintX >.
Referenced by ItemSorter::PaintSortItem(), and Gump::PaintThis().
virtual void RenderSurface::PaintTranslucent | ( | Shape * | s, | |
uint32 | frame, | |||
sint32 | x, | |||
sint32 | y, | |||
bool | untformed_pal = false | |||
) | [pure virtual] |
Paint a Translucent Shape.
Implemented in SoftRenderSurface< uintX >.
Referenced by ItemSorter::PaintSortItem().
virtual void RenderSurface::PrintCharFixed | ( | FixedWidthFont * | , | |
int | character, | |||
int | x, | |||
int | y | |||
) | [pure virtual] |
Draw a fixed width character from a FixedWidthFont.
Implemented in SoftRenderSurface< uintX >.
Referenced by Console::DrawConsole(), and Console::DrawConsoleNotify().
virtual void RenderSurface::PrintTextFixed | ( | FixedWidthFont * | , | |
const char * | text, | |||
int | x, | |||
int | y | |||
) | [pure virtual] |
virtual bool RenderSurface::ScalerBlit | ( | Texture * | , | |
sint32 | sx, | |||
sint32 | sy, | |||
sint32 | sw, | |||
sint32 | sh, | |||
sint32 | dx, | |||
sint32 | dy, | |||
sint32 | dw, | |||
sint32 | dh, | |||
const Pentagram::Scaler * | , | |||
bool | clampedges = false | |||
) | [pure virtual] |
Blit a region from a Texture using a scaler.
Implemented in SoftRenderSurface< uintX >.
Referenced by ScalerGump::DoScalerBlit().
virtual void RenderSurface::SetClippingRect | ( | const Pentagram::Rect & | ) | [pure virtual] |
Set Clipping Rectangle.
Implemented in BaseSoftRenderSurface.
Referenced by Gump::Paint(), PentagramMenuGump::PaintChildren(), and Gump::PaintCompositing().
virtual void RenderSurface::SetFlipped | ( | bool | flipped | ) | [pure virtual] |
Flip the surface.
Implemented in BaseSoftRenderSurface.
Referenced by InverterGump::PaintChildren().
Set the Origin of the Surface.
Implemented in BaseSoftRenderSurface.
Referenced by GameMapGump::ConCmd_dumpMap(), Gump::Paint(), and Gump::PaintCompositing().
RenderSurface * RenderSurface::SetVideoMode | ( | uint32 | width, | |
uint32 | height, | |||
uint32 | bpp, | |||
bool | fullscreen, | |||
bool | use_opengl | |||
) | [static] |
Create a standard RenderSurface.
Definition at line 49 of file RenderSurface.cpp.
References Gamma10toGamma22, Gamma22toGamma10, and pout.
Referenced by GUIApp::GraphicSysInit().
virtual void RenderSurface::StretchBlit | ( | Texture * | , | |
sint32 | sx, | |||
sint32 | sy, | |||
sint32 | sw, | |||
sint32 | sh, | |||
sint32 | dx, | |||
sint32 | dy, | |||
sint32 | dw, | |||
sint32 | dh, | |||
bool | bilinear = false , |
|||
bool | clampedges = false | |||
) | [pure virtual] |
Blit a stretched region from a Texture (Alpha == 0 -> skipped???).
Implemented in SoftRenderSurface< uintX >.
Referenced by ScalerGump::DoScalerBlit().
Initial value:
{ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }
Definition at line 65 of file RenderSurface.h.
Referenced by BaseSoftRenderSurface::BaseSoftRenderSurface(), GameMapGump::ConCmd_dumpMap(), GUIApp::CreateHWCursors(), CreateSecondaryRenderSurface(), SoftRenderSurface< uintX >::FillAlpha(), GUIApp::GraphicSysInit(), SoftRenderSurface< uintX >::MaskedBlit(), and Pentagram::Scaler::Scale().
uint8 RenderSurface::Gamma10toGamma22 [static] |
Definition at line 67 of file RenderSurface.h.
Referenced by Manip_32_888A_GC::merge(), Manip_32_A888_GC::merge(), Manip_Sta2Nat_32_GC::merge(), Manip_Sta2Nat_16_GC::merge(), Manip_Nat2Nat_32_GC::merge(), Manip_Nat2Nat_16_GC::merge(), MiniMapGump::sampleAtPoint(), and SetVideoMode().
uint8 RenderSurface::Gamma22toGamma10 [static] |
Definition at line 68 of file RenderSurface.h.
Referenced by MiniMapGump::sampleAtPoint(), SetVideoMode(), Manip_32_888A_GC::split(), Manip_32_A888_GC::split(), Manip_Sta2Nat_32_GC::split(), Manip_Sta2Nat_16_GC::split(), Manip_Nat2Nat_32_GC::split(), and Manip_Nat2Nat_16_GC::split().