Tiberian Technologies Scripts Reference Revision: 9000
Loading...
Searching...
No Matches
VehicleGameObjDef.h
1/* Renegade Scripts.dll
2 Copyright 2013 Tiberian Technologies
3
4 This file is part of the Renegade scripts.dll
5 The Renegade scripts.dll is free software; you can redistribute it and/or modify it under
6 the terms of the GNU General Public License as published by the Free
7 Software Foundation; either version 2, or (at your option) any later
8 version. See the file COPYING for more details.
9 In addition, an exemption is given to allow Run Time Dynamic Linking of this code with any closed source module that does not contain code covered by this licence.
10 Only the source code to the module(s) containing the licenced code has to be released.
11*/
12#ifndef TT_INCLUDE__VEHICLEGAMEOBJDEF_H
13#define TT_INCLUDE__VEHICLEGAMEOBJDEF_H
14
15#include "engine_vector.h"
16#include "SmartGameObjDef.h"
17class VehicleGameObj;
18class TransitionDataClass;
19enum
20{
21 ENGINE_SOUND_STATE_STARTING = 0,
22 ENGINE_SOUND_STATE_RUNNING,
23 ENGINE_SOUND_STATE_STOPPING,
24 ENGINE_SOUND_STATE_OFF,
25
26 MAX_ENGINE_SOUND_STATES
27};
28typedef enum {
29 VEHICLE_TYPE_CAR,
30 VEHICLE_TYPE_TANK,
31 VEHICLE_TYPE_BIKE,
32 VEHICLE_TYPE_FLYING,
33 VEHICLE_TYPE_TURRET,
34 VEHICLE_TYPE_BOAT,
35 VEHICLE_TYPE_SUB,
36} VehicleType;
37class VehicleGameObjDef : public SmartGameObjDef
38{
39public:
40 VehicleGameObjDef( void );
41 virtual ~VehicleGameObjDef( void );
42 virtual uint32 Get_Class_ID( void ) const;
43 virtual PersistClass * Create( void ) const ;
44 virtual bool Save( ChunkSaveClass &csave );
45 virtual bool Load( ChunkLoadClass &cload );
46 virtual void On_Post_Load( void );
47 virtual const PersistFactoryClass & Get_Factory( void ) const;
48#ifdef DDBEDIT
49 virtual void Dump (FileClass &file);
50 virtual void DumpPhys (FileClass &file);
51#endif
52 DECLARE_EDITABLE( VehicleGameObjDef, SmartGameObjDef );
53 DynamicVectorClass<TransitionDataClass*> * Get_Transition_List( void ) { return &Transitions; }
54 const DynamicVectorClass<TransitionDataClass*> & Get_Transition_List( void ) const { return Transitions; }
55 void Free_Transition_List( void );
56 int Get_Damage_Report(int team) const;
57 int Get_Destroy_Report(int team) const;
58 int Get_Seat_Count() const {return NumSeats;}
59 VehicleType Get_Type() const {return Type;}
60 const StringClass &Get_Fire0_Anim() const {return Fire0Anim;}
61 const StringClass &Get_Fire1_Anim() const {return Fire1Anim;}
62 bool Get_Build_At_Ground() const {return BuildAtGround;}
63 float Get_Factory_Ride_Height() const {return FactoryRideHeight;}
64 int Get_Purchase_Report(int team) const;
65 bool Can_Repair() const { return CanRepair; }
66 int Get_Engine_Sound(int type) const { return EngineSound[type]; }
67protected:
68 VehicleType Type;
69 StringClass TypeName;
70 StringClass Fire0Anim;
71 StringClass Fire1Anim;
72 StringClass Profile;
73 DynamicVectorClass<TransitionDataClass*> Transitions;
74 float TurnRadius;
75 bool OccupantsVisible;
76 bool SightDownMuzzle;
77 bool Aim2D;
78 float EngineSoundMaxPitchFactor;
79 int EngineSound[MAX_ENGINE_SOUND_STATES];
80 float SquishVelocity;
81 int VehicleNameID;
82 int NumSeats;
83 int GDIDamageReportID;
84 int NodDamageReportID;
85 int GDIDestroyReportID;
86 int NodDestroyReportID;
87 bool CanBeStolen;
88 bool AllowStealthWhileEmpty;
89 bool BuildAtGround;
90 bool DualAim;
91 float FactoryRideHeight;
92 bool FakeTurret;
93 int GDIPurchaseReportID;
94 int NodPurchaseReportID;
95 bool CanRepair;
96 int EntryHelpMessage;
97 Vector3 EntryHelpMessageColor;
98 bool ApplySurfaceEffectDamage;
99 bool DisableSurfaceSounds;
100 friend class VehicleGameObj;
101 friend class PresetDump;
102}; // size: 324
103
104
105#endif