summaryrefslogtreecommitdiff
path: root/src/control/Bridge.h
blob: e639d4c157547c45f2fe45e3512e3551f59ed2e7 (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
#pragma once

class CEntity;

enum bridgeStates {
    STATE_BRIDGE_LOCKED,
    STATE_LIFT_PART_IS_UP,
    STATE_LIFT_PART_MOVING_DOWN,
    STATE_LIFT_PART_IS_DOWN,
    STATE_LIFT_PART_ABOUT_TO_MOVE_UP,
    STATE_LIFT_PART_MOVING_UP,
	STATE_BRIDGE_ALWAYS_UNLOCKED
};

class CBridge
{
public:
	static CEntity *pLiftRoad, *pLiftPart, *pWeight;
	static int State, OldState;
	static float DefaultZLiftPart, DefaultZLiftRoad, DefaultZLiftWeight;
	static float OldLift;
	static uint32 TimeOfBridgeBecomingOperational;

	static void Init();
	static void Update();
	static bool ShouldLightsBeFlashing();
	static void FindBridgeEntities();
	static bool ThisIsABridgeObjectMovingUp(int);
	static void ForceBridgeState(uint8 state);
};