#include <C4SolidMask.h>
Classes | |
class | DensityProvider |
Public Member Functions | |
void | Put (bool fCauseInstability, C4TargetRect *pClipRect, bool fRestoreAttachment) |
void | Remove (bool fBackupAttachment) |
void | Draw (C4TargetFacet &cgo) |
bool | IsPut () |
C4SolidMask (C4Object *pForObject) | |
~C4SolidMask () | |
void | SetHalfVehicle (bool set) |
Static Public Member Functions | |
static bool | CheckConsistency () |
static void | RemoveSolidMasks () |
static void | PutSolidMasks () |
static CSurface8 * | LoadMaskFromFile (class C4Group &hGroup, const char *szFilename) |
Public Attributes | |
C4SolidMask * | Prev |
C4SolidMask * | Next |
Static Public Attributes | |
static C4SolidMask * | First = nullptr |
static C4SolidMask * | Last = nullptr |
Protected Member Functions | |
void | RemoveTemporary (C4Rect where) |
void | PutTemporary (C4Rect where) |
void | Repair (C4Rect where) |
Protected Attributes | |
bool | MaskPut |
int | MaskPutRotation |
int | MatBuffPitch |
C4Real | MaskRemovalX |
int32_t | MaskRemovalY |
class C4Object ** | ppAttachingObjects |
int | iAttachingObjectsCount |
int | iAttachingObjectsCapacity |
C4TargetRect | MaskPutRect |
BYTE * | pSolidMaskMatBuff |
BYTE | MaskMaterial |
C4Object * | pForObject |
Friends | |
class | C4Landscape |
class | DensityProvider |
Definition at line 25 of file C4SolidMask.h.
C4SolidMask::C4SolidMask | ( | C4Object * | pForObject | ) |
Definition at line 408 of file C4SolidMask.cpp.
References First, Fix0, C4Rect::Hgt, iAttachingObjectsCapacity, iAttachingObjectsCount, Last, MaskMaterial, MaskPut, MaskPutRotation, MaskRemovalX, MaskRemovalY, MatBuffPitch, MCVehic, Next, pForObject, ppAttachingObjects, Prev, pSolidMaskMatBuff, C4Object::SolidMask, and C4Rect::Wdt.
C4SolidMask::~C4SolidMask | ( | ) |
Definition at line 431 of file C4SolidMask.cpp.
References First, Last, Next, ppAttachingObjects, Prev, pSolidMaskMatBuff, and Remove().
|
static |
Definition at line 468 of file C4SolidMask.cpp.
References First, C4Landscape::GetHeight(), C4Landscape::GetMatCount(), C4Landscape::GetWidth(), Landscape, Last, MVehic, Next, Prev, PutTemporary(), RemoveTemporary(), and SOLIDMASK_DEBUG.
Referenced by C4Landscape::DoRelights(), C4Landscape::P::FinishChange(), Put(), and Remove().
void C4SolidMask::Draw | ( | C4TargetFacet & | cgo | ) |
Definition at line 330 of file C4SolidMask.cpp.
References C4Facet::DrawX(), C4Facet::DrawXR(), C4DefGraphics::GetBitmap(), C4Object::GetGraphics(), C4Object::GetX(), C4Object::GetY(), C4Facet::Hgt, C4Rect::Hgt, MaskPut, MaskPutRotation, pForObject, C4Facet::Set(), C4Object::Shape, C4Object::SolidMask, C4Facet::Surface, C4TargetFacet::TargetX, C4TargetFacet::TargetY, C4TargetRect::tx, C4TargetRect::ty, C4Facet::Wdt, C4Rect::Wdt, C4Facet::X, C4Rect::x, C4Facet::Y, and C4Rect::y.
Referenced by C4Object::DrawSolidMask().
|
inline |
|
static |
Definition at line 488 of file C4SolidMask.cpp.
References StdBuf::getMData(), CPNGFile::GetPix(), StdBuf::getSize(), CPNGFile::iHgt, CPNGFile::iWdt, CPNGFile::Load(), C4Group::LoadEntry(), and CSurface8::SetPix().
void C4SolidMask::Put | ( | bool | fCauseInstability, |
C4TargetRect * | pClipRect, | ||
bool | fRestoreAttachment | ||
) |
Definition at line 32 of file C4SolidMask.cpp.
References C4Landscape::_GetPix(), CSurface8::Bits, CheckConsistency(), C4TargetRect::ClipBy(), C4Shape::ContactCheck(), C4Object::Contained, Cos(), C4Object::Def, Fix0, fixtoi(), C4Game::FrameCounter, Game, C4Object::GetFixedX(), C4Object::GetFixedY(), C4Landscape::GetHeight(), C4Landscape::GetPix(), C4Object::GetR(), C4Object::GetSolidMaskPlane(), C4Landscape::GetWidth(), C4Object::GetX(), C4Object::GetY(), C4Rect::Hgt, iAttachingObjectsCount, C4Object::iLastAttachMovementFrame, C4Object::IsMoveableBySolidMask(), IsSomeVehicle(), itofix(), Landscape, MaskMaterial, MaskPut, MaskPutRect, MaskPutRotation, MaskRemovalX, MaskRemovalY, MatBuffPitch, MCVehic, C4Object::MovePosition(), pForObject, CSurface8::Pitch, ppAttachingObjects, C4Def::pSolidMask, pSolidMaskMatBuff, C4Landscape::SetPix2(), C4Def::Shape, C4Object::Shape, Sin(), C4Object::SolidMask, C4Landscape::Transparent, C4TargetRect::tx, C4TargetRect::ty, C4Rect::Wdt, C4Rect::x, and C4Rect::y.
Referenced by C4Object::UpdateSolidMask().
|
static |
Definition at line 453 of file C4SolidMask.cpp.
References First, C4Landscape::GetHeight(), C4Landscape::GetWidth(), Landscape, Next, and PutTemporary().
Referenced by C4Game::ReloadDef(), C4Landscape::Save(), and C4Landscape::SaveDiff().
|
protected |
Definition at line 365 of file C4SolidMask.cpp.
References C4Landscape::_SetPix2Tmp(), C4Landscape::GetPix(), C4Rect::Hgt, C4Rect::Intersect(), IsSomeVehicle(), Landscape, MaskMaterial, MaskPut, MaskPutRect, MatBuffPitch, pSolidMaskMatBuff, C4Landscape::Transparent, C4TargetRect::tx, C4TargetRect::ty, C4Rect::Wdt, C4Rect::x, and C4Rect::y.
Referenced by CheckConsistency(), C4Landscape::DoRelights(), and PutSolidMasks().
void C4SolidMask::Remove | ( | bool | fBackupAttachment | ) |
Definition at line 241 of file C4SolidMask.cpp.
References C4Landscape::_GetPix(), C4Landscape::_SetPix2(), CheckConsistency(), C4Landscape::CheckInstabilityRange(), CNAT_Bottom, C4LArea::FirstObjectShapes(), C4Object::GetFixedX(), C4Object::GetSolidMaskPlane(), C4Object::GetY(), C4Rect::Hgt, iAttachingObjectsCapacity, iAttachingObjectsCount, C4Object::IsMoveableBySolidMask(), IsSomeVehicle(), Landscape, Last, MaskPut, MaskPutRect, MaskRemovalX, MaskRemovalY, MatBuffPitch, MCVehic, C4LArea::NextObjectShapes(), Objects, pForObject, ppAttachingObjects, Prev, pSolidMaskMatBuff, C4GameObjects::Sectors, C4TargetRect::Set(), C4Landscape::Transparent, C4TargetRect::tx, C4TargetRect::ty, C4Rect::Wdt, C4Rect::x, and C4Rect::y.
Referenced by C4Object::UpdateSolidMask(), and ~C4SolidMask().
|
static |
Definition at line 443 of file C4SolidMask.cpp.
References C4Landscape::GetHeight(), C4Landscape::GetWidth(), Landscape, Last, Prev, and RemoveTemporary().
Referenced by C4Game::ReloadDef(), C4Landscape::Save(), and C4Landscape::SaveDiff().
|
protected |
Definition at line 344 of file C4SolidMask.cpp.
References C4Landscape::_SetPix2Tmp(), C4Landscape::GetPix(), C4Rect::Hgt, C4Rect::Intersect(), IsSomeVehicle(), Landscape, MaskPut, MaskPutRect, MatBuffPitch, pSolidMaskMatBuff, C4Landscape::Transparent, C4TargetRect::tx, C4TargetRect::ty, C4Rect::Wdt, C4Rect::x, and C4Rect::y.
Referenced by CheckConsistency(), C4Landscape::DoRelights(), and RemoveSolidMasks().
|
protected |
Definition at line 386 of file C4SolidMask.cpp.
References C4Landscape::GetPix(), C4Rect::Hgt, C4Rect::Intersect(), IsSomeVehicle(), Landscape, MaskMaterial, MaskPut, MaskPutRect, MatBuffPitch, pSolidMaskMatBuff, C4Landscape::SetPix2(), C4Landscape::Transparent, C4TargetRect::tx, C4TargetRect::ty, C4Rect::Wdt, C4Rect::x, and C4Rect::y.
void C4SolidMask::SetHalfVehicle | ( | bool | set | ) |
Definition at line 503 of file C4SolidMask.cpp.
References MaskMaterial, MCHalfVehic, and MCVehic.
Referenced by C4Object::SetHalfVehicleSolidMask().
|
friend |
Definition at line 66 of file C4SolidMask.h.
|
friend |
Definition at line 67 of file C4SolidMask.h.
|
static |
Definition at line 71 of file C4SolidMask.h.
Referenced by C4SolidMask(), CheckConsistency(), C4Landscape::DoRelights(), C4Landscape::P::FinishChange(), PutSolidMasks(), and ~C4SolidMask().
|
protected |
Definition at line 38 of file C4SolidMask.h.
Referenced by C4SolidMask(), and Remove().
|
protected |
Definition at line 38 of file C4SolidMask.h.
Referenced by C4SolidMask(), Put(), and Remove().
|
static |
Definition at line 72 of file C4SolidMask.h.
Referenced by C4SolidMask(), CheckConsistency(), C4Landscape::DoRelights(), C4Landscape::P::PrepareChange(), Remove(), RemoveSolidMasks(), and ~C4SolidMask().
|
protected |
Definition at line 44 of file C4SolidMask.h.
Referenced by C4SolidMask(), Put(), PutTemporary(), Repair(), and SetHalfVehicle().
|
protected |
Definition at line 28 of file C4SolidMask.h.
Referenced by C4SolidMask(), Draw(), IsPut(), Put(), PutTemporary(), Remove(), RemoveTemporary(), and Repair().
|
protected |
Definition at line 40 of file C4SolidMask.h.
Referenced by C4SolidMask::DensityProvider::GetDensity(), Put(), PutTemporary(), Remove(), RemoveTemporary(), and Repair().
|
protected |
Definition at line 29 of file C4SolidMask.h.
Referenced by C4SolidMask(), Draw(), C4SolidMask::DensityProvider::GetDensity(), and Put().
|
protected |
Definition at line 34 of file C4SolidMask.h.
Referenced by C4SolidMask(), Put(), and Remove().
|
protected |
Definition at line 35 of file C4SolidMask.h.
Referenced by C4SolidMask(), Put(), and Remove().
|
protected |
Definition at line 30 of file C4SolidMask.h.
Referenced by C4SolidMask(), C4SolidMask::DensityProvider::GetDensity(), Put(), PutTemporary(), Remove(), RemoveTemporary(), and Repair().
C4SolidMask* C4SolidMask::Next |
Definition at line 74 of file C4SolidMask.h.
Referenced by C4SolidMask(), CheckConsistency(), C4Landscape::DoRelights(), C4Landscape::P::FinishChange(), PutSolidMasks(), and ~C4SolidMask().
|
protected |
Definition at line 46 of file C4SolidMask.h.
Referenced by C4SolidMask(), Draw(), C4SolidMask::DensityProvider::GetDensity(), Put(), and Remove().
|
protected |
Definition at line 37 of file C4SolidMask.h.
Referenced by C4SolidMask(), Put(), Remove(), and ~C4SolidMask().
C4SolidMask* C4SolidMask::Prev |
Definition at line 73 of file C4SolidMask.h.
Referenced by C4SolidMask(), CheckConsistency(), C4Landscape::DoRelights(), C4Landscape::P::PrepareChange(), Remove(), RemoveSolidMasks(), and ~C4SolidMask().
|
protected |
Definition at line 42 of file C4SolidMask.h.
Referenced by C4SolidMask(), C4SolidMask::DensityProvider::GetDensity(), Put(), PutTemporary(), Remove(), RemoveTemporary(), Repair(), and ~C4SolidMask().