summaryrefslogtreecommitdiff
path: root/src/core/SurfaceTable.h
blob: 8ee1724e4ff979bcbcac50ec74e243aeaf7b994c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
#pragma once

enum eSurfaceType
{
	SURFACE_DEFAULT,
	SURFACE_TARMAC,
	SURFACE_GRASS,
	SURFACE_GRAVEL,
	SURFACE_MUD_DRY,
	SURFACE_PAVEMENT,
	SURFACE_CAR,
	SURFACE_GLASS,
	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,
	SURFACE_SAND,
	SURFACE_WATER,
	SURFACE_WOOD_CRATES,
	SURFACE_WOOD_BENCH,
	SURFACE_WOOD_SOLID,
	SURFACE_RUBBER,
	SURFACE_PLASTIC,
	SURFACE_HEDGE,
	SURFACE_STEEP_CLIFF,
	SURFACE_CONTAINER,
	SURFACE_NEWS_VENDOR,
	SURFACE_WHEELBASE,
	SURFACE_CARDBOARDBOX,
	SURFACE_TRANSPARENT_STONE,
	SURFACE_METAL_GATE,

	// These are illegal
	SURFACE_SAND_BEACH,
	SURFACE_CONCRETE_BEACH,
};

enum
{
	ADHESIVE_RUBBER,
	ADHESIVE_HARD,
	ADHESIVE_ROAD,
	ADHESIVE_LOOSE,
	ADHESIVE_WET,

	NUMADHESIVEGROUPS
};

struct CColPoint;

inline bool
IsSeeThrough(uint8 surfType)
{
	switch(surfType)
	case SURFACE_GLASS:
	case SURFACE_TRANSPARENT_CLOTH:
#if defined(FIX_BUGS) || defined(GTA_PS2)
	case SURFACE_METAL_CHAIN_FENCE:
	case SURFACE_TRANSPARENT_STONE:
	case SURFACE_SCAFFOLD_POLE:
#endif
		return true;
	return false;
}

class CSurfaceTable
{
	static float ms_aAdhesiveLimitTable[NUMADHESIVEGROUPS][NUMADHESIVEGROUPS];
public:
	static void Initialise(Const char *filename);
	static int GetAdhesionGroup(uint8 surfaceType);
	static float GetWetMultiplier(uint8 surfaceType);
	static float GetAdhesiveLimit(CColPoint &colpoint);
};