20 #ifndef INC_C4Landscape
21 #define INC_C4Landscape
53 void Clear(
bool fClearMapCreator=
true,
bool fClearSky=
true,
bool fClearRenderer=
true);
59 void DrawMaterialRect(int32_t mat, int32_t tx, int32_t ty, int32_t wdt, int32_t hgt);
62 void FindMatTop(int32_t mat, int32_t &x, int32_t &y,
bool distant_first)
const;
65 bool Load(
C4Group &hGroup,
bool fLoadSky,
bool fSavegame);
71 bool Init(
C4Group &hGroup,
bool fOverloadCurrent,
bool fLoadSky,
bool &rfLoaded,
bool fSavegame);
83 bool InsertMaterial(int32_t mat, int32_t *tx, int32_t *ty, int32_t vx = 0, int32_t vy = 0,
bool query_only=
false);
85 bool FindMatPath(int32_t &fx, int32_t &fy, int32_t ydir, int32_t mdens, int32_t mslide)
const;
86 bool FindMatSlide(int32_t &fx, int32_t &fy, int32_t ydir, int32_t mdens, int32_t mslide)
const;
87 bool FindMatPathPush(int32_t &fx, int32_t &fy, int32_t mdens, int32_t mslide,
bool liquid)
const;
88 bool Incinerate(int32_t x, int32_t y, int32_t cause_player);
89 bool DrawBrush(int32_t iX, int32_t iY, int32_t iGrade,
const char *szMaterial,
const char *szTexture,
const char *szBackMaterial,
const char *szBackTexture);
90 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);
91 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);
92 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);
93 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);
94 bool DrawPolygon(
int *vtcs,
int length,
const char *szMaterial,
const char *szBackMaterial,
bool fDrawBridge);
106 int32_t
_GetMat(int32_t x, int32_t y)
const;
109 int32_t
GetMat(int32_t x, int32_t y)
const;
110 int32_t
GetDensity(int32_t x, int32_t y)
const;
118 int32_t
GetBackMat(int32_t x, int32_t y)
const;
122 bool GetLight(int32_t x, int32_t y);
129 bool _PathFree(int32_t x, int32_t y, int32_t x2, int32_t y2)
const;
130 int32_t
GetMatHeight(int32_t x, int32_t y, int32_t iYDir, int32_t iMat, int32_t iMax)
const;
132 int32_t
AreaSolidCount(int32_t x, int32_t y, int32_t wdt, int32_t hgt)
const;
134 bool DrawMap(int32_t iX, int32_t iY, int32_t iWdt, int32_t iHgt,
const char *szMapDef,
bool ignoreSky =
false);
135 bool ClipRect(int32_t &rX, int32_t &rY, int32_t &rWdt, int32_t &rHgt)
const;
136 bool DrawDefMap(int32_t iX, int32_t iY, int32_t iWdt, int32_t iHgt,
const char *szMapDef,
bool ignoreSky =
false);
156 int32_t
DigFreeShape(
int *vtcs,
int length,
C4Object *by_object =
nullptr,
bool no_dig2objects =
false,
bool no_instability_check =
false);
159 void ClearFreeRect(int32_t tx, int32_t ty, int32_t wdt, int32_t hgt);
160 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);
161 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);
162 void ShakeFree(int32_t tx, int32_t ty, int32_t rad);
168 bool ClearPix(int32_t tx, int32_t ty);
183 bool FindLiquid(int32_t &rx, int32_t &ry, int32_t width, int32_t height);
184 bool FindTunnel(int32_t &rx, int32_t &ry, int32_t width, int32_t height);
186 bool FindLevelGround(int32_t &rx, int32_t &ry, int32_t width, int32_t hrange);
187 bool FindConSiteSpot(int32_t &rx, int32_t &ry, int32_t wdt, int32_t hgt, int32_t hrange=-1);
189 bool PathFree(int32_t x1, int32_t y1, int32_t x2, int32_t y2);
190 bool PathFree(int32_t x1, int32_t y1, int32_t x2, int32_t y2, int32_t *ix, int32_t *iy);
191 bool PathFreeIgnoreVehicle(int32_t x1, int32_t y1, int32_t x2, int32_t y2, int32_t *ix=
nullptr, int32_t *iy=
nullptr);
192 bool FindClosestFree(int32_t &rX, int32_t &rY, int32_t iAngle1, int32_t iAngle2, int32_t iExcludeAngle1, int32_t iExcludeAngle2);
const int32_t C4M_Vehicle
const int C4M_MaxTexIndex
const int32_t C4M_SemiSolid
bool GBackLiquid(int32_t x, int32_t y)
bool FindLiquid(int32_t &rx, int32_t &ry, int32_t width, int32_t height)
int32_t PixCol2Tex(BYTE pixc)
bool PathFreeIgnoreVehicle(int32_t x1, int32_t y1, int32_t x2, int32_t y2, int32_t *ix=nullptr, int32_t *iy=nullptr)
bool PathFree(int32_t x1, int32_t y1, int32_t x2, int32_t y2)
bool FindSurfaceLiquid(int32_t &rx, int32_t &ry, int32_t width, int32_t height)
bool AboveSolid(int32_t &rx, int32_t &ry)
bool DensitySolid(int32_t dens)
bool GBackSemiSolid(int32_t x, int32_t y)
const int32_t C4MaxMaterial
bool FindTunnel(int32_t &rx, int32_t &ry, int32_t width, int32_t height)
bool DensitySemiSolid(int32_t dens)
int32_t GBackMat(int32_t x, int32_t y)
bool DensityLiquid(int32_t dens)
bool FindConSiteSpot(int32_t &rx, int32_t &ry, int32_t wdt, int32_t hgt, int32_t hrange=-1)
int32_t GBackDensity(int32_t x, int32_t y)
bool ConstructionCheck(C4PropList *, int32_t iX, int32_t iY, C4Object *pByObj=nullptr)
const int32_t C4LS_MaxRelights
bool FindThrowingPosition(int32_t iTx, int32_t iTy, C4Real fXDir, C4Real fYDir, int32_t iHeight, int32_t &rX, int32_t &rY)
bool FindSolidGround(int32_t &rx, int32_t &ry, int32_t width)
bool AboveSemiSolid(int32_t &rx, int32_t &ry)
bool SemiAboveSolid(int32_t &rx, int32_t &ry)
bool FindLevelGround(int32_t &rx, int32_t &ry, int32_t width, int32_t hrange)
bool GBackSolid(int32_t x, int32_t y)
bool FindClosestFree(int32_t &rX, int32_t &rY, int32_t iAngle1, int32_t iAngle2, int32_t iExcludeAngle1, int32_t iExcludeAngle2)
int32_t PixCol2Mat(BYTE pixc)
int32_t GetPlacement(int32_t x, int32_t y) const
BYTE GetMapIndex(int32_t iX, int32_t iY) const
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)
C4Real GetGravity() const
LandscapeMode GetMode() const
void RaiseTerrain(int32_t tx, int32_t ty, int32_t wdt)
bool DrawMap(int32_t iX, int32_t iY, int32_t iWdt, int32_t iHgt, const char *szMapDef, bool ignoreSky=false)
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 InsertMaterialOutsideLandscape(int32_t tx, int32_t ty, int32_t mdens)
int32_t GetEffectiveMatCount(int material) const
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)
BYTE GetPix(int32_t x, int32_t y) const
int32_t ExtractMaterial(int32_t fx, int32_t fy, bool distant_first)
bool GetLight(int32_t x, int32_t y)
int32_t GetDensity(int32_t x, int32_t y) const
int32_t GetPixMat(BYTE byPix) const
BYTE GetBackPix(int32_t x, int32_t y) const
BYTE _GetPix(int32_t x, int32_t y) const
bool FindMatPathPush(int32_t &fx, int32_t &fy, int32_t mdens, int32_t mslide, bool liquid) const
bool FindMatPath(int32_t &fx, int32_t &fy, int32_t ydir, int32_t mdens, int32_t mslide) const
static const uint8_t Transparent
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 InsertDeadMaterial(int32_t mat, int32_t tx, int32_t ty)
BYTE _GetBackPix(int32_t x, int32_t y) const
bool _SetPix2(int32_t x, int32_t y, BYTE fgPix, BYTE bgPix)
void Clear(bool fClearMapCreator=true, bool fClearSky=true, bool fClearRenderer=true)
void ClearFreeRect(int32_t tx, int32_t ty, int32_t wdt, int32_t hgt)
void SetGravity(C4Real g)
bool FindMatSlide(int32_t &fx, int32_t &fy, int32_t ydir, int32_t mdens, int32_t mslide) const
bool ReplaceMapColor(BYTE iOldIndex, BYTE iNewIndex)
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)
void BlastFreeShape(int *vtcs, int length, C4Object *by_object=nullptr, int32_t by_player=NO_OWNER, int32_t iMaxDensity=C4M_Vehicle)
int32_t GetBackMat(int32_t x, int32_t y) const
CStdPalette * GetPal() const
int32_t GetHeight() const
void FindMatTop(int32_t mat, int32_t &x, int32_t &y, bool distant_first) const
bool Save(C4Group &hGroup) const
int32_t AreaSolidCount(int32_t x, int32_t y, int32_t wdt, int32_t hgt) const
bool _FastSolidCheck(int32_t x, int32_t y) const
int32_t _GetMat(int32_t x, int32_t y) const
int32_t GetMat(int32_t x, int32_t y) const
int32_t GetPixDensity(BYTE byPix) const
void CheckInstabilityRange(int32_t tx, int32_t ty)
bool InsertMaterial(int32_t mat, int32_t *tx, int32_t *ty, int32_t vx=0, int32_t vy=0, bool query_only=false)
int32_t _GetBackPlacement(int32_t x, int32_t y) const
bool ClearPix(int32_t tx, int32_t ty)
void SetMode(LandscapeMode iMode)
bool Init(C4Group &hGroup, bool fOverloadCurrent, bool fLoadSky, bool &rfLoaded, bool fSavegame)
int32_t GetBackPlacement(int32_t x, int32_t y) const
bool CheckInstability(int32_t tx, int32_t ty, int32_t recursion_count=0)
int32_t _GetPlacement(int32_t x, int32_t y) const
bool DrawBrush(int32_t iX, int32_t iY, int32_t iGrade, const char *szMaterial, const char *szTexture, const char *szBackMaterial, const char *szBackTexture)
bool DrawPolygon(int *vtcs, int length, const char *szMaterial, const char *szBackMaterial, bool fDrawBridge)
int32_t _GetBackDensity(int32_t x, int32_t y) const
bool SetTextureIndex(const char *szMatTex, BYTE iNewIndex, bool fInsert)
int32_t GetBackDensity(int32_t x, int32_t y) const
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 ClearPointers(C4Object *pObj)
void ShakeFree(int32_t tx, int32_t ty, int32_t rad)
int32_t DigFreeShape(int *vtcs, int length, C4Object *by_object=nullptr, bool no_dig2objects=false, bool no_instability_check=false)
bool ApplyDiff(C4Group &hGroup)
DWORD GetModulation() const
bool ClipRect(int32_t &rX, int32_t &rY, int32_t &rWdt, int32_t &rHgt) const
void _SetPix2Tmp(int32_t x, int32_t y, BYTE fgPix, BYTE bgPix)
static int32_t FastSolidCheckNextX(int32_t x)
int32_t GetMatCount(int material) const
int32_t GetMapZoom() const
bool DrawDefMap(int32_t iX, int32_t iY, int32_t iWdt, int32_t iHgt, const char *szMapDef, bool ignoreSky=false)
void CompileFunc(StdCompiler *pComp)
int32_t GetMatHeight(int32_t x, int32_t y, int32_t iYDir, int32_t iMat, int32_t iMax) const
void RemoveUnusedTexMapEntries()
bool SaveTextures(C4Group &hGroup) const
int32_t _GetBackMat(int32_t x, int32_t y) const
bool Incinerate(int32_t x, int32_t y, int32_t cause_player)
bool SaveDiff(C4Group &hGroup, bool fSyncSave) const
void DrawMaterialRect(int32_t mat, int32_t tx, int32_t ty, int32_t wdt, int32_t hgt)
bool Load(C4Group &hGroup, bool fLoadSky, bool fSavegame)
bool SetPix2(int32_t x, int32_t y, BYTE fgPix, BYTE bgPix)
bool SaveMap(C4Group &hGroup) const
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)
bool SetModulation(DWORD dwWithClr)
bool _PathFree(int32_t x, int32_t y, int32_t x2, int32_t y2) const
int32_t _GetDensity(int32_t x, int32_t y) const
void Draw(C4TargetFacet &cgo, class C4FoWRegion *pLight=nullptr)
BYTE GetBackMapIndex(int32_t iX, int32_t iY) const
void HandleTexMapUpdate()
bool _GetLight(int32_t x, int32_t y)