2019-05-15 16:52:37 +02:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
enum eSurfaceType
|
|
|
|
{
|
2019-05-28 08:39:36 +02:00
|
|
|
SURFACE_DEFAULT,
|
|
|
|
SURFACE_TARMAC,
|
2019-05-15 16:52:37 +02:00
|
|
|
SURFACE_GRASS,
|
2020-05-26 11:34:20 +02:00
|
|
|
SURFACE_GRAVEL,
|
|
|
|
SURFACE_MUD_DRY,
|
2019-05-15 16:52:37 +02:00
|
|
|
SURFACE_PAVEMENT,
|
2020-05-26 11:34:20 +02:00
|
|
|
SURFACE_CAR,
|
2019-05-15 16:52:37 +02:00
|
|
|
SURFACE_GLASS,
|
2020-05-26 11:34:20 +02:00
|
|
|
SURFACE_TRANSPARENT_CLOTH,
|
|
|
|
SURFACE_GARAGE_DOOR,
|
|
|
|
SURFACE_CAR_PANEL,
|
|
|
|
SURFACE_THICK_METAL_PLATE,
|
|
|
|
SURFACE_SCAFFOLD_POLE,
|
|
|
|
SURFACE_LAMP_POST,
|
|
|
|
SURFACE_FIRE_HYDRANT,
|
|
|
|
SURFACE_GIRDER,
|
|
|
|
SURFACE_METAL_CHAIN_FENCE,
|
|
|
|
SURFACE_PED,
|
2019-05-28 08:39:36 +02:00
|
|
|
SURFACE_SAND,
|
2020-05-26 11:34:20 +02:00
|
|
|
SURFACE_WATER,
|
|
|
|
SURFACE_WOOD_CRATES,
|
|
|
|
SURFACE_WOOD_BENCH,
|
|
|
|
SURFACE_WOOD_SOLID,
|
|
|
|
SURFACE_RUBBER,
|
|
|
|
SURFACE_PLASTIC,
|
2019-05-15 16:52:37 +02:00
|
|
|
SURFACE_HEDGE,
|
2020-05-26 11:34:20 +02:00
|
|
|
SURFACE_STEEP_CLIFF,
|
|
|
|
SURFACE_CONTAINER,
|
|
|
|
SURFACE_NEWS_VENDOR,
|
|
|
|
SURFACE_WHEELBASE,
|
|
|
|
SURFACE_CARDBOARDBOX,
|
|
|
|
SURFACE_TRANSPARENT_STONE,
|
|
|
|
SURFACE_METAL_GATE,
|
|
|
|
SURFACE_SAND_BEACH,
|
|
|
|
SURFACE_CONCRETE_BEACH,
|
2019-05-15 16:52:37 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
enum
|
|
|
|
{
|
|
|
|
ADHESIVE_RUBBER,
|
|
|
|
ADHESIVE_HARD,
|
|
|
|
ADHESIVE_ROAD,
|
|
|
|
ADHESIVE_LOOSE,
|
2020-05-22 14:27:16 +02:00
|
|
|
ADHESIVE_SAND,
|
2019-05-15 16:52:37 +02:00
|
|
|
ADHESIVE_WET,
|
|
|
|
|
|
|
|
NUMADHESIVEGROUPS
|
|
|
|
};
|
|
|
|
|
2019-05-18 12:39:39 +02:00
|
|
|
struct CColPoint;
|
|
|
|
|
2020-07-27 15:38:34 +02:00
|
|
|
inline bool
|
|
|
|
IsSeeThrough(uint8 surfType)
|
|
|
|
{
|
|
|
|
switch(surfType)
|
|
|
|
case SURFACE_GLASS:
|
|
|
|
case SURFACE_TRANSPARENT_CLOTH:
|
|
|
|
case SURFACE_METAL_CHAIN_FENCE:
|
|
|
|
case SURFACE_TRANSPARENT_STONE:
|
|
|
|
case SURFACE_SCAFFOLD_POLE:
|
|
|
|
return true;
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
|
|
|
|
// I think the necessity of this function is really a bug
|
|
|
|
inline bool
|
|
|
|
IsSeeThroughVertical(uint8 surfType)
|
|
|
|
{
|
|
|
|
switch(surfType)
|
|
|
|
case SURFACE_GLASS:
|
|
|
|
case SURFACE_TRANSPARENT_CLOTH:
|
|
|
|
return true;
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
|
|
|
|
inline bool
|
|
|
|
IsShootThrough(uint8 surfType)
|
|
|
|
{
|
|
|
|
switch(surfType)
|
|
|
|
case SURFACE_METAL_CHAIN_FENCE:
|
|
|
|
case SURFACE_TRANSPARENT_STONE:
|
|
|
|
case SURFACE_SCAFFOLD_POLE:
|
|
|
|
return true;
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
|
2019-05-15 16:52:37 +02:00
|
|
|
class CSurfaceTable
|
|
|
|
{
|
2020-04-17 07:54:14 +02:00
|
|
|
static float ms_aAdhesiveLimitTable[NUMADHESIVEGROUPS][NUMADHESIVEGROUPS];
|
2019-05-15 16:52:37 +02:00
|
|
|
public:
|
2020-05-12 01:24:57 +02:00
|
|
|
static void Initialise(Const char *filename);
|
2019-05-15 16:52:37 +02:00
|
|
|
static int GetAdhesionGroup(uint8 surfaceType);
|
2019-05-18 12:39:39 +02:00
|
|
|
static float GetWetMultiplier(uint8 surfaceType);
|
|
|
|
static float GetAdhesiveLimit(CColPoint &colpoint);
|
2019-05-15 16:52:37 +02:00
|
|
|
};
|