forked from electronicarts/CnC_Tiberian_Dawn
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDOOR.H
94 lines (83 loc) · 3.7 KB
/
DOOR.H
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
81
82
83
84
85
86
87
88
89
90
91
92
93
94
/*
** Command & Conquer(tm)
** Copyright 2025 Electronic Arts Inc.
**
** This program is free software: you can redistribute it and/or modify
** it under the terms of the GNU General Public License as published by
** the Free Software Foundation, either version 3 of the License, or
** (at your option) any later version.
**
** This program is distributed in the hope that it will be useful,
** but WITHOUT ANY WARRANTY; without even the implied warranty of
** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
** GNU General Public License for more details.
**
** You should have received a copy of the GNU General Public License
** along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
/* $Header: F:\projects\c&c\vcs\code\door.h_v 1.8 16 Oct 1995 16:47:54 JOE_BOSTIC $ */
/***********************************************************************************************
*** C O N F I D E N T I A L --- W E S T W O O D S T U D I O S ***
***********************************************************************************************
* *
* Project Name : Command & Conquer *
* *
* File Name : DOOR.H *
* *
* Programmer : Joe L. Bostic *
* *
* Start Date : 06/11/95 *
* *
* Last Update : June 11, 1995 [JLB] *
* *
*---------------------------------------------------------------------------------------------*
* Functions: *
* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
#ifndef DOOR_H
#define DOOR_H
class DoorClass
{
private:
/*
** This is the animation control handler.
*/
StageClass Control;
/*
** This is the recorded number of stages of the current
** door animation process.
*/
unsigned char Stages;
/*
** This is the door state.
*/
enum {
IS_CLOSED, // Door is closed.
IS_OPENING, // Door is in the process of opening.
IS_OPEN, // Door is fully open.
IS_CLOSING // Door is in the process of closing.
} State;
/*
** If the animation for this door indicates that the object it is
** attached to should be redrawn, then this flag will be true.
*/
unsigned IsToRedraw:1;
public:
DoorClass(void);
bool Time_To_Redraw(void) {return(IsToRedraw);};
void Clear_Redraw_Flag(void) {IsToRedraw = false;};
void AI(void);
int Door_Stage(void) const;
bool Is_Door_Opening(void) {return(State == IS_OPENING);};
bool Is_Door_Closing(void) {return(State == IS_CLOSING);};
bool Open_Door(int rate, int stages);
bool Close_Door(int rate, int stages);
bool Is_Door_Open(void) {return(State == IS_OPEN);};
bool Is_Door_Closed(void) {return(State == IS_CLOSED);};
bool Is_Ready_To_Open(void);
/*
** File I/O.
*/
void Code_Pointers(void) { return; }
void Decode_Pointers(void) { return; }
};
#endif