OpenMoHAA
0.83.0
Loading...
Searching...
No Matches
g_spawn.h
1
/*
2
===========================================================================
3
Copyright (C) 2008 the OpenMoHAA team
4
5
This file is part of OpenMoHAA source code.
6
7
OpenMoHAA source code is free software; you can redistribute it
8
and/or modify it under the terms of the GNU General Public License as
9
published by the Free Software Foundation; either version 2 of the License,
10
or (at your option) any later version.
11
12
OpenMoHAA source code is distributed in the hope that it will be
13
useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
14
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15
GNU General Public License for more details.
16
17
You should have received a copy of the GNU General Public License
18
along with OpenMoHAA source code; if not, write to the Free Software
19
Foundation, 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 "../corepp/class.h"
28
#include "../corepp/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
41
class
Listener;
42
43
class
SpawnArgs :
public
Class
44
{
45
private
:
46
Container<str>
keyList;
47
Container<str>
valueList;
48
49
public
:
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
73
extern
Container<SafePtr<Listener>
> g_spawnlist;
74
75
ClassDef *FindClass(
const
char
*name, qboolean *isModel);
76
77
#ifdef GAME_DLL
78
void
G_InitClientPersistant(gclient_t *client);
79
#endif
Archiver
Definition
archive.h:86
Container
Definition
g_local.h:81
code
fgame
g_spawn.h
Generated by
1.13.2