OpenMoHAA 0.82.0
Loading...
Searching...
No Matches
Tow_Entities.h
1/*
2===========================================================================
3Copyright (C) 2023 the OpenMoHAA team
4
5This file is part of OpenMoHAA source code.
6
7OpenMoHAA source code is free software; you can redistribute it
8and/or modify it under the terms of the GNU General Public License as
9published by the Free Software Foundation; either version 2 of the License,
10or (at your option) any later version.
11
12OpenMoHAA source code is distributed in the hope that it will be
13useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
14MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15GNU General Public License for more details.
16
17You should have received a copy of the GNU General Public License
18along with OpenMoHAA source code; if not, write to the Free Software
19Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
20===========================================================================
21*/
22
23#pragma once
24
25#include "Entities.h"
26
27#define TOWOBJECTIVE_SPAWNFLAG_NO_RESPAWN 2
28
29class TOWObjective : public Objective
30{
31private:
32 int m_iAxisObjNum;
33 int m_iAlliesObjNum;
34 eController m_eController;
35 eController m_eLeadingController;
36 bool m_bNoRespawnForLeading;
37 str m_sAxisObjName;
38 str m_sAlliesObjName;
39
40public:
41 CLASS_PROTOTYPE(TOWObjective);
42
43 TOWObjective();
44
45 void SetController(Event *ev);
46 void GetController(Event *ev);
47 void TakeOver(Event *ev);
48 void SetAlliesObjNum(Event *ev);
49 void SetAxisObjNum(Event *ev);
50 void OnInitialize(Event *ev);
51 void SetCurrent(Event *ev);
52
53 int GetController() const;
54
55 void Archive(Archiver& arc) override;
56};
57
58class TOWObjectiveMan
59{
60private:
61 Container<TOWObjective *> m_towObjectives;
62 int m_iNumAlliesObjectives;
63 int m_iNumAxisObjectives;
64
65public:
66 TOWObjectiveMan();
67
68 void Reset();
69 void AddObjective(TOWObjective *objective);
70 void TakeOverObjective(eController controller, eController controllingTeam);
71};
72
73extern TOWObjectiveMan g_TOWObjectiveMan;
Definition archive.h:86
Definition container.h:85
Definition listener.h:246
Definition Tow_Entities.h:59
Definition Tow_Entities.h:30
Definition str.h:77