DDraceNetwork Docs
CRenderTools Class Reference

#include <render.h>

Collaboration diagram for CRenderTools:
[legend]

Public Member Functions

class IGraphicsGraphics () const
 
class ITextRenderTextRender () const
 
void Init (class IGraphics *pGraphics, class ITextRender *pTextRender)
 
void SelectSprite (int Id, int Flags=0) const
 
void SelectSprite7 (int Id, int Flags=0) const
 
void GetSpriteScale (const CDataSprite *pSprite, float &ScaleX, float &ScaleY) const
 
void GetSpriteScale (int Id, float &ScaleX, float &ScaleY) const
 
void GetSpriteScaleImpl (int Width, int Height, float &ScaleX, float &ScaleY) const
 
void DrawSprite (float x, float y, float Size) const
 
void DrawSprite (float x, float y, float ScaledWidth, float ScaledHeight) const
 
void RenderCursor (vec2 Center, float Size) const
 
void RenderIcon (int ImageId, int SpriteId, const CUIRect *pRect, const ColorRGBA *pColor=nullptr) const
 
int QuadContainerAddSprite (int QuadContainerIndex, float x, float y, float Size) const
 
int QuadContainerAddSprite (int QuadContainerIndex, float Size) const
 
int QuadContainerAddSprite (int QuadContainerIndex, float Width, float Height) const
 
int QuadContainerAddSprite (int QuadContainerIndex, float X, float Y, float Width, float Height) const
 
void RenderTee (const CAnimState *pAnim, const CTeeRenderInfo *pInfo, int Emote, vec2 Dir, vec2 Pos, float Alpha=1.0f) const
 
void RenderQuads (CQuad *pQuads, int NumQuads, int Flags, ENVELOPE_EVAL pfnEval, void *pUser) const
 
void ForceRenderQuads (CQuad *pQuads, int NumQuads, int Flags, ENVELOPE_EVAL pfnEval, void *pUser, float Alpha=1.0f) const
 
void RenderTilemap (CTile *pTiles, int w, int h, float Scale, ColorRGBA Color, int RenderFlags) const
 
void RenderTileRectangle (int RectX, int RectY, int RectW, int RectH, unsigned char IndexIn, unsigned char IndexOut, float Scale, ColorRGBA Color, int RenderFlags) const
 
void RenderTile (int x, int y, unsigned char Index, float Scale, ColorRGBA Color) const
 
void CalcScreenParams (float Aspect, float Zoom, float *pWidth, float *pHeight)
 
void MapScreenToWorld (float CenterX, float CenterY, float ParallaxX, float ParallaxY, float ParallaxZoom, float OffsetX, float OffsetY, float Aspect, float Zoom, float *pPoints)
 
void MapScreenToGroup (float CenterX, float CenterY, CMapItemGroup *pGroup, float Zoom)
 
void MapScreenToInterface (float CenterX, float CenterY)
 
void RenderTeleOverlay (CTeleTile *pTele, int w, int h, float Scale, float Alpha=1.0f) const
 
void RenderSpeedupOverlay (CSpeedupTile *pSpeedup, int w, int h, float Scale, float Alpha=1.0f) const
 
void RenderSwitchOverlay (CSwitchTile *pSwitch, int w, int h, float Scale, float Alpha=1.0f) const
 
void RenderTuneOverlay (CTuneTile *pTune, int w, int h, float Scale, float Alpha=1.0f) const
 
void RenderTelemap (CTeleTile *pTele, int w, int h, float Scale, ColorRGBA Color, int RenderFlags) const
 
void RenderSpeedupmap (CSpeedupTile *pSpeedup, int w, int h, float Scale, ColorRGBA Color, int RenderFlags) const
 
void RenderSwitchmap (CSwitchTile *pSwitch, int w, int h, float Scale, ColorRGBA Color, int RenderFlags) const
 
void RenderTunemap (CTuneTile *pTune, int w, int h, float Scale, ColorRGBA Color, int RenderFlags) const
 

Static Public Member Functions

static void GetRenderTeeBodySize (const CAnimState *pAnim, const CTeeRenderInfo *pInfo, vec2 &BodyOffset, float &Width, float &Height)
 
static void GetRenderTeeFeetSize (const CAnimState *pAnim, const CTeeRenderInfo *pInfo, vec2 &FeetOffset, float &Width, float &Height)
 
static void GetRenderTeeAnimScaleAndBaseSize (const CTeeRenderInfo *pInfo, float &AnimScale, float &BaseSize)
 
static void GetRenderTeeOffsetToRenderedTee (const CAnimState *pAnim, const CTeeRenderInfo *pInfo, vec2 &TeeOffsetToMid)
 
static void RenderEvalEnvelope (const IEnvelopePointAccess *pPoints, std::chrono::nanoseconds TimeNanos, ColorRGBA &Result, size_t Channels)
 

Private Member Functions

void SelectSprite (const CDataSprite *pSprite, int Flags) const
 
void RenderTee6 (const CAnimState *pAnim, const CTeeRenderInfo *pInfo, int Emote, vec2 Dir, vec2 Pos, float Alpha=1.0f) const
 
void RenderTee7 (const CAnimState *pAnim, const CTeeRenderInfo *pInfo, int Emote, vec2 Dir, vec2 Pos, float Alpha=1.0f) const
 

Static Private Member Functions

static void GetRenderTeeBodyScale (float BaseSize, float &BodyScale)
 
static void GetRenderTeeFeetScale (float BaseSize, float &FeetScaleWidth, float &FeetScaleHeight)
 

Private Attributes

class IGraphicsm_pGraphics
 
class ITextRenderm_pTextRender
 
int m_TeeQuadContainerIndex
 

Member Function Documentation

◆ CalcScreenParams()

void CRenderTools::CalcScreenParams ( float  Aspect,
float  Zoom,
float *  pWidth,
float *  pHeight 
)

◆ DrawSprite() [1/2]

void CRenderTools::DrawSprite ( float  x,
float  y,
float  ScaledWidth,
float  ScaledHeight 
) const

◆ DrawSprite() [2/2]

void CRenderTools::DrawSprite ( float  x,
float  y,
float  Size 
) const

◆ ForceRenderQuads()

void CRenderTools::ForceRenderQuads ( CQuad pQuads,
int  NumQuads,
int  Flags,
ENVELOPE_EVAL  pfnEval,
void *  pUser,
float  Alpha = 1.0f 
) const

◆ GetRenderTeeAnimScaleAndBaseSize()

void CRenderTools::GetRenderTeeAnimScaleAndBaseSize ( const CTeeRenderInfo pInfo,
float &  AnimScale,
float &  BaseSize 
)
static

◆ GetRenderTeeBodyScale()

void CRenderTools::GetRenderTeeBodyScale ( float  BaseSize,
float &  BodyScale 
)
staticprivate

◆ GetRenderTeeBodySize()

void CRenderTools::GetRenderTeeBodySize ( const CAnimState pAnim,
const CTeeRenderInfo pInfo,
vec2 BodyOffset,
float &  Width,
float &  Height 
)
static

◆ GetRenderTeeFeetScale()

void CRenderTools::GetRenderTeeFeetScale ( float  BaseSize,
float &  FeetScaleWidth,
float &  FeetScaleHeight 
)
staticprivate

◆ GetRenderTeeFeetSize()

void CRenderTools::GetRenderTeeFeetSize ( const CAnimState pAnim,
const CTeeRenderInfo pInfo,
vec2 FeetOffset,
float &  Width,
float &  Height 
)
static

◆ GetRenderTeeOffsetToRenderedTee()

void CRenderTools::GetRenderTeeOffsetToRenderedTee ( const CAnimState pAnim,
const CTeeRenderInfo pInfo,
vec2 TeeOffsetToMid 
)
static

◆ GetSpriteScale() [1/2]

void CRenderTools::GetSpriteScale ( const CDataSprite pSprite,
float &  ScaleX,
float &  ScaleY 
) const

◆ GetSpriteScale() [2/2]

void CRenderTools::GetSpriteScale ( int  Id,
float &  ScaleX,
float &  ScaleY 
) const

◆ GetSpriteScaleImpl()

void CRenderTools::GetSpriteScaleImpl ( int  Width,
int  Height,
float &  ScaleX,
float &  ScaleY 
) const

◆ Graphics()

class IGraphics * CRenderTools::Graphics ( ) const
inline

◆ Init()

void CRenderTools::Init ( class IGraphics pGraphics,
class ITextRender pTextRender 
)

◆ MapScreenToGroup()

void CRenderTools::MapScreenToGroup ( float  CenterX,
float  CenterY,
CMapItemGroup pGroup,
float  Zoom 
)

◆ MapScreenToInterface()

void CRenderTools::MapScreenToInterface ( float  CenterX,
float  CenterY 
)

◆ MapScreenToWorld()

void CRenderTools::MapScreenToWorld ( float  CenterX,
float  CenterY,
float  ParallaxX,
float  ParallaxY,
float  ParallaxZoom,
float  OffsetX,
float  OffsetY,
float  Aspect,
float  Zoom,
float *  pPoints 
)

◆ QuadContainerAddSprite() [1/4]

int CRenderTools::QuadContainerAddSprite ( int  QuadContainerIndex,
float  Size 
) const

◆ QuadContainerAddSprite() [2/4]

int CRenderTools::QuadContainerAddSprite ( int  QuadContainerIndex,
float  Width,
float  Height 
) const

◆ QuadContainerAddSprite() [3/4]

int CRenderTools::QuadContainerAddSprite ( int  QuadContainerIndex,
float  x,
float  y,
float  Size 
) const

◆ QuadContainerAddSprite() [4/4]

int CRenderTools::QuadContainerAddSprite ( int  QuadContainerIndex,
float  X,
float  Y,
float  Width,
float  Height 
) const

◆ RenderCursor()

void CRenderTools::RenderCursor ( vec2  Center,
float  Size 
) const

◆ RenderEvalEnvelope()

void CRenderTools::RenderEvalEnvelope ( const IEnvelopePointAccess pPoints,
std::chrono::nanoseconds  TimeNanos,
ColorRGBA Result,
size_t  Channels 
)
static

◆ RenderIcon()

void CRenderTools::RenderIcon ( int  ImageId,
int  SpriteId,
const CUIRect pRect,
const ColorRGBA pColor = nullptr 
) const

◆ RenderQuads()

void CRenderTools::RenderQuads ( CQuad pQuads,
int  NumQuads,
int  Flags,
ENVELOPE_EVAL  pfnEval,
void *  pUser 
) const

◆ RenderSpeedupmap()

void CRenderTools::RenderSpeedupmap ( CSpeedupTile pSpeedup,
int  w,
int  h,
float  Scale,
ColorRGBA  Color,
int  RenderFlags 
) const

◆ RenderSpeedupOverlay()

void CRenderTools::RenderSpeedupOverlay ( CSpeedupTile pSpeedup,
int  w,
int  h,
float  Scale,
float  Alpha = 1.0f 
) const

◆ RenderSwitchmap()

void CRenderTools::RenderSwitchmap ( CSwitchTile pSwitch,
int  w,
int  h,
float  Scale,
ColorRGBA  Color,
int  RenderFlags 
) const

◆ RenderSwitchOverlay()

void CRenderTools::RenderSwitchOverlay ( CSwitchTile pSwitch,
int  w,
int  h,
float  Scale,
float  Alpha = 1.0f 
) const

◆ RenderTee()

void CRenderTools::RenderTee ( const CAnimState pAnim,
const CTeeRenderInfo pInfo,
int  Emote,
vec2  Dir,
vec2  Pos,
float  Alpha = 1.0f 
) const

◆ RenderTee6()

void CRenderTools::RenderTee6 ( const CAnimState pAnim,
const CTeeRenderInfo pInfo,
int  Emote,
vec2  Dir,
vec2  Pos,
float  Alpha = 1.0f 
) const
private

◆ RenderTee7()

void CRenderTools::RenderTee7 ( const CAnimState pAnim,
const CTeeRenderInfo pInfo,
int  Emote,
vec2  Dir,
vec2  Pos,
float  Alpha = 1.0f 
) const
private

◆ RenderTelemap()

void CRenderTools::RenderTelemap ( CTeleTile pTele,
int  w,
int  h,
float  Scale,
ColorRGBA  Color,
int  RenderFlags 
) const

◆ RenderTeleOverlay()

void CRenderTools::RenderTeleOverlay ( CTeleTile pTele,
int  w,
int  h,
float  Scale,
float  Alpha = 1.0f 
) const

◆ RenderTile()

void CRenderTools::RenderTile ( int  x,
int  y,
unsigned char  Index,
float  Scale,
ColorRGBA  Color 
) const

◆ RenderTilemap()

void CRenderTools::RenderTilemap ( CTile pTiles,
int  w,
int  h,
float  Scale,
ColorRGBA  Color,
int  RenderFlags 
) const

◆ RenderTileRectangle()

void CRenderTools::RenderTileRectangle ( int  RectX,
int  RectY,
int  RectW,
int  RectH,
unsigned char  IndexIn,
unsigned char  IndexOut,
float  Scale,
ColorRGBA  Color,
int  RenderFlags 
) const

◆ RenderTunemap()

void CRenderTools::RenderTunemap ( CTuneTile pTune,
int  w,
int  h,
float  Scale,
ColorRGBA  Color,
int  RenderFlags 
) const

◆ RenderTuneOverlay()

void CRenderTools::RenderTuneOverlay ( CTuneTile pTune,
int  w,
int  h,
float  Scale,
float  Alpha = 1.0f 
) const

◆ SelectSprite() [1/2]

void CRenderTools::SelectSprite ( const CDataSprite pSprite,
int  Flags 
) const
private

◆ SelectSprite() [2/2]

void CRenderTools::SelectSprite ( int  Id,
int  Flags = 0 
) const

◆ SelectSprite7()

void CRenderTools::SelectSprite7 ( int  Id,
int  Flags = 0 
) const

◆ TextRender()

class ITextRender * CRenderTools::TextRender ( ) const
inline

Member Data Documentation

◆ m_pGraphics

class IGraphics* CRenderTools::m_pGraphics
private

◆ m_pTextRender

class ITextRender* CRenderTools::m_pTextRender
private

◆ m_TeeQuadContainerIndex

int CRenderTools::m_TeeQuadContainerIndex
private

The documentation for this class was generated from the following files: