Tiberian Technologies Scripts Reference Revision: 9000
Loading...
Searching...
No Matches
BuildingGameObjDef.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__BUILDINGGAMEOBJDEF_H
13#define TT_INCLUDE__BUILDINGGAMEOBJDEF_H
14
15#include "scripts.h"
16#include "engine_common.h"
17#include "engine_vector.h"
18#include "engine_threading.h"
19#include "engine_string.h"
20#include "DamageableGameObjDef.h"
21typedef unsigned int ArmorType;
22namespace BuildingConstants
23{
24 typedef enum
25 {
26 TYPE_NONE = -1,
27 TYPE_POWER_PLANT,
28 TYPE_SOLDIER_FACTORY,
29 TYPE_VEHICLE_FACTORY,
30 TYPE_REFINERY,
31 TYPE_COM_CENTER,
32 TYPE_REPAIR_BAY,
33 TYPE_SHRINE,
34 TYPE_HELIPAD,
35 TYPE_CONYARD,
36 TYPE_BASE_DEFENSE,
37 TYPE_TECH_CENTER,
38 TYPE_NAVAL_FACTORY,
39 TYPE_SPECIAL,
40 TYPE_COUNT
41 } BuildingType;
42
43 typedef enum
44 {
45 LEGACY_TEAM_GDI = 0,
46 LEGACY_TEAM_NOD,
47 } LegacyBuildingTeam;
48
49 typedef enum
50 {
51 BASE_COUNT = 2,
52 };
53}
54class BuildingGameObjDef : public DamageableGameObjDef
55{
56public:
57 BuildingGameObjDef( void );
58 virtual uint32 Get_Class_ID( void ) const;
59 virtual PersistClass * Create( void ) const ;
60 virtual bool Save( ChunkSaveClass &csave );
61 virtual bool Load( ChunkLoadClass &cload );
62 virtual const PersistFactoryClass & Get_Factory( void ) const;
63#ifdef DDBEDIT
64 virtual void Dump (FileClass &file);
65#endif
66 DECLARE_EDITABLE( BuildingGameObjDef, DamageableGameObjDef );
67 void Set_Type (BuildingConstants::BuildingType type) { Type = type; }
68 BuildingConstants::BuildingType Get_Type (void) const { return Type; }
69 const StringClass & Get_Mesh_Prefix (void) const { return MeshPrefix; }
70 int Get_Damage_Report(int team) const;
71 int Get_Destroy_Report(int team) const;
72 bool Get_Hide_Team_Battlefield_Information() const;
73protected:
74 StringClass MeshPrefix; // 0084
75 ArmorType MCTSkin; // 0088
76 BuildingConstants::BuildingType Type; // 008C
77 int GDIDamageReportID; // 0090
78 int NodDamageReportID; // 0094
79 int GDIDestroyReportID; // 0098
80 int NodDestroyReportID; // 009C
81 friend class BuildingGameObj;
82 friend class PresetDump;
83 bool HideTeamBattlefieldInformation;
84}; // 00A0
85
86
87#endif