ScummVM API documentation
hpl::cGraphicsDrawer Class Reference

Public Member Functions

 cGraphicsDrawer (iLowLevelGraphics *apLowLevelGraphics, cMaterialHandler *apMaterialHandler, cResources *apResources)
 
void DrawGfxObject (cGfxObject *apObject, const cVector3f &avPos)
 
void DrawGfxObject (cGfxObject *apObject, const cVector3f &avPos, const cVector2f &avSize, const cColor &aColor, bool abFlipH=false, bool abFlipV=false, float afAngle=0)
 
void DrawAll ()
 
cGfxObjectCreateGfxObject (const tString &asFileName, const tString &asMaterialName, bool abAddToList=true)
 
cGfxObjectCreateGfxObject (Bitmap2D *apBmp, const tString &asMaterialName, bool abAddToList=true)
 
cGfxObjectCreateGfxObjectFromTexture (const tString &asFileName, const tString &asMaterialName, bool abAddToList=true)
 
void DestroyGfxObject (cGfxObject *apObject)
 
cBackgroundImageAddBackgroundImage (const tString &asFileName, const tString &asMaterialName, const cVector3f &avPos, bool abTile, const cVector2f &avSize, const cVector2f &avPosPercent, const cVector2f &avVel)
 
void UpdateBackgrounds ()
 
void DrawBackgrounds (const cRect2f &aCollideRect)
 
void ClearBackgrounds ()
 

Member Function Documentation

◆ DrawGfxObject() [1/2]

void hpl::cGraphicsDrawer::DrawGfxObject ( cGfxObject apObject,
const cVector3f avPos 
)

Draw Gfx object during next DrawAll call.

Parameters
apObject
avPos

◆ DrawGfxObject() [2/2]

void hpl::cGraphicsDrawer::DrawGfxObject ( cGfxObject apObject,
const cVector3f avPos,
const cVector2f avSize,
const cColor aColor,
bool  abFlipH = false,
bool  abFlipV = false,
float  afAngle = 0 
)

Draw Gfx object during next DrawAll call.

Parameters
apObject
avPos
avSizeSize of object
aColorcolor to use
abFlipHFlip image horisontally
abFlipVFlip image verically

◆ DrawAll()

void hpl::cGraphicsDrawer::DrawAll ( )

Draw all gfx obejcts, Called after world is rendered by cScene.

◆ CreateGfxObject() [1/2]

cGfxObject* hpl::cGraphicsDrawer::CreateGfxObject ( const tString asFileName,
const tString asMaterialName,
bool  abAddToList = true 
)

Create Gfx object from file

Parameters
&asFileNameFilename of image
&asMaterialNamematerial to use
abAddToListif the engine should delete object at exit, this means DestroyGfxObject must be used. Should almost always be true.
Returns

◆ CreateGfxObject() [2/2]

cGfxObject* hpl::cGraphicsDrawer::CreateGfxObject ( Bitmap2D apBmp,
const tString asMaterialName,
bool  abAddToList = true 
)

Create gfx object from Bitmap

Parameters
*apBmpbitmap
&asMaterialNamematerial to use
abAddToListif the engine should delete object at exit, this means DestroyGfxObject must be used. Should almost always be true.
Returns

◆ DestroyGfxObject()

void hpl::cGraphicsDrawer::DestroyGfxObject ( cGfxObject apObject)

Destroys a gfx object.


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