#include <C4DefGraphics.h>
Public Types | |
enum | Mode { MODE_None =0 , MODE_Base =1 , MODE_Action =2 , MODE_Picture =3 , MODE_IngamePicture =4 , MODE_Object =5 , MODE_ExtraGraphics =6 , MODE_Rank =7 , MODE_ObjectPicture =8 } |
Public Member Functions | |
C4GraphicsOverlay () | |
~C4GraphicsOverlay () | |
void | CompileFunc (StdCompiler *pComp) |
void | DenumeratePointers () |
void | SetAsBase (C4DefGraphics *pBaseGfx, DWORD dwBMode) |
void | SetAsAction (C4DefGraphics *pBaseGfx, const char *szAction, DWORD dwBMode) |
void | SetAsPicture (C4DefGraphics *pBaseGfx, DWORD dwBMode) |
void | SetAsIngamePicture (C4DefGraphics *pBaseGfx, DWORD dwBMode) |
void | SetAsObject (C4Object *pOverlayObj, DWORD dwBMode) |
void | SetAsObjectPicture (C4Object *pOverlayObj, DWORD dwBMode) |
void | SetAsExtraGraphics (C4DefGraphics *pGfx, DWORD dwBMode) |
void | SetAsRank (DWORD dwBMode, C4Object *rank_obj) |
bool | IsValid (const C4Object *pForObj) const |
C4DrawTransform * | GetTransform () |
C4Object * | GetOverlayObject () const |
int32_t | GetID () const |
void | SetID (int32_t aID) |
void | SetPhase (int32_t iToPhase) |
C4GraphicsOverlay * | GetNext () const |
void | SetNext (C4GraphicsOverlay *paNext) |
bool | IsPicture () |
C4DefGraphics * | GetGfx () const |
void | Draw (C4TargetFacet &cgo, C4Object *pForObj, int32_t iByPlayer) |
void | DrawPicture (C4Facet &cgo, C4Object *pForObj, C4DrawTransform *trans) |
void | DrawRankSymbol (C4Facet &cgo, C4Object *rank_obj) |
bool | operator== (const C4GraphicsOverlay &rCmp) const |
uint32_t | GetClrModulation () const |
void | SetClrModulation (uint32_t dwToMod) |
uint32_t | GetBlitMode () const |
void | SetBlitMode (uint32_t dwToMode) |
Protected Member Functions | |
void | UpdateFacet () |
void | Set (Mode aMode, C4DefGraphics *pGfx, const char *szAction, DWORD dwBMode, C4Object *pOvrlObj) |
Protected Attributes | |
Mode | eMode {MODE_None} |
C4DefGraphics * | pSourceGfx {nullptr} |
char | Action [C4MaxName+1] |
C4TargetFacet | fctBlit |
StdMeshInstance * | pMeshInstance {nullptr} |
uint32_t | dwBlitMode {0} |
uint32_t | dwClrModulation {0xffffff} |
C4ObjectPtr | OverlayObj |
C4DrawTransform | Transform |
int32_t | iPhase {0} |
bool | fZoomToShape {false} |
int32_t | iID {0} |
C4GraphicsOverlay * | pNext {nullptr} |
Friends | |
class | C4DefGraphicsPtrBackupEntry |
class | C4DefGraphicsPtrBackup |
Definition at line 164 of file C4DefGraphics.h.
Enumerator | |
---|---|
MODE_None | |
MODE_Base | |
MODE_Action | |
MODE_Picture | |
MODE_IngamePicture | |
MODE_Object | |
MODE_ExtraGraphics | |
MODE_Rank | |
MODE_ObjectPicture |
Definition at line 169 of file C4DefGraphics.h.
|
inline |
C4GraphicsOverlay::~C4GraphicsOverlay | ( | ) |
Definition at line 694 of file C4DefGraphics.cpp.
References pMeshInstance, and pNext.
void C4GraphicsOverlay::CompileFunc | ( | StdCompiler * | pComp | ) |
Definition at line 841 of file C4DefGraphics.cpp.
References Action, dwBlitMode, dwClrModulation, eMode, iID, iPhase, StdCompiler::isDeserializer(), mkDefaultAdapt(), mkIntAdapt(), mkStringAdaptMIE(), OverlayObj, pSourceGfx, StdCompiler::SEP_END, StdCompiler::SEP_START, StdCompiler::Separator(), Transform, UpdateFacet(), and StdCompiler::Value().
void C4GraphicsOverlay::DenumeratePointers | ( | ) |
Definition at line 876 of file C4DefGraphics.cpp.
References C4ObjectPtr::DenumeratePointers(), and OverlayObj.
void C4GraphicsOverlay::Draw | ( | C4TargetFacet & | cgo, |
C4Object * | pForObj, | ||
int32_t | iByPlayer | ||
) |
Definition at line 881 of file C4DefGraphics.cpp.
References C4Draw::ActivateBlitModulation(), C4GFXBLIT_PARENT, C4ValueToMatrix(), C4Object::Color, C4Draw::DeactivateBlitModulation(), C4DefGraphics::Draw(), C4Object::Draw(), C4Object::DrawPicture(), DrawRankSymbol(), C4Facet::DrawT(), C4Object::DrawTopFace(), dwBlitMode, dwClrModulation, eMode, fctBlit, fZoomToShape, C4Object::GetDrawPosition(), C4Object::GetGraphics(), C4PropList::GetProperty(), C4DrawTransform::GetXOffset(), C4DrawTransform::GetYOffset(), C4Facet::Hgt, C4Rect::Hgt, iPhase, IsPicture(), MODE_ExtraGraphics, MODE_IngamePicture, MODE_ObjectPicture, MODE_Picture, MODE_Rank, C4Object::ODM_BaseOnly, C4Object::ODM_Overlay, OverlayObj, P_MeshTransformation, C4DefGraphics::pDef, pDraw, C4Object::pDrawTransform, pMeshInstance, pSourceGfx, C4Draw::RenderMesh(), C4Draw::ResetBlitMode(), C4BltTransform::ScaleAt(), C4Facet::Set(), C4TargetFacet::Set(), C4Draw::SetBlitMode(), C4Surface::SetClr(), StdMeshInstance::SetFaceOrderingForClrModulation(), C4Object::SetGraphics(), C4Draw::SetMeshTransform(), C4Def::Shape, C4Object::Shape, C4Facet::Surface, C4TargetFacet::TargetX, C4TargetFacet::TargetY, Transform, C4Facet::Wdt, C4Rect::Wdt, C4Facet::X, C4Rect::x, C4Facet::Y, C4Rect::y, and C4TargetFacet::Zoom.
void C4GraphicsOverlay::DrawPicture | ( | C4Facet & | cgo, |
C4Object * | pForObj, | ||
C4DrawTransform * | trans | ||
) |
Definition at line 1064 of file C4DefGraphics.cpp.
References C4Draw::ActivateBlitModulation(), C4GFXBLIT_PARENT, C4Object::Color, C4Draw::DeactivateBlitModulation(), C4DefGraphics::Draw(), dwBlitMode, dwClrModulation, C4Object::FinishedDrawing(), C4Facet::Hgt, iPhase, IsPicture(), pDraw, pMeshInstance, C4Object::PrepareDrawing(), pSourceGfx, C4Draw::ResetBlitMode(), C4Draw::SetBlitMode(), StdMeshInstance::SetFaceOrderingForClrModulation(), Transform, C4Facet::Wdt, C4Facet::X, and C4Facet::Y.
Definition at line 1043 of file C4DefGraphics.cpp.
References C4Object::Def, DefaultRanks, C4RankSystem::DrawRankSymbol(), C4GraphicsResource::fctRank, C4RankSystem::GetBaseRankNum(), GraphicsResource, C4Object::Info, C4GraphicsResource::iNumRanks, C4Def::iNumRankSymbols, C4Def::pRankNames, C4Def::pRankSymbols, and C4ObjectInfoCore::Rank.
Referenced by Draw().
|
inline |
|
inline |
|
inline |
Definition at line 239 of file C4DefGraphics.h.
References pSourceGfx.
Referenced by C4DefGraphicsPtrBackupEntry::AssignRemoval(), and C4DefGraphicsPtrBackupEntry::AssignUpdate().
|
inline |
Definition at line 233 of file C4DefGraphics.h.
References iID.
Referenced by C4DefGraphicsPtrBackupEntry::AssignRemoval(), C4DefGraphicsPtrBackupEntry::AssignUpdate(), C4Object::GetGraphicsOverlay(), and C4Object::RemoveGraphicsOverlay().
|
inline |
Definition at line 236 of file C4DefGraphics.h.
References pNext.
Referenced by C4DefGraphicsPtrBackupEntry::AssignRemoval(), C4DefGraphicsPtrBackupEntry::AssignUpdate(), C4DefGraphicsPtrBackup::AssignUpdate(), C4Object::CanConcatPictureWith(), C4Object::ClearPointers(), C4GraphicsOverlayListAdapt::CompileFunc(), C4Object::Denumerate(), C4DefGraphics::Draw(), C4Object::Draw(), C4Object::GetGraphicsOverlay(), C4Object::HasGraphicsOverlayRecursion(), C4Object::Picture2Facet(), and C4Object::RemoveGraphicsOverlay().
|
inline |
|
inline |
|
inline |
Definition at line 238 of file C4DefGraphics.h.
References eMode, and MODE_Picture.
Referenced by Draw(), and DrawPicture().
bool C4GraphicsOverlay::IsValid | ( | const C4Object * | pForObj | ) | const |
Definition at line 813 of file C4DefGraphics.cpp.
References eMode, fctBlit, C4Object::HasGraphicsOverlayRecursion(), MODE_ExtraGraphics, MODE_IngamePicture, MODE_Object, MODE_ObjectPicture, MODE_Picture, MODE_Rank, OverlayObj, pMeshInstance, pSourceGfx, C4PropList::Status, C4Facet::Surface, C4DefGraphics::Type, C4DefGraphics::TYPE_Bitmap, and C4DefGraphics::TYPE_Mesh.
bool C4GraphicsOverlay::operator== | ( | const C4GraphicsOverlay & | rCmp | ) | const |
Definition at line 1103 of file C4DefGraphics.cpp.
References Action, dwBlitMode, dwClrModulation, eMode, OverlayObj, pSourceGfx, SEqual(), and Transform.
|
protected |
Definition at line 798 of file C4DefGraphics.cpp.
References Action, C4MaxName, dwBlitMode, eMode, iPhase, OverlayObj, pSourceGfx, SCopy(), and UpdateFacet().
Referenced by SetAsAction(), SetAsBase(), SetAsExtraGraphics(), SetAsIngamePicture(), SetAsObject(), SetAsObjectPicture(), SetAsPicture(), and SetAsRank().
|
inline |
Definition at line 214 of file C4DefGraphics.h.
References MODE_Action, and Set().
|
inline |
|
inline |
Definition at line 224 of file C4DefGraphics.h.
References MODE_ExtraGraphics, and Set().
|
inline |
Definition at line 218 of file C4DefGraphics.h.
References MODE_IngamePicture, and Set().
Definition at line 220 of file C4DefGraphics.h.
References MODE_Object, and Set().
Definition at line 222 of file C4DefGraphics.h.
References MODE_ObjectPicture, and Set().
|
inline |
Definition at line 216 of file C4DefGraphics.h.
References MODE_Picture, and Set().
|
inline |
|
inline |
|
inline |
Definition at line 234 of file C4DefGraphics.h.
References iID.
Referenced by C4Object::GetGraphicsOverlay().
|
inline |
Definition at line 237 of file C4DefGraphics.h.
References pNext.
Referenced by C4GraphicsOverlayListAdapt::CompileFunc(), C4Object::GetGraphicsOverlay(), and C4Object::RemoveGraphicsOverlay().
void C4GraphicsOverlay::SetPhase | ( | int32_t | iToPhase | ) |
|
protected |
Definition at line 708 of file C4DefGraphics.cpp.
References Action, C4TargetFacet::Default(), eMode, fctBlit, ftofix(), fZoomToShape, C4DefGraphics::GetBitmap(), C4String::GetData(), C4PropList::GetProperty(), C4PropList::GetPropertyByS(), C4PropList::GetPropertyInt(), C4PropList::GetPropertyStr(), C4Value::getPropList(), C4Rect::Hgt, iPhase, itofix(), StdMeshAnimation::Length, MODE_Action, MODE_Base, MODE_ExtraGraphics, MODE_IngamePicture, MODE_None, MODE_Object, MODE_ObjectPicture, MODE_Picture, MODE_Rank, P_ActMap, P_Animation, P_Hgt, P_Length, P_Wdt, P_X, P_Y, C4DefGraphics::pDef, StdMeshInstance::PlayAnimation(), pMeshInstance, pSourceGfx, C4StringTable::RegString(), C4TargetFacet::Set(), C4Def::Shape, Strings, C4DefGraphics::Type, C4DefGraphics::TYPE_Bitmap, C4DefGraphics::TYPE_Mesh, C4Rect::Wdt, C4Rect::x, and C4Rect::y.
Referenced by CompileFunc(), and Set().
|
friend |
Definition at line 167 of file C4DefGraphics.h.
|
friend |
Definition at line 166 of file C4DefGraphics.h.
|
protected |
Definition at line 185 of file C4DefGraphics.h.
Referenced by C4GraphicsOverlay(), CompileFunc(), operator==(), Set(), and UpdateFacet().
|
protected |
Definition at line 188 of file C4DefGraphics.h.
Referenced by CompileFunc(), Draw(), DrawPicture(), GetBlitMode(), operator==(), Set(), and SetBlitMode().
|
protected |
Definition at line 189 of file C4DefGraphics.h.
Referenced by CompileFunc(), Draw(), DrawPicture(), GetClrModulation(), operator==(), and SetClrModulation().
Definition at line 182 of file C4DefGraphics.h.
Referenced by CompileFunc(), Draw(), IsPicture(), IsValid(), operator==(), Set(), and UpdateFacet().
|
protected |
Definition at line 186 of file C4DefGraphics.h.
Referenced by Draw(), IsValid(), and UpdateFacet().
|
protected |
Definition at line 193 of file C4DefGraphics.h.
Referenced by Draw(), and UpdateFacet().
|
protected |
Definition at line 195 of file C4DefGraphics.h.
Referenced by CompileFunc(), GetID(), and SetID().
|
protected |
Definition at line 192 of file C4DefGraphics.h.
Referenced by CompileFunc(), Draw(), DrawPicture(), Set(), and UpdateFacet().
|
protected |
Definition at line 190 of file C4DefGraphics.h.
Referenced by CompileFunc(), DenumeratePointers(), Draw(), GetOverlayObject(), IsValid(), operator==(), and Set().
|
protected |
Definition at line 187 of file C4DefGraphics.h.
Referenced by Draw(), DrawPicture(), IsValid(), UpdateFacet(), and ~C4GraphicsOverlay().
|
protected |
Definition at line 197 of file C4DefGraphics.h.
Referenced by GetNext(), SetNext(), and ~C4GraphicsOverlay().
|
protected |
Definition at line 184 of file C4DefGraphics.h.
Referenced by CompileFunc(), Draw(), DrawPicture(), GetGfx(), IsValid(), operator==(), Set(), and UpdateFacet().
|
protected |
Definition at line 191 of file C4DefGraphics.h.
Referenced by CompileFunc(), Draw(), DrawPicture(), GetTransform(), and operator==().