1/*
2 * LegacyClonk
3 *
4 * Copyright (c) 1998-2000, Matthes Bender (RedWolf Design)
5 * Copyright (c) 2017-2019, The LegacyClonk Team and contributors
6 *
7 * Distributed under the terms of the ISC license; see accompanying file
8 * "COPYING" for details.
9 *
10 * "Clonk" is a registered trademark of Matthes Bender, used with permission.
11 * See accompanying file "TRADEMARK" for details.
12 *
13 * To redistribute this file separately, substitute the full license texts
14 * for the above references.
15 */
16
17/* A static list of strings and integer values, i.e. for material amounts */
18
19#pragma once
20
21#include "C4Constants.h"
22#include "C4ForwardDeclarations.h"
23
24#include <cstring>
25
26class C4NameList
27{
28public:
29 C4NameList();
30
31public:
32 char Name[C4MaxNameList][C4MaxName + 1];
33 int32_t Count[C4MaxNameList];
34
35public:
36 void Clear();
37
38public:
39 bool operator==(const C4NameList &rhs)
40 {
41 return std::memcmp(s1: this, s2: &rhs, n: sizeof(C4NameList)) == 0;
42 }
43
44 void CompileFunc(StdCompiler *pComp, bool fValues = true);
45};
46