mirror of
https://github.com/electronicarts/CnC_Tiberian_Dawn.git
synced 2025-12-14 06:31:40 -05:00
Initial commit of Command & Conquer source code.
This commit is contained in:
94
DOOR.H
Normal file
94
DOOR.H
Normal file
@@ -0,0 +1,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
|
||||
Reference in New Issue
Block a user