#include <C4Landscape.h>
Classes | |
struct | P |
Public Member Functions | |
C4Landscape () | |
~C4Landscape () | |
void | Default () |
void | Clear (bool fClearMapCreator=true, bool fClearSky=true, bool fClearRenderer=true) |
void | Execute () |
void | Synchronize () |
void | Draw (C4TargetFacet &cgo, class C4FoWRegion *pLight=nullptr) |
void | ScenarioInit () |
void | DrawMaterialRect (int32_t mat, int32_t tx, int32_t ty, int32_t wdt, int32_t hgt) |
void | RaiseTerrain (int32_t tx, int32_t ty, int32_t wdt) |
void | FindMatTop (int32_t mat, int32_t &x, int32_t &y, bool distant_first) const |
BYTE | GetMapIndex (int32_t iX, int32_t iY) const |
BYTE | GetBackMapIndex (int32_t iX, int32_t iY) const |
bool | Load (C4Group &hGroup, bool fLoadSky, bool fSavegame) |
bool | Save (C4Group &hGroup) const |
bool | SaveDiff (C4Group &hGroup, bool fSyncSave) const |
bool | SaveMap (C4Group &hGroup) const |
bool | SaveInitial () |
bool | SaveTextures (C4Group &hGroup) const |
bool | Init (C4Group &hGroup, bool fOverloadCurrent, bool fLoadSky, bool &rfLoaded, bool fSavegame) |
bool | HasMap () const |
bool | MapToLandscape () |
bool | ApplyDiff (C4Group &hGroup) |
void | SetMode (LandscapeMode iMode) |
LandscapeMode | GetMode () const |
bool | SetPix2 (int32_t x, int32_t y, BYTE fgPix, BYTE bgPix) |
bool | _SetPix2 (int32_t x, int32_t y, BYTE fgPix, BYTE bgPix) |
void | _SetPix2Tmp (int32_t x, int32_t y, BYTE fgPix, BYTE bgPix) |
bool | InsertMaterialOutsideLandscape (int32_t tx, int32_t ty, int32_t mdens) |
bool | InsertMaterial (int32_t mat, int32_t *tx, int32_t *ty, int32_t vx=0, int32_t vy=0, bool query_only=false) |
bool | InsertDeadMaterial (int32_t mat, int32_t tx, int32_t ty) |
bool | FindMatPath (int32_t &fx, int32_t &fy, int32_t ydir, int32_t mdens, int32_t mslide) const |
bool | FindMatSlide (int32_t &fx, int32_t &fy, int32_t ydir, int32_t mdens, int32_t mslide) const |
bool | FindMatPathPush (int32_t &fx, int32_t &fy, int32_t mdens, int32_t mslide, bool liquid) const |
bool | Incinerate (int32_t x, int32_t y, int32_t cause_player) |
bool | DrawBrush (int32_t iX, int32_t iY, int32_t iGrade, const char *szMaterial, const char *szTexture, const char *szBackMaterial, const char *szBackTexture) |
bool | DrawLine (int32_t iX1, int32_t iY1, int32_t iX2, int32_t iY2, int32_t iGrade, const char *szMaterial, const char *szTexture, const char *szBackMaterial, const char *szBackTexture) |
bool | DrawBox (int32_t iX1, int32_t iY1, int32_t iX2, int32_t iY2, int32_t iGrade, const char *szMaterial, const char *szTexture, const char *szBackMaterial, const char *szBackTexture) |
bool | DrawChunks (int32_t tx, int32_t ty, int32_t wdt, int32_t hgt, int32_t icntx, int32_t icnty, const char *szMaterial, const char *szTexture, bool bIFT) |
bool | DrawQuad (int32_t iX1, int32_t iY1, int32_t iX2, int32_t iY2, int32_t iX3, int32_t iY3, int32_t iX4, int32_t iY4, const char *szMaterial, const char *szBackMaterial, bool fDrawBridge) |
bool | DrawPolygon (int *vtcs, int length, const char *szMaterial, const char *szBackMaterial, bool fDrawBridge) |
CStdPalette * | GetPal () const |
int32_t | GetWidth () const |
int32_t | GetHeight () const |
int32_t | GetMapZoom () const |
C4Real | GetGravity () const |
void | SetGravity (C4Real g) |
BYTE | _GetPix (int32_t x, int32_t y) const |
BYTE | GetPix (int32_t x, int32_t y) const |
int32_t | _GetMat (int32_t x, int32_t y) const |
int32_t | _GetDensity (int32_t x, int32_t y) const |
int32_t | _GetPlacement (int32_t x, int32_t y) const |
int32_t | GetMat (int32_t x, int32_t y) const |
int32_t | GetDensity (int32_t x, int32_t y) const |
int32_t | GetPlacement (int32_t x, int32_t y) const |
BYTE | _GetBackPix (int32_t x, int32_t y) const |
BYTE | GetBackPix (int32_t x, int32_t y) const |
int32_t | _GetBackMat (int32_t x, int32_t y) const |
int32_t | _GetBackDensity (int32_t x, int32_t y) const |
int32_t | _GetBackPlacement (int32_t x, int32_t y) const |
int32_t | GetBackMat (int32_t x, int32_t y) const |
int32_t | GetBackDensity (int32_t x, int32_t y) const |
int32_t | GetBackPlacement (int32_t x, int32_t y) const |
bool | GetLight (int32_t x, int32_t y) |
bool | _GetLight (int32_t x, int32_t y) |
bool | _FastSolidCheck (int32_t x, int32_t y) const |
int32_t | GetPixMat (BYTE byPix) const |
int32_t | GetPixDensity (BYTE byPix) const |
bool | _PathFree (int32_t x, int32_t y, int32_t x2, int32_t y2) const |
int32_t | GetMatHeight (int32_t x, int32_t y, int32_t iYDir, int32_t iMat, int32_t iMax) const |
int32_t | AreaSolidCount (int32_t x, int32_t y, int32_t wdt, int32_t hgt) const |
int32_t | ExtractMaterial (int32_t fx, int32_t fy, bool distant_first) |
bool | DrawMap (int32_t iX, int32_t iY, int32_t iWdt, int32_t iHgt, const char *szMapDef, bool ignoreSky=false) |
bool | ClipRect (int32_t &rX, int32_t &rY, int32_t &rWdt, int32_t &rHgt) const |
bool | DrawDefMap (int32_t iX, int32_t iY, int32_t iWdt, int32_t iHgt, const char *szMapDef, bool ignoreSky=false) |
bool | SetModulation (DWORD dwWithClr) |
DWORD | GetModulation () const |
bool | PostInitMap () |
bool | ReplaceMapColor (BYTE iOldIndex, BYTE iNewIndex) |
bool | SetTextureIndex (const char *szMatTex, BYTE iNewIndex, bool fInsert) |
void | SetMapChanged () |
void | HandleTexMapUpdate () |
void | UpdatePixMaps () |
bool | DoRelights () |
void | RemoveUnusedTexMapEntries () |
class C4Sky & | GetSky () |
bool | HasFoW () const |
class C4FoW * | GetFoW () |
int32_t | GetMatCount (int material) const |
int32_t | GetEffectiveMatCount (int material) const |
int32_t | DigFreeShape (int *vtcs, int length, C4Object *by_object=nullptr, bool no_dig2objects=false, bool no_instability_check=false) |
void | BlastFreeShape (int *vtcs, int length, C4Object *by_object=nullptr, int32_t by_player=NO_OWNER, int32_t iMaxDensity=C4M_Vehicle) |
void | ClearFreeRect (int32_t tx, int32_t ty, int32_t wdt, int32_t hgt) |
int32_t | DigFreeRect (int32_t tx, int32_t ty, int32_t wdt, int32_t hgt, C4Object *by_object=nullptr, bool no_dig2objects=false, bool no_instability_check=false) |
int32_t | DigFree (int32_t tx, int32_t ty, int32_t rad, C4Object *by_object=nullptr, bool no_dig2objects=false, bool no_instability_check=false) |
void | ShakeFree (int32_t tx, int32_t ty, int32_t rad) |
void | BlastFree (int32_t tx, int32_t ty, int32_t rad, int32_t caused_by=NO_OWNER, C4Object *by_object=nullptr, int32_t iMaxDensity=C4M_Vehicle) |
void | CheckInstabilityRange (int32_t tx, int32_t ty) |
bool | CheckInstability (int32_t tx, int32_t ty, int32_t recursion_count=0) |
bool | ClearPix (int32_t tx, int32_t ty) |
void | ClearPointers (C4Object *pObj) |
void | CompileFunc (StdCompiler *pComp) |
Static Public Member Functions | |
static int32_t | FastSolidCheckNextX (int32_t x) |
Static Public Attributes | |
static const uint8_t | Transparent = C4M_MaxTexIndex |
Definition at line 37 of file C4Landscape.h.
C4Landscape::C4Landscape | ( | ) |
Definition at line 189 of file C4Landscape.cpp.
References Default().
C4Landscape::~C4Landscape | ( | ) |
Definition at line 195 of file C4Landscape.cpp.
References Clear().
bool C4Landscape::_FastSolidCheck | ( | int32_t | x, |
int32_t | y | ||
) | const |
Definition at line 3823 of file C4Landscape.cpp.
References CPolyEdge::x, and CPolyEdge::y.
Referenced by C4FoWLightSection::Update().
int32_t C4Landscape::_GetBackDensity | ( | int32_t | x, |
int32_t | y | ||
) | const |
Definition at line 3788 of file C4Landscape.cpp.
References _GetBackPix(), CPolyEdge::x, and CPolyEdge::y.
int32_t C4Landscape::_GetBackMat | ( | int32_t | x, |
int32_t | y | ||
) | const |
Definition at line 3783 of file C4Landscape.cpp.
References _GetBackPix(), CPolyEdge::x, and CPolyEdge::y.
BYTE C4Landscape::_GetBackPix | ( | int32_t | x, |
int32_t | y | ||
) | const |
Definition at line 3752 of file C4Landscape.cpp.
References BREAKPOINT_HERE, CPolyEdge::x, and CPolyEdge::y.
Referenced by _GetBackDensity(), _GetBackMat(), _GetBackPlacement(), and _GetLight().
int32_t C4Landscape::_GetBackPlacement | ( | int32_t | x, |
int32_t | y | ||
) | const |
Definition at line 3793 of file C4Landscape.cpp.
References _GetBackPix(), CPolyEdge::x, and CPolyEdge::y.
int32_t C4Landscape::_GetDensity | ( | int32_t | x, |
int32_t | y | ||
) | const |
Definition at line 3727 of file C4Landscape.cpp.
References _GetPix(), CPolyEdge::x, and CPolyEdge::y.
Referenced by C4Landscape::P::UpdatePixCnt().
bool C4Landscape::_GetLight | ( | int32_t | x, |
int32_t | y | ||
) |
Definition at line 3818 of file C4Landscape.cpp.
References _GetBackPix(), _GetPix(), CPolyEdge::x, and CPolyEdge::y.
int32_t C4Landscape::_GetMat | ( | int32_t | x, |
int32_t | y | ||
) | const |
Definition at line 3722 of file C4Landscape.cpp.
References _GetPix(), CPolyEdge::x, and CPolyEdge::y.
Referenced by C4Landscape::P::DoScan(), C4Landscape::P::ExecuteScan(), GetMatHeight(), InsertDeadMaterial(), and C4Landscape::P::UpdateMatCnt().
BYTE C4Landscape::_GetPix | ( | int32_t | x, |
int32_t | y | ||
) | const |
Definition at line 3691 of file C4Landscape.cpp.
References BREAKPOINT_HERE, CPolyEdge::x, and CPolyEdge::y.
Referenced by _GetDensity(), _GetLight(), _GetMat(), _GetPlacement(), _SetPix2(), C4Landscape::P::DoScan(), InsertDeadMaterial(), C4SolidMask::Put(), C4SolidMask::Remove(), SetPix2(), and C4LandscapeRenderGL::Update().
int32_t C4Landscape::_GetPlacement | ( | int32_t | x, |
int32_t | y | ||
) | const |
Definition at line 3732 of file C4Landscape.cpp.
References _GetPix(), CPolyEdge::x, and CPolyEdge::y.
Referenced by C4LandscapeRenderGL::Update().
bool C4Landscape::_PathFree | ( | int32_t | x, |
int32_t | y, | ||
int32_t | x2, | ||
int32_t | y2 | ||
) | const |
Definition at line 798 of file C4Landscape.cpp.
References _GetPix(), AddDbgRec(), C4RCSetPix::bgClr, C4LS_MaxRelights, C4RCSetPix::clr, Config, C4ConfigGeneral::DebugRec, C4Config::General, GetHeight(), GetMatHeight(), GetWidth(), C4MaterialMap::Map, MaterialMap, MatValid(), C4MaterialCore::MinHeightCount, RCT_SetPix, Transparent, C4RCSetPix::x, and C4RCSetPix::y.
Referenced by C4TextureShape::Draw(), C4SolidMask::Remove(), and SetPix2().
Definition at line 886 of file C4Landscape.cpp.
References GetHeight(), GetWidth(), and Transparent.
Referenced by C4SolidMask::PutTemporary(), and C4SolidMask::RemoveTemporary().
bool C4Landscape::ApplyDiff | ( | C4Group & | hGroup | ) |
Definition at line 1901 of file C4Landscape.cpp.
int32_t C4Landscape::AreaSolidCount | ( | int32_t | x, |
int32_t | y, | ||
int32_t | wdt, | ||
int32_t | hgt | ||
) | const |
Definition at line 3328 of file C4Landscape.cpp.
References GBackSolid(), CPolyEdge::x, and CPolyEdge::y.
Referenced by ConstructionCheck().
void C4Landscape::BlastFree | ( | int32_t | tx, |
int32_t | ty, | ||
int32_t | rad, | ||
int32_t | caused_by = NO_OWNER , |
||
C4Object * | by_object = nullptr , |
||
int32_t | iMaxDensity = C4M_Vehicle |
||
) |
Definition at line 507 of file C4Landscape.cpp.
void C4Landscape::BlastFreeShape | ( | int * | vtcs, |
int | length, | ||
C4Object * | by_object = nullptr , |
||
int32_t | by_player = NO_OWNER , |
||
int32_t | iMaxDensity = C4M_Vehicle |
||
) |
Definition at line 597 of file C4Landscape.cpp.
bool C4Landscape::CheckInstability | ( | int32_t | tx, |
int32_t | ty, | ||
int32_t | recursion_count = 0 |
||
) |
Definition at line 894 of file C4Landscape.cpp.
References ClearPix(), C4PXSSystem::Create(), C4MassMoverSet::Create(), C4MaterialCore::Density, DensitySolid(), C4MaterialCore::DigFree, GBackSolid(), GetMat(), C4MaterialCore::Instable, itofix(), C4MaterialCore::KeepSinglePixels, C4MaterialMap::Map, MassMover, MaterialMap, MatValid(), and PXS.
Referenced by CheckInstabilityRange().
void C4Landscape::CheckInstabilityRange | ( | int32_t | tx, |
int32_t | ty | ||
) |
Definition at line 921 of file C4Landscape.cpp.
References CheckInstability().
Referenced by C4Landscape::P::BlastFreePix(), C4Landscape::P::DigFreePix(), C4Landscape::P::DoScan(), ExtractMaterial(), C4SolidMask::Remove(), and C4Landscape::P::ShakeFreePix().
void C4Landscape::Clear | ( | bool | fClearMapCreator = true , |
bool | fClearSky = true , |
||
bool | fClearRenderer = true |
||
) |
Definition at line 1357 of file C4Landscape.cpp.
References Undefined.
Referenced by C4Game::Clear(), and ~C4Landscape().
void C4Landscape::ClearFreeRect | ( | int32_t | tx, |
int32_t | ty, | ||
int32_t | wdt, | ||
int32_t | hgt | ||
) |
Definition at line 486 of file C4Landscape.cpp.
bool C4Landscape::ClearPix | ( | int32_t | tx, |
int32_t | ty | ||
) |
Definition at line 774 of file C4Landscape.cpp.
References SetPix2().
Referenced by C4Landscape::P::BlastFreePix(), CheckInstability(), C4Landscape::P::DigFreePix(), C4Landscape::P::DigFreePixNoInstability(), ExtractMaterial(), C4MaterialMap::mrfCorrode(), and C4Landscape::P::ShakeFreePix().
void C4Landscape::ClearPointers | ( | C4Object * | pObj | ) |
Definition at line 781 of file C4Landscape.cpp.
Referenced by C4Game::ClearPointers().
bool C4Landscape::ClipRect | ( | int32_t & | rX, |
int32_t & | rY, | ||
int32_t & | rWdt, | ||
int32_t & | rHgt | ||
) | const |
Definition at line 4027 of file C4Landscape.cpp.
References GetHeight(), and GetWidth().
Referenced by DrawDefMap(), and DrawMap().
void C4Landscape::CompileFunc | ( | StdCompiler * | pComp | ) |
Definition at line 1390 of file C4Landscape.cpp.
References DefaultGravAccel, StdCompiler::isDeserializer(), mkCastIntAdapt(), mkNamingAdapt(), Undefined, and StdCompiler::Value().
void C4Landscape::Default | ( | ) |
Definition at line 1926 of file C4Landscape.cpp.
Referenced by C4Landscape(), and C4Game::Default().
int32_t C4Landscape::DigFree | ( | int32_t | tx, |
int32_t | ty, | ||
int32_t | rad, | ||
C4Object * | by_object = nullptr , |
||
bool | no_dig2objects = false , |
||
bool | no_instability_check = false |
||
) |
Definition at line 501 of file C4Landscape.cpp.
int32_t C4Landscape::DigFreeRect | ( | int32_t | tx, |
int32_t | ty, | ||
int32_t | wdt, | ||
int32_t | hgt, | ||
C4Object * | by_object = nullptr , |
||
bool | no_dig2objects = false , |
||
bool | no_instability_check = false |
||
) |
Definition at line 495 of file C4Landscape.cpp.
Referenced by C4Game::CreateObjectConstruction().
int32_t C4Landscape::DigFreeShape | ( | int * | vtcs, |
int | length, | ||
C4Object * | by_object = nullptr , |
||
bool | no_dig2objects = false , |
||
bool | no_instability_check = false |
||
) |
Definition at line 554 of file C4Landscape.cpp.
bool C4Landscape::DoRelights | ( | ) |
Definition at line 390 of file C4Landscape.cpp.
References C4LS_MaxRelights, C4SolidMask::CheckConsistency(), C4SolidMask::First, C4SolidMask::Last, C4SolidMask::Next, C4SolidMask::Prev, C4SolidMask::PutTemporary(), and C4SolidMask::RemoveTemporary().
Referenced by Draw(), C4Game::Execute(), and Execute().
void C4Landscape::Draw | ( | C4TargetFacet & | cgo, |
class C4FoWRegion * | pLight = nullptr |
||
) |
Definition at line 369 of file C4Landscape.cpp.
References C4Draw::ActivateBlitModulation(), C4Draw::Blit8Fast(), C4Draw::DeactivateBlitModulation(), DoRelights(), GraphicsSystem, C4Facet::Hgt, pDraw, C4GraphicsSystem::Show8BitSurface, C4Facet::Surface, C4TargetFacet::TargetX, C4TargetFacet::TargetY, C4Facet::Wdt, C4Facet::X, and C4Facet::Y.
Referenced by C4Viewport::Draw().
bool C4Landscape::DrawBox | ( | int32_t | iX1, |
int32_t | iY1, | ||
int32_t | iX2, | ||
int32_t | iY2, | ||
int32_t | iGrade, | ||
const char * | szMaterial, | ||
const char * | szTexture, | ||
const char * | szBackMaterial, | ||
const char * | szBackTexture | ||
) |
Definition at line 3545 of file C4Landscape.cpp.
References Dynamic, Exact, C4Texture::GetMaterialShape(), C4TextureShape::GetMaxPolyHeight(), C4TextureShape::GetMaxPolyWidth(), C4TextureMap::GetTexture(), SetMapChanged(), Static, TextureMap, and Undefined.
bool C4Landscape::DrawBrush | ( | int32_t | iX, |
int32_t | iY, | ||
int32_t | iGrade, | ||
const char * | szMaterial, | ||
const char * | szTexture, | ||
const char * | szBackMaterial, | ||
const char * | szBackTexture | ||
) |
Definition at line 3415 of file C4Landscape.cpp.
References Dynamic, Exact, C4Texture::GetMaterialShape(), C4TextureShape::GetMaxPolyHeight(), C4TextureShape::GetMaxPolyWidth(), C4TextureMap::GetTexture(), SetMapChanged(), Static, TextureMap, and Undefined.
bool C4Landscape::DrawChunks | ( | int32_t | tx, |
int32_t | ty, | ||
int32_t | wdt, | ||
int32_t | hgt, | ||
int32_t | icntx, | ||
int32_t | icnty, | ||
const char * | szMaterial, | ||
const char * | szTexture, | ||
bool | bIFT | ||
) |
Definition at line 3594 of file C4Landscape.cpp.
References C4M_Flat, C4Game::C4S, C4SLandscape::FlatChunkShapes, Game, C4MaterialMap::Get(), C4Rect::Hgt, C4Scenario::Landscape, C4MaterialMap::Map, C4MaterialCore::MapChunkType, MaterialMap, MatValid(), C4Draw::NoPrimaryClipper(), pDraw, Random(), C4Rect::Wdt, CPolyEdge::x, C4Rect::x, CPolyEdge::y, and C4Rect::y.
bool C4Landscape::DrawDefMap | ( | int32_t | iX, |
int32_t | iY, | ||
int32_t | iWdt, | ||
int32_t | iHgt, | ||
const char * | szMapDef, | ||
bool | ignoreSky = false |
||
) |
Definition at line 3989 of file C4Landscape.cpp.
References ClipRect(), and C4MCMap::SetSize().
bool C4Landscape::DrawLine | ( | int32_t | iX1, |
int32_t | iY1, | ||
int32_t | iX2, | ||
int32_t | iY2, | ||
int32_t | iGrade, | ||
const char * | szMaterial, | ||
const char * | szTexture, | ||
const char * | szBackMaterial, | ||
const char * | szBackTexture | ||
) |
Definition at line 3492 of file C4Landscape.cpp.
References Abs(), C4Rect::Add(), Dynamic, Exact, C4Texture::GetMaterialShape(), C4TextureShape::GetMaxPolyHeight(), C4TextureShape::GetMaxPolyWidth(), C4TextureMap::GetTexture(), SetMapChanged(), Static, TextureMap, Undefined, CPolyEdge::x, and CPolyEdge::y.
bool C4Landscape::DrawMap | ( | int32_t | iX, |
int32_t | iY, | ||
int32_t | iWdt, | ||
int32_t | iHgt, | ||
const char * | szMapDef, | ||
bool | ignoreSky = false |
||
) |
Definition at line 3959 of file C4Landscape.cpp.
References C4Game::C4S, ClipRect(), Game, C4Scenario::Landscape, C4SLandscape::MapHgt, C4SLandscape::MapWdt, MaterialMap, C4MapCreatorS2::ReadScript(), C4MapCreatorS2::Render(), C4SVal::Set(), C4Game::StartupPlayerCount, and TextureMap.
void C4Landscape::DrawMaterialRect | ( | int32_t | mat, |
int32_t | tx, | ||
int32_t | ty, | ||
int32_t | wdt, | ||
int32_t | hgt | ||
) |
Definition at line 931 of file C4Landscape.cpp.
References GetDensity(), Mat2PixColDefault(), MatDensity(), and SetPix2().
bool C4Landscape::DrawPolygon | ( | int * | vtcs, |
int | length, | ||
const char * | szMaterial, | ||
const char * | szBackMaterial, | ||
bool | fDrawBridge | ||
) |
Definition at line 3629 of file C4Landscape.cpp.
References C4TextureMap::GetIndexMatTex(), MatTex2PixCol(), TextureMap, and Transparent.
Referenced by DrawQuad().
bool C4Landscape::DrawQuad | ( | int32_t | iX1, |
int32_t | iY1, | ||
int32_t | iX2, | ||
int32_t | iY2, | ||
int32_t | iX3, | ||
int32_t | iY3, | ||
int32_t | iX4, | ||
int32_t | iY4, | ||
const char * | szMaterial, | ||
const char * | szBackMaterial, | ||
bool | fDrawBridge | ||
) |
Definition at line 3891 of file C4Landscape.cpp.
References DrawPolygon().
void C4Landscape::Execute | ( | ) |
Definition at line 204 of file C4Landscape.cpp.
References DoRelights(), Game, and C4Game::iTick35.
Referenced by C4Game::Execute().
int32_t C4Landscape::ExtractMaterial | ( | int32_t | fx, |
int32_t | fy, | ||
bool | distant_first | ||
) |
Definition at line 957 of file C4Landscape.cpp.
References CheckInstabilityRange(), ClearPix(), FindMatTop(), GetMat(), and MNone.
Referenced by C4MassMover::Execute(), and C4MaterialMap::mrfPoof().
|
static |
Definition at line 3828 of file C4Landscape.cpp.
References CPolyEdge::x.
Referenced by C4FoWLightSection::Update().
bool C4Landscape::FindMatPath | ( | int32_t & | fx, |
int32_t & | fy, | ||
int32_t | ydir, | ||
int32_t | mdens, | ||
int32_t | mslide | ||
) | const |
Definition at line 3109 of file C4Landscape.cpp.
References C4M_Solid, and GetDensity().
Referenced by C4MassMover::Execute().
bool C4Landscape::FindMatPathPush | ( | int32_t & | fx, |
int32_t & | fy, | ||
int32_t | mdens, | ||
int32_t | mslide, | ||
bool | liquid | ||
) | const |
Definition at line 3188 of file C4Landscape.cpp.
References Abs(), C4ScriptGuiWindowPropertyName::bottom, GetDensity(), GetHeight(), GetWidth(), C4ScriptGuiWindowPropertyName::left, C4ScriptGuiWindowPropertyName::right, C4ScriptGuiWindowPropertyName::top, CPolyEdge::x, and CPolyEdge::y.
Referenced by InsertMaterial().
bool C4Landscape::FindMatSlide | ( | int32_t & | fx, |
int32_t & | fy, | ||
int32_t | ydir, | ||
int32_t | mdens, | ||
int32_t | mslide | ||
) | const |
Definition at line 3148 of file C4Landscape.cpp.
References C4M_Solid, and GetDensity().
Referenced by InsertMaterial().
void C4Landscape::FindMatTop | ( | int32_t | mat, |
int32_t & | x, | ||
int32_t & | y, | ||
bool | distant_first | ||
) | const |
Definition at line 3338 of file C4Landscape.cpp.
References GetMat(), C4MaterialMap::Map, MaterialMap, MatValid(), C4MaterialCore::MaxSlide, CPolyEdge::x, and CPolyEdge::y.
Referenced by ExtractMaterial().
int32_t C4Landscape::GetBackDensity | ( | int32_t | x, |
int32_t | y | ||
) | const |
Definition at line 3803 of file C4Landscape.cpp.
References GetBackPix(), CPolyEdge::x, and CPolyEdge::y.
BYTE C4Landscape::GetBackMapIndex | ( | int32_t | iX, |
int32_t | iY | ||
) | const |
Definition at line 3908 of file C4Landscape.cpp.
Referenced by C4EditCursor::ApplyToolPicker().
int32_t C4Landscape::GetBackMat | ( | int32_t | x, |
int32_t | y | ||
) | const |
Definition at line 3798 of file C4Landscape.cpp.
References GetBackPix(), CPolyEdge::x, and CPolyEdge::y.
Referenced by C4EditCursor::UpdateStatusBar().
BYTE C4Landscape::GetBackPix | ( | int32_t | x, |
int32_t | y | ||
) | const |
Definition at line 3760 of file C4Landscape.cpp.
References Clamp(), GetHeight(), GetWidth(), CPolyEdge::x, and CPolyEdge::y.
Referenced by C4EditCursor::ApplyToolPicker(), FindTunnelHeight(), GetBackDensity(), GetBackMat(), GetBackPlacement(), GetLight(), C4Weather::GetWind(), and RaiseTerrain().
int32_t C4Landscape::GetBackPlacement | ( | int32_t | x, |
int32_t | y | ||
) | const |
Definition at line 3808 of file C4Landscape.cpp.
References GetBackPix(), CPolyEdge::x, and CPolyEdge::y.
int32_t C4Landscape::GetDensity | ( | int32_t | x, |
int32_t | y | ||
) | const |
Definition at line 3742 of file C4Landscape.cpp.
References GetPix(), CPolyEdge::x, and CPolyEdge::y.
Referenced by DrawMaterialRect(), FindMatPath(), FindMatPathPush(), FindMatSlide(), GBackDensity(), InsertMaterial(), InsertMaterialOutsideLandscape(), and mrfInsertCheck().
int32_t C4Landscape::GetEffectiveMatCount | ( | int | material | ) | const |
Definition at line 4208 of file C4Landscape.cpp.
C4FoW * C4Landscape::GetFoW | ( | ) |
Definition at line 4197 of file C4Landscape.cpp.
Referenced by C4Viewport::EnableFoW(), C4Object::StatusDeactivate(), and C4Object::UpdateLight().
C4Real C4Landscape::GetGravity | ( | ) | const |
Definition at line 3681 of file C4Landscape.cpp.
int32_t C4Landscape::GetHeight | ( | ) | const |
Definition at line 3671 of file C4Landscape.cpp.
Referenced by _SetPix2(), _SetPix2Tmp(), AboveSemiSolid(), AboveSolid(), AdjustMoveToTarget(), C4Viewport::AdjustPosition(), C4Viewport::CalculateZoom(), C4Viewport::CenterPosition(), C4SolidMask::CheckConsistency(), ClipRect(), C4FoWAmbient::CreateFromLandscape(), C4GraphicsSystem::DoSaveScreenshot(), C4Landscape::P::DoScan(), C4TextureShape::Draw(), C4Object::ExecMovement(), C4PXS::Execute(), FindLiquidHeight(), FindMatPathPush(), FindTunnelHeight(), GetBackPix(), GetMatHeight(), GetPix(), C4Sky::GetSkyFadeClr(), C4Player::Init(), C4MassMover::Init(), C4Game::InitInEarth(), C4Game::InitVegetation(), InsertDeadMaterial(), InsertMaterial(), LandscapeFree(), C4Game::PlaceAnimal(), C4Game::PlaceInEarth(), C4SolidMask::Put(), C4SolidMask::PutSolidMasks(), RaiseTerrain(), C4SolidMask::RemoveSolidMasks(), RemoveUnusedTexMapEntries(), SaveInitial(), C4Player::ScenarioInit(), C4Player::ScrollView(), SemiAboveSolid(), SetPix2(), C4Viewport::SetViewY(), SimFlight(), TrajectoryDistance(), C4FoWLightSection::Update(), C4MouseControl::UpdateFogOfWar(), C4FoWAmbient::UpdateFromLandscape(), and C4Object::VerticalBounds().
bool C4Landscape::GetLight | ( | int32_t | x, |
int32_t | y | ||
) |
Definition at line 3813 of file C4Landscape.cpp.
References GetBackPix(), GetPix(), CPolyEdge::x, and CPolyEdge::y.
BYTE C4Landscape::GetMapIndex | ( | int32_t | iX, |
int32_t | iY | ||
) | const |
Definition at line 3902 of file C4Landscape.cpp.
Referenced by C4EditCursor::ApplyToolPicker().
int32_t C4Landscape::GetMapZoom | ( | ) | const |
Definition at line 3676 of file C4Landscape.cpp.
Referenced by C4EditCursor::ApplyToolPicker(), and C4Player::Execute().
int32_t C4Landscape::GetMat | ( | int32_t | x, |
int32_t | y | ||
) | const |
Definition at line 3737 of file C4Landscape.cpp.
References GetPix(), CPolyEdge::x, and CPolyEdge::y.
Referenced by C4Landscape::P::BlastFreePix(), CheckInstability(), C4Landscape::P::DigFreePix(), C4Landscape::P::DigFreePixNoInstability(), ExtractMaterial(), FindMatTop(), GBackMat(), Incinerate(), InsertDeadMaterial(), InsertMaterial(), C4Landscape::P::ShakeFreePix(), and C4EditCursor::UpdateStatusBar().
int32_t C4Landscape::GetMatCount | ( | int | material | ) | const |
Definition at line 4202 of file C4Landscape.cpp.
Referenced by C4SolidMask::CheckConsistency().
int32_t C4Landscape::GetMatHeight | ( | int32_t | x, |
int32_t | y, | ||
int32_t | iYDir, | ||
int32_t | iMat, | ||
int32_t | iMax | ||
) | const |
Definition at line 2461 of file C4Landscape.cpp.
References _GetMat(), GetHeight(), CPolyEdge::x, and CPolyEdge::y.
Referenced by _SetPix2(), and C4Landscape::P::UpdateMatCnt().
LandscapeMode C4Landscape::GetMode | ( | ) | const |
Definition at line 3395 of file C4Landscape.cpp.
Referenced by C4EditCursor::ApplyToolBrush(), C4EditCursor::ApplyToolFill(), C4EditCursor::ApplyToolLine(), C4EditCursor::ApplyToolPicker(), C4EditCursor::ApplyToolRect(), C4ToolsDlg::AssertValidBackTexture(), C4ToolsDlg::AssertValidTexture(), C4Console::SaveScenario(), C4ToolsDlg::SetBackMaterial(), C4ToolsDlg::SetLandscapeMode(), and C4ToolsDlg::SetMaterial().
DWORD C4Landscape::GetModulation | ( | ) | const |
Definition at line 4025 of file C4Landscape.cpp.
CStdPalette * C4Landscape::GetPal | ( | ) | const |
Definition at line 3661 of file C4Landscape.cpp.
Referenced by C4PXSSystem::Draw().
BYTE C4Landscape::GetPix | ( | int32_t | x, |
int32_t | y | ||
) | const |
Definition at line 3699 of file C4Landscape.cpp.
References Clamp(), GetHeight(), MCVehic, CPolyEdge::x, and CPolyEdge::y.
Referenced by GetDensity(), GetLight(), GetMat(), GetPlacement(), PathFreeIgnoreVehiclePix(), C4SolidMask::Put(), C4SolidMask::PutTemporary(), RaiseTerrain(), C4SolidMask::RemoveTemporary(), and C4SolidMask::Repair().
int32_t C4Landscape::GetPixDensity | ( | BYTE | byPix | ) | const |
Definition at line 3835 of file C4Landscape.cpp.
Referenced by C4Landscape::P::GetBridgeMatConversion().
int32_t C4Landscape::GetPixMat | ( | BYTE | byPix | ) | const |
Definition at line 3833 of file C4Landscape.cpp.
Referenced by C4Landscape::P::GetBridgeMatConversion(), and PathFreeIgnoreVehiclePix().
int32_t C4Landscape::GetPlacement | ( | int32_t | x, |
int32_t | y | ||
) | const |
Definition at line 3747 of file C4Landscape.cpp.
References GetPix(), CPolyEdge::x, and CPolyEdge::y.
C4Sky & C4Landscape::GetSky | ( | ) |
Definition at line 4187 of file C4Landscape.cpp.
Referenced by C4Game::CompileFunc(), C4GraphicsSystem::DoSaveScreenshot(), and C4Viewport::Draw().
int32_t C4Landscape::GetWidth | ( | ) | const |
Definition at line 3666 of file C4Landscape.cpp.
Referenced by _SetPix2(), _SetPix2Tmp(), C4Viewport::AdjustPosition(), C4Viewport::CalculateZoom(), C4Viewport::CenterPosition(), C4SolidMask::CheckConsistency(), ClipRect(), C4Shape::ContactCheck(), C4FoWAmbient::CreateFromLandscape(), C4GraphicsSystem::DoSaveScreenshot(), C4Landscape::P::DoScan(), C4TextureShape::Draw(), C4Object::ExecMovement(), C4PXS::Execute(), FindConSiteSpot(), FindLevelGround(), FindLiquid(), FindMatPathPush(), FindSolidGround(), FindSurfaceLiquid(), FindTunnel(), GetBackPix(), C4Player::Init(), C4MassMover::Init(), C4Game::InitInEarth(), C4Game::InitVegetation(), C4Viewport::InitZoom(), InsertDeadMaterial(), InsertMaterial(), LandscapeFree(), C4Game::PlaceAnimal(), C4Game::PlaceInEarth(), C4SolidMask::Put(), C4SolidMask::PutSolidMasks(), C4SolidMask::RemoveSolidMasks(), RemoveUnusedTexMapEntries(), SaveInitial(), C4Player::ScenarioInit(), C4Player::ScrollView(), SetPix2(), C4Viewport::SetViewX(), C4Object::SideBounds(), SimFlight(), TrajectoryDistance(), C4FoWLightSection::Update(), C4MouseControl::UpdateFogOfWar(), and C4FoWAmbient::UpdateFromLandscape().
void C4Landscape::HandleTexMapUpdate | ( | ) |
Definition at line 4218 of file C4Landscape.cpp.
References UpdatePixMaps().
Referenced by C4TextureMap::AddEntry().
bool C4Landscape::HasFoW | ( | ) | const |
Definition at line 4192 of file C4Landscape.cpp.
Referenced by C4Viewport::EnableFoW(), C4Object::StatusDeactivate(), and C4Object::UpdateLight().
bool C4Landscape::HasMap | ( | ) | const |
Definition at line 1688 of file C4Landscape.cpp.
bool C4Landscape::Incinerate | ( | int32_t | x, |
int32_t | y, | ||
int32_t | cause_player | ||
) |
Definition at line 1084 of file C4Landscape.cpp.
References C4VInt(), C4PropList::Call(), GetMat(), C4AulScriptEngine::GetPropList(), C4MaterialCore::Inflammable, C4MaterialMap::Map, MaterialMap, MatValid(), P_InflameLandscape, and ScriptEngine.
Referenced by C4MaterialMap::mrfIncinerate().
bool C4Landscape::Init | ( | C4Group & | hGroup, |
bool | fOverloadCurrent, | ||
bool | fLoadSky, | ||
bool & | rfLoaded, | ||
bool | fSavegame | ||
) |
Definition at line 1426 of file C4Landscape.cpp.
References C4Game::C4S, C4SLandscape::ExactLandscape, C4Game::FixRandom(), Game, C4Scenario::Landscape, C4SLandscape::MapHgt, C4SLandscape::MapWdt, C4SVal::Max, Random(), C4Game::RandomSeed, C4Game::SetInitProgress(), Undefined, and UpdatePixMaps().
bool C4Landscape::InsertDeadMaterial | ( | int32_t | mat, |
int32_t | tx, | ||
int32_t | ty | ||
) |
Definition at line 1047 of file C4Landscape.cpp.
References _GetMat(), _GetPix(), C4M_Solid, C4Game::C4S, Game, C4Scenario::Game, GetHeight(), GetMat(), GetWidth(), InsertMaterial(), InsertMaterialOutsideLandscape(), C4SRealism::LandscapeInsertThrust, Mat2PixColDefault(), MatDensity(), MatValid(), Random(), C4SGame::Realism, SetPix2(), and Transparent.
Referenced by C4MassMover::Execute(), and InsertMaterial().
bool C4Landscape::InsertMaterial | ( | int32_t | mat, |
int32_t * | tx, | ||
int32_t * | ty, | ||
int32_t | vx = 0 , |
||
int32_t | vy = 0 , |
||
bool | query_only = false |
||
) |
Definition at line 975 of file C4Landscape.cpp.
References C4M_Solid, C4REAL10(), C4Game::C4S, C4PXSSystem::Create(), FindMatPathPush(), FindMatSlide(), Game, C4Scenario::Game, GetDensity(), GetHeight(), GetMat(), C4MaterialMap::GetReactionUnsafe(), GetWidth(), GravAccel, InsertDeadMaterial(), InsertMaterialOutsideLandscape(), C4MaterialCore::Instable, itofix(), C4SRealism::LandscapePushPull, C4MaterialMap::Map, MatDensity(), MaterialMap, MatValid(), C4MaterialCore::MaxSlide, meePXSPos, C4MaterialReaction::pFunc, PXS, C4SGame::Realism, and Sign().
Referenced by C4MassMover::Execute(), InsertDeadMaterial(), C4MaterialMap::mrfIncinerate(), and C4MaterialMap::mrfInsert().
bool C4Landscape::InsertMaterialOutsideLandscape | ( | int32_t | tx, |
int32_t | ty, | ||
int32_t | mdens | ||
) |
Definition at line 967 of file C4Landscape.cpp.
References GetDensity().
Referenced by InsertDeadMaterial(), and InsertMaterial().
bool C4Landscape::Load | ( | C4Group & | hGroup, |
bool | fLoadSky, | ||
bool | fSavegame | ||
) |
Definition at line 1831 of file C4Landscape.cpp.
bool C4Landscape::MapToLandscape | ( | ) |
Definition at line 2110 of file C4Landscape.cpp.
Referenced by C4ToolsDlg::SetLandscapeMode().
bool C4Landscape::PostInitMap | ( | ) |
Definition at line 2446 of file C4Landscape.cpp.
References C4Game::C4S, Game, C4SLandscape::KeepMapCreator, and C4Scenario::Landscape.
void C4Landscape::RaiseTerrain | ( | int32_t | tx, |
int32_t | ty, | ||
int32_t | wdt | ||
) |
Definition at line 940 of file C4Landscape.cpp.
References GBackSolid(), GetBackPix(), GetHeight(), GetPix(), Landscape, MatVehicle(), PixCol2Mat(), and SetPix2().
Referenced by C4Game::CreateObjectConstruction().
void C4Landscape::RemoveUnusedTexMapEntries | ( | ) |
Definition at line 4151 of file C4Landscape.cpp.
References C4Material::AboveTempConvertTo, C4Material::BelowTempConvertTo, C4Material::BlastShiftTo, C4M_MaxTexIndex, C4Material::DefaultMatTex, C4TextureMap::fEntriesAdded, GetHeight(), GetWidth(), C4MaterialMap::Map, MaterialMap, C4MaterialMap::Num, C4TextureMap::RemoveEntry(), TextureMap, CPolyEdge::x, and CPolyEdge::y.
Definition at line 4046 of file C4Landscape.cpp.
References CPolyEdge::x, and CPolyEdge::y.
Referenced by SetTextureIndex().
bool C4Landscape::Save | ( | C4Group & | hGroup | ) | const |
Definition at line 1693 of file C4Landscape.cpp.
References C4SolidMask::PutSolidMasks(), and C4SolidMask::RemoveSolidMasks().
Referenced by C4Game::LoadScenarioSection().
bool C4Landscape::SaveDiff | ( | C4Group & | hGroup, |
bool | fSyncSave | ||
) | const |
Definition at line 1734 of file C4Landscape.cpp.
References C4SolidMask::PutSolidMasks(), and C4SolidMask::RemoveSolidMasks().
bool C4Landscape::SaveInitial | ( | ) |
Definition at line 1810 of file C4Landscape.cpp.
References GetHeight(), GetWidth(), CPolyEdge::x, and CPolyEdge::y.
bool C4Landscape::SaveMap | ( | C4Group & | hGroup | ) | const |
Definition at line 1954 of file C4Landscape.cpp.
References C4Config::AtTempPath(), C4CFN_MapBg, C4CFN_MapFg, C4CFN_TempMapBg, C4CFN_TempMapFg, Config, MaterialMap, C4Group::Move(), C4TextureMap::StoreMapPalette(), and TextureMap.
Referenced by C4Landscape::P::SaveDiffInternal(), and C4Landscape::P::SaveInternal().
bool C4Landscape::SaveTextures | ( | C4Group & | hGroup | ) | const |
Definition at line 1986 of file C4Landscape.cpp.
References C4Config::AtTempPath(), C4CFN_Material, C4CFN_TexMap, C4Group::Close(), Config, EraseItem(), C4TextureMap::fEntriesAdded, C4Group::FindEntry(), C4Group::IsOpen(), C4Group::Move(), C4Group::Open(), C4Group::OpenAsChild(), C4TextureMap::SaveMap(), and TextureMap.
Referenced by C4Landscape::P::SaveDiffInternal(), and C4Landscape::P::SaveInternal().
void C4Landscape::ScenarioInit | ( | ) |
Definition at line 1351 of file C4Landscape.cpp.
References C4REAL100(), C4Game::C4S, DefaultGravAccel, C4SVal::Evaluate(), Game, C4SLandscape::Gravity, and C4Scenario::Landscape.
void C4Landscape::SetGravity | ( | C4Real | g | ) |
Definition at line 3686 of file C4Landscape.cpp.
void C4Landscape::SetMapChanged | ( | ) |
Definition at line 4149 of file C4Landscape.cpp.
Referenced by DrawBox(), DrawBrush(), and DrawLine().
void C4Landscape::SetMode | ( | LandscapeMode | iMode | ) |
Definition at line 3390 of file C4Landscape.cpp.
Referenced by C4ToolsDlg::SetLandscapeMode().
bool C4Landscape::SetModulation | ( | DWORD | dwWithClr | ) |
Definition at line 4019 of file C4Landscape.cpp.
Definition at line 786 of file C4Landscape.cpp.
References _GetPix(), _SetPix2(), GetHeight(), GetWidth(), and Transparent.
Referenced by C4Landscape::P::BlastFreePix(), ClearPix(), C4Landscape::P::DoScan(), DrawMaterialRect(), InsertDeadMaterial(), C4SolidMask::Put(), RaiseTerrain(), and C4SolidMask::Repair().
bool C4Landscape::SetTextureIndex | ( | const char * | szMatTex, |
BYTE | iNewIndex, | ||
bool | fInsert | ||
) |
Definition at line 4069 of file C4Landscape.cpp.
References C4TextureMap::AddEntry(), C4M_MaxTexIndex, StdStrBuf::Copy(), StdStrBuf::CopyUntil(), DebugLogF(), StdStrBuf::getData(), C4TextureMap::GetEntry(), C4TextureMap::GetIndex(), C4TexMapEntry::GetMaterialName(), C4TexMapEntry::GetTextureName(), C4TexMapEntry::isNull(), LogF(), C4TextureMap::MoveIndex(), ReplaceMapColor(), SSearch(), and TextureMap.
void C4Landscape::ShakeFree | ( | int32_t | tx, |
int32_t | ty, | ||
int32_t | rad | ||
) |
Definition at line 513 of file C4Landscape.cpp.
void C4Landscape::Synchronize | ( | ) |
Definition at line 1937 of file C4Landscape.cpp.
Referenced by C4Game::Synchronize().
void C4Landscape::UpdatePixMaps | ( | ) |
Definition at line 4226 of file C4Landscape.cpp.
References C4M_MaxTexIndex, C4MaterialCore::Light, C4MaterialMap::Map, MatDensity(), MaterialMap, MatValid(), PixCol2Mat(), and C4MaterialCore::Placement.
Referenced by HandleTexMapUpdate(), and Init().
|
static |
Definition at line 50 of file C4Landscape.h.
Referenced by _SetPix2(), _SetPix2Tmp(), C4Landscape::P::BlastFreePix(), C4Landscape::P::DoScan(), C4Landscape::P::DrawChunk(), DrawPolygon(), InsertDeadMaterial(), C4SolidMask::Put(), C4SolidMask::PutTemporary(), C4SolidMask::Remove(), C4SolidMask::RemoveTemporary(), C4SolidMask::Repair(), and SetPix2().