3 #include "../tbtr_template_vehicle.h"
7 static const SaveLoad _template_replacement_desc
[] = {
8 SLE_VAR(TemplateReplacement
, sel_template
, SLE_UINT16
),
9 SLE_VAR(TemplateReplacement
, group
, SLE_UINT16
),
13 static void Save_TMPL_RPLS()
15 TemplateReplacement
*tr
;
17 FOR_ALL_TEMPLATE_REPLACEMENTS(tr
) {
18 SlSetArrayIndex(tr
->index
);
19 SlObject(tr
, _template_replacement_desc
);
23 static void Load_TMPL_RPLS()
27 while ((index
= SlIterateArray()) != -1) {
28 TemplateReplacement
*tr
= new (index
) TemplateReplacement();
29 SlObject(tr
, _template_replacement_desc
);
33 extern const ChunkHandler _template_replacement_chunk_handlers
[] = {
34 {'TRPL', Save_TMPL_RPLS
, Load_TMPL_RPLS
, NULL
, NULL
, CH_ARRAY
| CH_LAST
},