#include "config/C4Constants.h"
Go to the source code of this file.
Classes | |
class | C4Landscape |
Enumerations | |
enum class | LandscapeMode { Undefined = 0 , Dynamic = 1 , Static = 2 , Exact = 3 } |
Functions | |
bool | AboveSolid (int32_t &rx, int32_t &ry) |
bool | AboveSemiSolid (int32_t &rx, int32_t &ry) |
bool | SemiAboveSolid (int32_t &rx, int32_t &ry) |
bool | FindSolidGround (int32_t &rx, int32_t &ry, int32_t width) |
bool | FindLiquid (int32_t &rx, int32_t &ry, int32_t width, int32_t height) |
bool | FindTunnel (int32_t &rx, int32_t &ry, int32_t width, int32_t height) |
bool | FindSurfaceLiquid (int32_t &rx, int32_t &ry, int32_t width, int32_t height) |
bool | FindLevelGround (int32_t &rx, int32_t &ry, int32_t width, int32_t hrange) |
bool | FindConSiteSpot (int32_t &rx, int32_t &ry, int32_t wdt, int32_t hgt, int32_t hrange=-1) |
bool | FindThrowingPosition (int32_t iTx, int32_t iTy, C4Real fXDir, C4Real fYDir, int32_t iHeight, int32_t &rX, int32_t &rY) |
bool | PathFree (int32_t x1, int32_t y1, int32_t x2, int32_t y2) |
bool | PathFree (int32_t x1, int32_t y1, int32_t x2, int32_t y2, int32_t *ix, int32_t *iy) |
bool | PathFreeIgnoreVehicle (int32_t x1, int32_t y1, int32_t x2, int32_t y2, int32_t *ix=nullptr, int32_t *iy=nullptr) |
bool | FindClosestFree (int32_t &rX, int32_t &rY, int32_t iAngle1, int32_t iAngle2, int32_t iExcludeAngle1, int32_t iExcludeAngle2) |
bool | ConstructionCheck (C4PropList *, int32_t iX, int32_t iY, C4Object *pByObj=nullptr) |
int32_t | PixCol2Mat (BYTE pixc) |
bool | DensitySolid (int32_t dens) |
bool | DensitySemiSolid (int32_t dens) |
bool | DensityLiquid (int32_t dens) |
int32_t | PixCol2Tex (BYTE pixc) |
int32_t | GBackMat (int32_t x, int32_t y) |
int32_t | GBackDensity (int32_t x, int32_t y) |
bool | GBackSolid (int32_t x, int32_t y) |
bool | GBackSemiSolid (int32_t x, int32_t y) |
bool | GBackLiquid (int32_t x, int32_t y) |
Variables | |
const int32_t | C4MaxMaterial = 125 |
const int32_t | C4LS_MaxRelights = 50 |
C4Landscape | Landscape |
|
strong |
Enumerator | |
---|---|
Undefined | |
Dynamic | |
Static | |
Exact |
Definition at line 29 of file C4Landscape.h.
bool AboveSemiSolid | ( | int32_t & | rx, |
int32_t & | ry | ||
) |
Definition at line 2480 of file C4Landscape.cpp.
References GBackSemiSolid(), C4Landscape::GetHeight(), and Landscape.
Referenced by FindConSiteSpot(), FindLevelGround(), FindSolidGround(), and FindSurfaceLiquid().
bool AboveSolid | ( | int32_t & | rx, |
int32_t & | ry | ||
) |
Definition at line 2507 of file C4Landscape.cpp.
References GBackSemiSolid(), GBackSolid(), C4Landscape::GetHeight(), and Landscape.
Referenced by FindSolidGround().
bool ConstructionCheck | ( | C4PropList * | PropList, |
int32_t | iX, | ||
int32_t | iY, | ||
C4Object * | pByObj = nullptr |
||
) |
Definition at line 3069 of file C4Landscape.cpp.
References C4Landscape::AreaSolidCount(), C4Def::ConSizeOff, C4Def::Constructable, C4Game::FindConstuctionSiteBlock(), FormatString(), Game, GameMsgObjectError(), StdStrBuf::getData(), C4PropList::GetDef(), C4PropList::GetName(), C4PropListStatic::GetName(), C4Rect::Hgt, Landscape, LoadResStr(), C4Def::Shape, and C4Rect::Wdt.
|
inline |
Definition at line 206 of file C4Landscape.h.
References C4M_Liquid, and C4M_Solid.
Referenced by C4MaterialMap::CrossMapMaterials(), GBackLiquid(), C4MaterialCore::Load(), and SimFlightHitsLiquid().
|
inline |
Definition at line 201 of file C4Landscape.h.
References C4M_SemiSolid.
Referenced by C4MaterialMap::CrossMapMaterials(), C4TextureMap::DefaultBkgMatTex(), GBackSemiSolid(), and C4ToolsDlg::SetTexture().
|
inline |
Definition at line 196 of file C4Landscape.h.
References C4M_Solid.
Referenced by C4Landscape::CheckInstability(), C4MaterialMap::CrossMapMaterials(), C4Landscape::P::DoScan(), GBackSolid(), LandscapeFree(), C4MaterialCore::Load(), and PathFreeIgnoreVehiclePix().
bool FindClosestFree | ( | int32_t & | rX, |
int32_t & | rY, | ||
int32_t | iAngle1, | ||
int32_t | iAngle2, | ||
int32_t | iExcludeAngle1, | ||
int32_t | iExcludeAngle2 | ||
) |
Definition at line 3049 of file C4Landscape.cpp.
Referenced by C4Command::Get().
bool FindConSiteSpot | ( | int32_t & | rx, |
int32_t & | ry, | ||
int32_t | wdt, | ||
int32_t | hgt, | ||
int32_t | hrange = -1 |
||
) |
Definition at line 2806 of file C4Landscape.cpp.
References AboveSemiSolid(), Abs(), C4Game::FindConstuctionSiteBlock(), Game, GBackSolid(), C4Landscape::GetWidth(), and Landscape.
Referenced by C4Player::PlaceReadyBase(), and C4Player::ScenarioInit().
bool FindLevelGround | ( | int32_t & | rx, |
int32_t & | ry, | ||
int32_t | width, | ||
int32_t | hrange | ||
) |
Definition at line 2752 of file C4Landscape.cpp.
References AboveSemiSolid(), Abs(), GBackSolid(), C4Landscape::GetWidth(), and Landscape.
Referenced by C4Player::PlaceReadyVehic().
bool FindLiquid | ( | int32_t & | rx, |
int32_t & | ry, | ||
int32_t | width, | ||
int32_t | height | ||
) |
Definition at line 2696 of file C4Landscape.cpp.
References FindLiquidHeight(), C4Landscape::GetWidth(), and Landscape.
Referenced by C4Game::PlaceAnimal().
bool FindSolidGround | ( | int32_t & | rx, |
int32_t & | ry, | ||
int32_t | width | ||
) |
Definition at line 2626 of file C4Landscape.cpp.
References AboveSemiSolid(), AboveSolid(), C4Landscape::GetWidth(), and Landscape.
Referenced by C4Game::PlaceAnimal(), C4Player::PlaceReadyCrew(), C4Player::PlaceReadyMaterial(), and C4Player::ScenarioInit().
bool FindSurfaceLiquid | ( | int32_t & | rx, |
int32_t & | ry, | ||
int32_t | width, | ||
int32_t | height | ||
) |
Definition at line 2656 of file C4Landscape.cpp.
References AboveSemiSolid(), GBackLiquid(), C4Landscape::GetWidth(), and Landscape.
Referenced by C4Game::PlaceAnimal().
bool FindThrowingPosition | ( | int32_t | iTx, |
int32_t | iTy, | ||
C4Real | fXDir, | ||
C4Real | fYDir, | ||
int32_t | iHeight, | ||
int32_t & | rX, | ||
int32_t & | rY | ||
) |
Definition at line 3014 of file C4Landscape.cpp.
References Inside(), and SemiAboveSolid().
Referenced by C4Command::Put(), and C4Command::Throw().
bool FindTunnel | ( | int32_t & | rx, |
int32_t & | ry, | ||
int32_t | width, | ||
int32_t | height | ||
) |
Definition at line 2724 of file C4Landscape.cpp.
References FindTunnelHeight(), C4Landscape::GetWidth(), and Landscape.
|
inline |
Definition at line 224 of file C4Landscape.h.
References C4Landscape::GetDensity(), and Landscape.
Referenced by C4Particle::Exec(), C4PXS::Execute(), GBackLiquid(), GBackSemiSolid(), GBackSolid(), C4DensityProvider::GetDensity(), C4Command::JumpControl(), LandscapeFree(), SimFlight(), and SimFlightHitsLiquid().
|
inline |
Definition at line 239 of file C4Landscape.h.
References DensityLiquid(), and GBackDensity().
Referenced by FindLiquidHeight(), FindSurfaceLiquid(), InitGameFunctionMap(), C4Object::IsInLiquidCheck(), and SimFlightHitsLiquid().
|
inline |
Definition at line 219 of file C4Landscape.h.
References C4Landscape::GetMat(), and Landscape.
Referenced by C4EditCursor::ApplyToolPicker(), C4Shape::Attach(), C4Shape::ContactCheck(), C4MassMover::Corrosion(), C4Object::ExecLife(), C4MassMover::Execute(), C4PXS::Execute(), FindTunnelHeight(), C4MassMover::Init(), C4MaterialMap::mrfConvert(), and C4Game::PlaceInEarth().
|
inline |
Definition at line 234 of file C4Landscape.h.
References DensitySemiSolid(), and GBackDensity().
Referenced by AboveSemiSolid(), AboveSolid(), AdjustMoveToTarget(), C4Object::ContactAction(), C4Object::ExecLife(), InitGameFunctionMap(), C4Game::PlaceAnimal(), C4Object::SetOCF(), and C4Object::UpdateOCF().
|
inline |
Definition at line 229 of file C4Landscape.h.
References DensitySolid(), and GBackDensity().
Referenced by AboveSolid(), AdjustMoveToTarget(), AdjustSolidOffset(), C4Object::AdjustWalkRotation(), C4Landscape::AreaSolidCount(), C4Landscape::CheckInstability(), FindConSiteSpot(), FindLevelGround(), C4Command::FlightControl(), C4TransferZone::GetEntryPoint(), InitGameFunctionMap(), C4Command::JumpControl(), PathFree(), PathFreePix(), C4Landscape::P::PostFreeShape(), C4Landscape::RaiseTerrain(), SemiAboveSolid(), C4Object::SetOCF(), SolidOnWhichSide(), TrajectoryDistance(), C4FoWLightSection::Update(), C4Object::UpdateOCF(), and VisibilityCheck().
bool PathFree | ( | int32_t | x1, |
int32_t | y1, | ||
int32_t | x2, | ||
int32_t | y2 | ||
) |
Definition at line 2884 of file C4Landscape.cpp.
References PathFreePix().
Referenced by C4Command::Get(), C4Command::JumpControl(), C4Shape::LineConnect(), C4Command::MoveTo(), and ReduceLineSegments().
bool PathFree | ( | int32_t | x1, |
int32_t | y1, | ||
int32_t | x2, | ||
int32_t | y2, | ||
int32_t * | ix, | ||
int32_t * | iy | ||
) |
Definition at line 2889 of file C4Landscape.cpp.
References Abs(), GBackSolid(), CPolyEdge::x, and CPolyEdge::y.
bool PathFreeIgnoreVehicle | ( | int32_t | x1, |
int32_t | y1, | ||
int32_t | x2, | ||
int32_t | y2, | ||
int32_t * | ix = nullptr , |
||
int32_t * | iy = nullptr |
||
) |
Definition at line 2990 of file C4Landscape.cpp.
References PathFreeIgnoreVehiclePix().
Referenced by C4Shape::LineConnect().
int32_t PixCol2Mat | ( | BYTE | pixc | ) |
Definition at line 1943 of file C4Landscape.cpp.
References C4TextureMap::GetEntry(), C4TexMapEntry::GetMaterialIndex(), MNone, PixCol2Tex(), and TextureMap.
Referenced by C4Landscape::P::DoScan(), C4Landscape::RaiseTerrain(), and C4Landscape::UpdatePixMaps().
|
inline |
Definition at line 211 of file C4Landscape.h.
References C4M_MaxTexIndex.
Referenced by C4TextureMap::DefaultBkgMatTex(), and PixCol2Mat().
bool SemiAboveSolid | ( | int32_t & | rx, |
int32_t & | ry | ||
) |
Definition at line 2535 of file C4Landscape.cpp.
References GBackSolid(), C4Landscape::GetHeight(), and Landscape.
Referenced by FindThrowingPosition().
const int32_t C4LS_MaxRelights = 50 |
Definition at line 27 of file C4Landscape.h.
Referenced by C4Landscape::_SetPix2(), and C4Landscape::DoRelights().
const int32_t C4MaxMaterial = 125 |
Definition at line 25 of file C4Landscape.h.
Referenced by C4MaterialList::Add(), C4MaterialMap::CrossMapMaterials(), C4MaterialList::Get(), and C4MaterialList::Set().
|
extern |
Definition at line 4350 of file C4Landscape.cpp.
Referenced by AboveSemiSolid(), AboveSolid(), C4TextureMap::AddEntry(), AdjustMoveToTarget(), C4Viewport::AdjustPosition(), C4EditCursor::ApplyToolBrush(), C4EditCursor::ApplyToolFill(), C4EditCursor::ApplyToolLine(), C4EditCursor::ApplyToolPicker(), C4EditCursor::ApplyToolRect(), C4ToolsDlg::AssertValidBackTexture(), C4ToolsDlg::AssertValidTexture(), C4Viewport::CalculateZoom(), C4Viewport::CenterPosition(), C4SolidMask::CheckConsistency(), C4Game::Clear(), C4Game::ClearPointers(), C4Game::CompileFunc(), ConstructionCheck(), C4Shape::ContactCheck(), C4FoWAmbient::CreateFromLandscape(), C4Game::CreateObjectConstruction(), C4Game::Default(), C4GraphicsSystem::DoSaveScreenshot(), C4Landscape::P::DoScan(), C4PXSSystem::Draw(), C4Viewport::Draw(), C4TextureShape::Draw(), C4Viewport::EnableFoW(), C4Object::ExecMovement(), C4Game::Execute(), C4MassMover::Execute(), C4PXS::Execute(), C4Player::Execute(), FindConSiteSpot(), FindLevelGround(), FindLiquid(), FindLiquidHeight(), FindSolidGround(), FindSurfaceLiquid(), FindTunnel(), FindTunnelHeight(), GBackDensity(), GBackMat(), C4Sky::GetSkyFadeClr(), C4Weather::GetWind(), C4Player::Init(), C4MassMover::Init(), C4Game::InitInEarth(), C4Game::InitVegetation(), C4Viewport::InitZoom(), LandscapeFree(), C4Game::LoadScenarioSection(), C4MaterialMap::mrfCorrode(), C4MaterialMap::mrfIncinerate(), C4MaterialMap::mrfInsert(), mrfInsertCheck(), C4MaterialMap::mrfPoof(), PathFreeIgnoreVehiclePix(), C4Game::PlaceAnimal(), C4Game::PlaceInEarth(), C4SolidMask::Put(), C4SolidMask::PutSolidMasks(), C4SolidMask::PutTemporary(), C4Landscape::RaiseTerrain(), C4SolidMask::Remove(), C4SolidMask::RemoveSolidMasks(), C4SolidMask::RemoveTemporary(), C4SolidMask::Repair(), C4Console::SaveScenario(), C4Player::ScenarioInit(), C4Player::ScrollView(), SemiAboveSolid(), C4ToolsDlg::SetBackMaterial(), C4ToolsDlg::SetLandscapeMode(), C4ToolsDlg::SetMaterial(), C4Viewport::SetViewX(), C4Viewport::SetViewY(), C4Object::SideBounds(), SimFlight(), C4Object::StatusDeactivate(), C4Game::Synchronize(), TrajectoryDistance(), C4FoWLightSection::Update(), C4MouseControl::UpdateFogOfWar(), C4FoWAmbient::UpdateFromLandscape(), C4Object::UpdateLight(), C4EditCursor::UpdateStatusBar(), and C4Object::VerticalBounds().