OpenMoHAA 0.82.0
Loading...
Searching...
No Matches
g_spawn.h
1/*
2===========================================================================
3Copyright (C) 2008 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// g_spawn.h : spawner for scripts.
24
25#pragma once
26
27#include "class.h"
28#include "container.h"
29
30// spawnflags
31// these are set with checkboxes on each entity in the map editor
32#define SPAWNFLAG_NOT_EASY 0x00000100
33#define SPAWNFLAG_NOT_MEDIUM 0x00000200
34#define SPAWNFLAG_NOT_HARD 0x00000400
35#define SPAWNFLAG_NOT_DEATHMATCH 0x00000800
36#define SPAWNFLAG_DETAIL 0x00001000
37#define SPAWNFLAG_DEVELOPMENT 0x00002000
38#define SPAWNFLAG_NOCONSOLE 0x00008000
39#define SPAWNFLAG_NOPC 0x00010000
40
41class Listener;
42
43class SpawnArgs : public Class
44{
45private:
46 Container<str> keyList;
47 Container<str> valueList;
48
49public:
50 CLASS_PROTOTYPE(SpawnArgs);
51
52 SpawnArgs();
53 SpawnArgs(SpawnArgs& arglist);
54
55 void Clear(void);
56
57 char *Parse(char *data, bool bAllowUtils = false);
58 const char *getArg(const char *key, const char *defaultValue = NULL);
59 void setArg(const char *key, const char *value);
60
61 int NumArgs(void);
62 const char *getKey(int index);
63 const char *getValue(int index);
64 void operator=(SpawnArgs &a);
65
66 ClassDef *getClassDef(qboolean *tikiWasStatic = NULL);
67 Listener *Spawn(void);
68 Listener *SpawnInternal(void);
69
70 void Archive(Archiver& arc) override;
71};
72
73extern Container<SafePtr<Listener>> g_spawnlist;
74
75ClassDef *FindClass(const char *name, qboolean *isModel);
76
77#ifdef GAME_DLL
78void G_InitClientPersistant(gclient_t *client);
79#endif
Definition archive.h:86
Definition class.h:175
Definition container.h:85
Definition listener.h:450