| 1 | /* |
|---|---|
| 2 | * LegacyClonk |
| 3 | * |
| 4 | * Copyright (c) 1998-2000, Matthes Bender (RedWolf Design) |
| 5 | * Copyright (c) 2017-2021, 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 | /* Core component of a folder */ |
| 18 | |
| 19 | #include <C4Include.h> |
| 20 | #include <C4Folder.h> |
| 21 | |
| 22 | #include <C4Random.h> |
| 23 | #include <C4Group.h> |
| 24 | #include <C4Components.h> |
| 25 | #include <C4Game.h> |
| 26 | |
| 27 | // C4FolderHead |
| 28 | |
| 29 | void C4FolderHead::Default() |
| 30 | { |
| 31 | Index = 0; |
| 32 | Sort[0] = 0; |
| 33 | } |
| 34 | |
| 35 | void C4FolderHead::CompileFunc(StdCompiler *pComp) |
| 36 | { |
| 37 | pComp->Value(rStruct: mkNamingAdapt(rValue&: Index, szName: "Index", rDefault: 0)); |
| 38 | pComp->Value(rStruct: mkNamingAdapt(mkStringAdaptMA(Sort), szName: "Sort", rDefault: "")); |
| 39 | } |
| 40 | |
| 41 | // C4Folder |
| 42 | |
| 43 | C4Folder::C4Folder() |
| 44 | { |
| 45 | Default(); |
| 46 | } |
| 47 | |
| 48 | void C4Folder::Default() |
| 49 | { |
| 50 | Head.Default(); |
| 51 | } |
| 52 | |
| 53 | void C4Folder::CompileFunc(StdCompiler *pComp) |
| 54 | { |
| 55 | pComp->Value(rStruct: mkNamingAdapt(rValue&: Head, szName: "Head")); |
| 56 | } |
| 57 |