re-GTA/src/core/SurfaceTable.h

81 lines
1.5 KiB
C
Raw Normal View History

2019-05-15 14:52:37 +00:00
#pragma once
enum eSurfaceType
{
2019-05-28 06:39:36 +00:00
SURFACE_DEFAULT,
SURFACE_TARMAC,
2019-05-15 14:52:37 +00:00
SURFACE_GRASS,
2020-05-26 09:37:46 +00:00
SURFACE_GRAVEL,
SURFACE_MUD_DRY,
2019-05-15 14:52:37 +00:00
SURFACE_PAVEMENT,
2020-05-26 09:37:46 +00:00
SURFACE_CAR,
2019-05-15 14:52:37 +00:00
SURFACE_GLASS,
2020-05-26 09:37:46 +00: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 06:39:36 +00:00
SURFACE_SAND,
2020-05-26 09:37:46 +00:00
SURFACE_WATER,
SURFACE_WOOD_CRATES,
SURFACE_WOOD_BENCH,
SURFACE_WOOD_SOLID,
SURFACE_RUBBER,
SURFACE_PLASTIC,
2019-05-15 14:52:37 +00:00
SURFACE_HEDGE,
2020-05-26 09:37:46 +00:00
SURFACE_STEEP_CLIFF,
SURFACE_CONTAINER,
SURFACE_NEWS_VENDOR,
SURFACE_WHEELBASE,
SURFACE_CARDBOARDBOX,
SURFACE_TRANSPARENT_STONE,
SURFACE_METAL_GATE,
2019-07-19 11:58:19 +00:00
// These are illegal
2020-05-26 09:37:46 +00:00
SURFACE_SAND_BEACH,
SURFACE_CONCRETE_BEACH,
2019-05-15 14:52:37 +00:00
};
enum
{
ADHESIVE_RUBBER,
ADHESIVE_HARD,
ADHESIVE_ROAD,
ADHESIVE_LOOSE,
ADHESIVE_WET,
NUMADHESIVEGROUPS
};
2019-05-18 10:39:39 +00:00
struct CColPoint;
2020-07-27 13:38:12 +00:00
inline bool
IsSeeThrough(uint8 surfType)
{
switch(surfType)
case SURFACE_GLASS:
case SURFACE_TRANSPARENT_CLOTH:
2020-08-03 10:58:37 +00:00
#if defined(FIX_BUGS) || defined(GTA_PS2)
case SURFACE_METAL_CHAIN_FENCE:
case SURFACE_TRANSPARENT_STONE:
case SURFACE_SCAFFOLD_POLE:
#endif
2020-07-27 13:38:12 +00:00
return true;
return false;
}
2019-05-15 14:52:37 +00:00
class CSurfaceTable
{
2020-04-17 05:54:14 +00:00
static float ms_aAdhesiveLimitTable[NUMADHESIVEGROUPS][NUMADHESIVEGROUPS];
2019-05-15 14:52:37 +00:00
public:
2020-05-11 23:24:57 +00:00
static void Initialise(Const char *filename);
2019-05-15 14:52:37 +00:00
static int GetAdhesionGroup(uint8 surfaceType);
2019-05-18 10:39:39 +00:00
static float GetWetMultiplier(uint8 surfaceType);
static float GetAdhesiveLimit(CColPoint &colpoint);
2019-05-15 14:52:37 +00:00
};