Freeciv-3.1: /fast/freeciv/nightly/S3_1/tools/ruledit/tab_misc.cpp Source File

Freeciv-3.1

Loading...
Searching...
No Matches
tab_misc.cpp
Go to the documentation of this file.
1/***********************************************************************
2 Freeciv - Copyright (C) 1996 - A Kjeldberg, L Gregersen, P Unold
3 This program is free software; you can redistribute it and/or modify
4 it under the terms of the GNU General Public License as published by
5 the Free Software Foundation; either version 2, or (at your option)
6 any later version.
7
8 This program is distributed in the hope that it will be useful,
9 but WITHOUT ANY WARRANTY; without even the implied warranty of
10 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 GNU General Public License for more details.
12***********************************************************************/
13
14#ifdef HAVE_CONFIG_H
15#include <fc_config.h>
16#endif
17
18#ifdef FREECIV_MSWINDOWS
19#include <shlobj.h>
20#endif
21
22// Qt
23#include <QCheckBox>
24#include <QGridLayout>
25#include <QHeaderView>
26#include <QLineEdit>
27#include <QMessageBox>
28#include <QPushButton>
29#include <QTableWidget>
30
31// utility
32#include "fcintl.h"
33#include "log.h"
34#include "registry.h"
35
36// common
37#include "achievements.h"
38#include "game.h"
39#include "government.h"
40#include "specialist.h"
41
42// server
43#include "rssanity.h"
44
45// ruledit
46#include "conversion_log.h"
47#include "ruledit.h"
48#include "ruledit_qt.h"
49#include "rulesave.h"
50
51#include "tab_misc.h"
52
53/**********************************************************************/
56tab_misc::tab_misc(ruledit_gui *ui_in) : QWidget()
57{
58 QGridLayout *main_layout = new QGridLayout(this);
59 QLabel *save_label;
60 QLabel *save_ver_label;
61 QLabel *label;
62 QLabel *name_label;
63 QLabel *version_label;
64 QPushButton *button;
65 int row = 0;
66 QTableWidgetItem *item;
67 char ttbuf[2048];
68
69 ui = ui_in;
70
71 main_layout->setSizeConstraint(QLayout::SetMaximumSize);
72
73 name_label = new QLabel(QString::fromUtf8(R__("Ruleset name")));
74 name_label->setParent(this);
75 main_layout->addWidget(name_label, row, 0);
76 name = new QLineEdit(this);
77 main_layout->addWidget(name, row++, 1);
78 version_label = new QLabel(QString::fromUtf8(R__("Ruleset version")));
79 version_label->setParent(this);
80 main_layout->addWidget(version_label, row, 0);
81 version = new QLineEdit(this);
82 main_layout->addWidget(version, row++, 1);
83 save_label = new QLabel(QString::fromUtf8(R__("Save to directory")));
84 save_label->setParent(this);
85 main_layout->addWidget(save_label, row, 0);
86 savedir = new QLineEdit(this);
87
88#ifdef FREECIV_MSWINDOWS
89 PWSTR folder_path;
90
91 if (SHGetKnownFolderPath(FOLDERID_Documents, KF_FLAG_DEFAULT,
92 NULL, &folder_path) == S_OK) {
93 savedir->setText(QString::fromWCharArray(folder_path) + "\\ruledit-tmp");
94 } else {
95 savedir->setText("ruledit-tmp");
96 }
97
98#else // FREECIV_MSWINDOWS
99 savedir->setText("ruledit-tmp");
100#endif // FREECIV_MSWINDOWS
101
102 /* TRANS: %s%s%s -> path + directory separator ('/' or '\') + path
103 * Do not translate command '/rulesetdir' name. */
104 fc_snprintf(ttbuf, sizeof(ttbuf),
105 R__("If you want to be able to load the ruleset directly "
106 "to freeciv, place it as a subdirectory under %s%s%s\n"
107 "Use server command \"/rulesetdir <subdirectory>\" "
108 "to load it to freeciv."),
109 freeciv_storage_dir(), DIR_SEPARATOR, DATASUBDIR);
110 savedir->setToolTip(ttbuf);
111
112 savedir->setFocus();
113 main_layout->addWidget(savedir, row++, 1);
114 save_ver_label = new QLabel(QString::fromUtf8(R__("Version suffix to directory name")));
115 save_ver_label->setParent(this);
116 main_layout->addWidget(save_ver_label, row, 0);
117 savedir_version = new QCheckBox(this);
118 main_layout->addWidget(savedir_version, row++, 1);
119 button = new QPushButton(QString::fromUtf8(R__("Save now")), this);
120 connect(button, SIGNAL(pressed()), this, SLOT(save_now()));
121 main_layout->addWidget(button, row++, 1);
122
123 label = new QLabel(QString::fromUtf8(R__("Description from file")));
124 label->setParent(this);
125 main_layout->addWidget(label, row, 0);
126 desc_via_file = new QCheckBox(this);
127 connect(desc_via_file, SIGNAL(toggled(bool)), this, SLOT(desc_file_toggle(bool)));
128 main_layout->addWidget(desc_via_file, row++, 1);
129
130 label = new QLabel(QString::fromUtf8(R__("Description file")));
131 label->setParent(this);
132 main_layout->addWidget(label, row, 0);
133 desc_file = new QLineEdit(this);
134 main_layout->addWidget(desc_file, row++, 1);
135
136 button = new QPushButton(QString::fromUtf8(R__("Sanity check rules")), this);
137 connect(button, SIGNAL(pressed()), this, SLOT(sanity_check()));
138 main_layout->addWidget(button, row++, 1);
139
140 button = new QPushButton(QString::fromUtf8(R__("Always active Effects")), this);
141 connect(button, SIGNAL(pressed()), this, SLOT(edit_aae_effects()));
142 main_layout->addWidget(button, row++, 1);
143 button = new QPushButton(QString::fromUtf8(R__("All Effects")), this);
144 connect(button, SIGNAL(pressed()), this, SLOT(edit_all_effects()));
145 main_layout->addWidget(button, row++, 1);
146
147 stats = new QTableWidget(this);
148 stats->setColumnCount(8);
149 stats->setRowCount(7);
150 item = new QTableWidgetItem(QString::fromUtf8(RQ_("?stat:Terrains")));
151 stats->setItem(0, 0, item);
152 item = new QTableWidgetItem("-");
153 stats->setItem(0, 1, item);
154 item = new QTableWidgetItem(QString::fromUtf8(RQ_("?stat:Resources")));
155 stats->setItem(1, 0, item);
156 item = new QTableWidgetItem("-");
157 stats->setItem(1, 1, item);
158 item = new QTableWidgetItem(QString::fromUtf8(RQ_("?stat:Tech Classes")));
159 stats->setItem(2, 0, item);
160 item = new QTableWidgetItem("-");
161 stats->setItem(2, 1, item);
162 item = new QTableWidgetItem(QString::fromUtf8(RQ_("?stat:Techs")));
163 stats->setItem(3, 0, item);
164 item = new QTableWidgetItem("-");
165 stats->setItem(3, 1, item);
166 item = new QTableWidgetItem(QString::fromUtf8(RQ_("?stat:Unit Classes")));
167 stats->setItem(4, 0, item);
168 item = new QTableWidgetItem("-");
169 stats->setItem(4, 1, item);
170 item = new QTableWidgetItem(QString::fromUtf8(RQ_("?stat:Unit Types")));
171 stats->setItem(5, 0, item);
172 item = new QTableWidgetItem("-");
173 stats->setItem(5, 1, item);
174 item = new QTableWidgetItem(QString::fromUtf8(RQ_("?stat:Enablers")));
175 stats->setItem(6, 0, item);
176 item = new QTableWidgetItem("-");
177 stats->setItem(6, 1, item);
178 item = new QTableWidgetItem(QString::fromUtf8(RQ_("?stat:Buildings")));
179 stats->setItem(0, 3, item);
180 item = new QTableWidgetItem("-");
181 stats->setItem(0, 4, item);
182 item = new QTableWidgetItem(QString::fromUtf8(RQ_("?stat:Nations")));
183 stats->setItem(1, 3, item);
184 item = new QTableWidgetItem("-");
185 stats->setItem(1, 4, item);
186 item = new QTableWidgetItem(QString::fromUtf8(RQ_("?stat:Styles")));
187 stats->setItem(2, 3, item);
188 item = new QTableWidgetItem("-");
189 stats->setItem(2, 4, item);
190 item = new QTableWidgetItem(QString::fromUtf8(RQ_("?stat:Specialists")));
191 stats->setItem(3, 3, item);
192 item = new QTableWidgetItem("-");
193 stats->setItem(3, 4, item);
194 item = new QTableWidgetItem(QString::fromUtf8(RQ_("?stat:Governments")));
195 stats->setItem(4, 3, item);
196 item = new QTableWidgetItem("-");
197 stats->setItem(4, 4, item);
198 item = new QTableWidgetItem(QString::fromUtf8(RQ_("?stat:Disasters")));
199 stats->setItem(5, 3, item);
200 item = new QTableWidgetItem("-");
201 stats->setItem(5, 4, item);
202 item = new QTableWidgetItem(QString::fromUtf8(RQ_("?stat:Achievements")));
203 stats->setItem(0, 6, item);
204 item = new QTableWidgetItem("-");
205 stats->setItem(0, 7, item);
206 item = new QTableWidgetItem(QString::fromUtf8(RQ_("?stat:Extras")));
207 stats->setItem(1, 6, item);
208 item = new QTableWidgetItem("-");
209 stats->setItem(1, 7, item);
210 item = new QTableWidgetItem(QString::fromUtf8(RQ_("?stat:Bases")));
211 stats->setItem(2, 6, item);
212 item = new QTableWidgetItem("-");
213 stats->setItem(2, 7, item);
214 item = new QTableWidgetItem(QString::fromUtf8(RQ_("?stat:Roads")));
215 stats->setItem(3, 6, item);
216 item = new QTableWidgetItem("-");
217 stats->setItem(3, 7, item);
218 item = new QTableWidgetItem(QString::fromUtf8(RQ_("?stat:Goods")));
219 stats->setItem(4, 6, item);
220 item = new QTableWidgetItem("-");
221 stats->setItem(4, 7, item);
222 item = new QTableWidgetItem(QString::fromUtf8(RQ_("?stat:Multipliers")));
223 stats->setItem(5, 6, item);
224 item = new QTableWidgetItem("-");
225 stats->setItem(5, 7, item);
226 item = new QTableWidgetItem(QString::fromUtf8(RQ_("?stat:Effects")));
227 stats->setItem(6, 6, item);
228 item = new QTableWidgetItem("-");
229 stats->setItem(6, 7, item);
230 stats->verticalHeader()->setVisible(false);
231 stats->horizontalHeader()->setVisible(false);
232 stats->setEditTriggers(QAbstractItemView::NoEditTriggers);
233 main_layout->addWidget(stats, row++, 0, 1, 2);
234 button = new QPushButton(QString::fromUtf8(R__("Refresh Stats")), this);
235 connect(button, SIGNAL(pressed()), this, SLOT(refresh_stats()));
236 main_layout->addWidget(button, row++, 0, 1, 2);
237
238 refresh();
239
240 setLayout(main_layout);
241}
242
243/**********************************************************************/
246 void tab_misc::ruleset_loaded()
247{
248 if (game.server.ruledit.description_file != NULL) {
249 desc_via_file->setChecked(true);
250 desc_file->setText(game.server.ruledit.description_file);
251 } else {
252 desc_file->setEnabled(false);
253 }
254
255 refresh();
256}
257
258/**********************************************************************/
261 void tab_misc::refresh()
262{
263 name->setText(game.control.name);
264 version->setText(game.control.version);
265 refresh_stats();
266}
267
268/**********************************************************************/
271 void tab_misc::save_now()
272{
273 char nameUTF8[MAX_LEN_NAME];
274 QString full_dir;
275 QByteArray ba_bytes;
276
277 ui->flush_widgets();
278
279 ba_bytes = name->text().toUtf8();
280 strncpy(nameUTF8, ba_bytes.data(), sizeof(nameUTF8) - 1);
281
282 if (nameUTF8[0] != '\0') {
283 strncpy(game.control.name, nameUTF8, sizeof(game.control.name));
284 }
285
286 ba_bytes = version->text().toUtf8();
287 strncpy(game.control.version, ba_bytes.data(),
288 sizeof(game.control.version) - 1);
289
290 if (!autoadjust_ruleset_data() || !sanity_check_ruleset_data(NULL)) {
291 QMessageBox *box = new QMessageBox();
292
293 box->setText("Current data fails sanity checks. Save anyway?");
294 box->setStandardButtons(QMessageBox::Yes | QMessageBox::No);
295 box->exec();
296
297 if (box->result() != QMessageBox::Yes) {
298 return;
299 }
300 }
301
302 if (savedir_version->isChecked()) {
303 full_dir = savedir->text() + "-" + version->text();
304 } else {
305 full_dir = savedir->text();
306 }
307
308 ba_bytes = full_dir.toUtf8();
309 save_ruleset(ba_bytes.data(), nameUTF8,
310 &(ui->data));
311
312 ui->display_msg(R__("Ruleset saved"));
313}
314
315/**********************************************************************/
322 static bool effect_counter(struct effect *peff, void *data)
323{
324 (*(int *)data)++;
325
326 return TRUE;
327}
328
329/**********************************************************************/
332 void tab_misc::refresh_stats()
333{
334 int row = 0;
335 int count;
336 int base_count;
337 int road_count;
338
339 count = 0;
340 terrain_re_active_iterate(pterr) {
341 count++;
342 } terrain_re_active_iterate_end;
343 stats->item(row++, 1)->setText(QString::number(count));
344
345 stats->item(row++, 1)->setText(QString::number(game.control.num_resource_types));
346
347 count = 0;
348 tech_class_re_active_iterate(ptclass) {
349 count++;
350 } tech_class_re_active_iterate_end;
351 stats->item(row++, 1)->setText(QString::number(count));
352
353 count = 0;
354 advance_re_active_iterate(padv) {
355 count++;
356 } advance_re_active_iterate_end;
357 stats->item(row++, 1)->setText(QString::number(count));
358
359 count = 0;
360 unit_class_re_active_iterate(pclass) {
361 count++;
362 } unit_class_re_active_iterate_end;
363 stats->item(row++, 1)->setText(QString::number(count));
364
365 count = 0;
366 unit_type_re_active_iterate(ptype) {
367 count++;
368 } unit_type_re_active_iterate_end;
369 stats->item(row++, 1)->setText(QString::number(count));
370
371 count = 0;
372 action_iterate(act) {
373 action_enabler_list_re_iterate(action_enablers_for_action(act), enabler) {
374 count++;
375 } action_enabler_list_re_iterate_end;
376 } action_iterate_end;
377 stats->item(row++, 1)->setText(QString::number(count));
378
379 // Second column
380 row = 0;
381 count = 0;
382 improvement_re_active_iterate(pimpr) {
383 count++;
384 } improvement_re_active_iterate_end;
385 stats->item(row++, 4)->setText(QString::number(count));
386
387 stats->item(row++, 4)->setText(QString::number(game.control.nation_count));
388
389 count = 0;
390 styles_re_active_iterate(pstyle) {
391 count++;
392 } styles_re_active_iterate_end;
393 stats->item(row++, 4)->setText(QString::number(count));
394
395 count = 0;
396 specialist_type_re_active_iterate(pspe) {
397 count++;
398 } specialist_type_re_active_iterate_end;
399 stats->item(row++, 4)->setText(QString::number(count));
400
401 count = 0;
402 governments_re_active_iterate(pgov) {
403 count++;
404 } governments_re_active_iterate_end;
405 stats->item(row++, 4)->setText(QString::number(count));
406
407 stats->item(row++, 4)->setText(QString::number(game.control.num_disaster_types));
408
409 // Third column
410 row = 0;
411
412 count = 0;
413 achievements_re_active_iterate(pach) {
414 count++;
415 } achievements_re_active_iterate_end;
416 stats->item(row++, 7)->setText(QString::number(count));
417
418 count = 0;
419 base_count = 0;
420 road_count = 0;
421 extra_type_re_active_iterate(pextra) {
422 count++;
423 if (is_extra_caused_by(pextra, EC_BASE)) {
424 base_count++;
425 }
426 if (is_extra_caused_by(pextra, EC_ROAD)) {
427 road_count++;
428 }
429 } extra_type_re_active_iterate_end;
430 stats->item(row++, 7)->setText(QString::number(count));
431 stats->item(row++, 7)->setText(QString::number(base_count));
432 stats->item(row++, 7)->setText(QString::number(road_count));
433
434 count = 0;
435 goods_type_re_active_iterate(pg) {
436 count++;
437 } goods_type_re_active_iterate_end;
438 stats->item(row++, 7)->setText(QString::number(count));
439
440 count = 0;
441 multipliers_re_active_iterate(pmul) {
442 count++;
443 } multipliers_re_active_iterate_end;
444 stats->item(row++, 7)->setText(QString::number(count));
445
446 count = 0;
447 iterate_effect_cache(effect_counter, &count);
448 stats->item(row++, 7)->setText(QString::number(count));
449
450 stats->resizeColumnsToContents();
451}
452
453/**********************************************************************/
456 void tab_misc::edit_aae_effects()
457{
458 ui->open_effect_edit(QString::fromUtf8(R__("Always active")),
459 nullptr, EFMC_NONE);
460}
461
462 static conversion_log *sanitylog;
463
464/**********************************************************************/
467 static void sanity_log_cb(const char *msg)
468{
469 sanitylog->add(msg);
470}
471
472/**********************************************************************/
475 void tab_misc::sanity_check()
476{
477 struct rscompat_info compat_info;
478
479 sanitylog = new conversion_log(QString::fromUtf8(R__("Sanity Check")));
480
481 rscompat_init_info(&compat_info);
482 compat_info.compat_mode = FALSE;
483 compat_info.log_cb = sanity_log_cb;
484
485 if (!sanity_check_ruleset_data(&compat_info)) {
486 ui->display_msg(R__("Sanity check failed!"));
487 } else {
488 ui->display_msg(R__("Sanity check success"));
489 }
490}
491
492/**********************************************************************/
495 void tab_misc::edit_all_effects()
496{
497 ui->open_effect_edit(QString::fromUtf8(R__("All effects")),
498 nullptr, EFMC_ALL);
499}
500
501/**********************************************************************/
504 void tab_misc::flush_widgets()
505{
506 if (desc_via_file->isChecked()) {
507 QByteArray df_bytes;
508
509 df_bytes = desc_file->text().toUtf8();
510 game.server.ruledit.description_file = fc_strdup(df_bytes.data());
511 } else {
512 if (game.server.ruledit.description_file != NULL) {
513 free(game.server.ruledit.description_file);
514 }
515 game.server.ruledit.description_file = NULL;
516 }
517}
518
519/**********************************************************************/
522 void tab_misc::desc_file_toggle(bool checked)
523{
524 desc_file->setEnabled(checked);
525}
achievements.h
achievements_re_active_iterate
#define achievements_re_active_iterate(_p)
Definition achievements.h:74
achievements_re_active_iterate_end
#define achievements_re_active_iterate_end
Definition achievements.h:78
action_enablers_for_action
struct action_enabler_list * action_enablers_for_action(action_id action)
Definition actions.c:2475
action_enabler_list_re_iterate_end
#define action_enabler_list_re_iterate_end
Definition actions.h:463
action_enabler_list_re_iterate
#define action_enabler_list_re_iterate(action_enabler_list, aenabler)
Definition actions.h:459
action_iterate_end
#define action_iterate_end
Definition actions.h:472
action_iterate
#define action_iterate(_act_)
Definition actions.h:467
base_count
Base_type_id base_count(void)
Definition base.c:109
conversion_log
Definition conversion_log.h:26
conversion_log::add
void add(const char *msg)
Definition conversion_log.cpp:54
ruledit_gui
Definition ruledit_qt.h:96
ruledit_gui::flush_widgets
void flush_widgets()
Definition ruledit_qt.cpp:322
ruledit_gui::data
struct rule_data data
Definition ruledit_qt.h:117
ruledit_gui::display_msg
void display_msg(const char *msg)
Definition ruledit_qt.cpp:289
ruledit_gui::open_effect_edit
void open_effect_edit(QString target, struct universal *uni, enum effect_filter_main_class efmc)
Definition ruledit_qt.cpp:400
tab_misc::edit_aae_effects
void edit_aae_effects()
Definition tab_misc.cpp:456
tab_misc::ui
ruledit_gui * ui
Definition tab_misc.h:45
tab_misc::desc_file_toggle
void desc_file_toggle(bool checked)
Definition tab_misc.cpp:522
tab_misc::savedir
QLineEdit * savedir
Definition tab_misc.h:48
tab_misc::save_now
void save_now()
Definition tab_misc.cpp:271
tab_misc::name
QLineEdit * name
Definition tab_misc.h:46
tab_misc::desc_file
QLineEdit * desc_file
Definition tab_misc.h:52
tab_misc::desc_via_file
QCheckBox * desc_via_file
Definition tab_misc.h:51
tab_misc::edit_all_effects
void edit_all_effects()
Definition tab_misc.cpp:495
tab_misc::flush_widgets
void flush_widgets()
Definition tab_misc.cpp:504
tab_misc::refresh_stats
void refresh_stats()
Definition tab_misc.cpp:332
tab_misc::savedir_version
QCheckBox * savedir_version
Definition tab_misc.h:49
tab_misc::ruleset_loaded
void ruleset_loaded()
Definition tab_misc.cpp:246
tab_misc::stats
QTableWidget * stats
Definition tab_misc.h:50
tab_misc::version
QLineEdit * version
Definition tab_misc.h:47
tab_misc::tab_misc
tab_misc(ruledit_gui *ui_in)
Definition tab_misc.cpp:56
tab_misc::sanity_check
void sanity_check()
Definition tab_misc.cpp:475
tab_misc::refresh
void refresh()
Definition tab_misc.cpp:261
conversion_log.h
EFMC_ALL
@ EFMC_ALL
Definition effect_edit.h:35
EFMC_NONE
@ EFMC_NONE
Definition effect_edit.h:34
iterate_effect_cache
bool iterate_effect_cache(iec_cb cb, void *data)
Definition effects.c:1245
is_extra_caused_by
#define is_extra_caused_by(e, c)
Definition extras.h:196
extra_type_re_active_iterate_end
#define extra_type_re_active_iterate_end
Definition extras.h:305
extra_type_re_active_iterate
#define extra_type_re_active_iterate(_p)
Definition extras.h:301
MAX_LEN_NAME
#define MAX_LEN_NAME
Definition fc_types.h:66
fcintl.h
RQ_
#define RQ_(String)
Definition fcintl.h:76
R__
#define R__(String)
Definition fcintl.h:75
game
struct civ_game game
Definition game.c:57
game.h
government.h
governments_re_active_iterate
#define governments_re_active_iterate(_p)
Definition government.h:125
governments_re_active_iterate_end
#define governments_re_active_iterate_end
Definition government.h:129
improvement_re_active_iterate_end
#define improvement_re_active_iterate_end
Definition improvement.h:220
improvement_re_active_iterate
#define improvement_re_active_iterate(_p)
Definition improvement.h:216
log.h
fc_strdup
#define fc_strdup(str)
Definition mem.h:43
multipliers_re_active_iterate
#define multipliers_re_active_iterate(_mul_)
Definition multipliers.h:71
multipliers_re_active_iterate_end
#define multipliers_re_active_iterate_end
Definition multipliers.h:75
registry.h
road_count
Road_type_id road_count(void)
Definition road.c:50
rscompat_init_info
void rscompat_init_info(struct rscompat_info *info)
Definition rscompat.c:56
sanity_check_ruleset_data
bool sanity_check_ruleset_data(struct rscompat_info *compat)
Definition rssanity.c:836
autoadjust_ruleset_data
bool autoadjust_ruleset_data(void)
Definition rssanity.c:1517
rssanity.h
ruledit.h
ruledit_qt.h
save_ruleset
bool save_ruleset(const char *path, const char *name, struct rule_data *data)
Definition rulesave.c:3131
rulesave.h
freeciv_storage_dir
char * freeciv_storage_dir(void)
Definition shared.c:672
DIR_SEPARATOR
#define DIR_SEPARATOR
Definition shared.h:127
specialist.h
specialist_type_re_active_iterate_end
#define specialist_type_re_active_iterate_end
Definition specialist.h:88
specialist_type_re_active_iterate
#define specialist_type_re_active_iterate(_p)
Definition specialist.h:83
civ_game::server
struct civ_game::@30::@34 server
civ_game::description_file
char * description_file
Definition game.h:273
civ_game::control
struct packet_ruleset_control control
Definition game.h:83
civ_game::ruledit
struct civ_game::@30::@34::@39 ruledit
effect
Definition effects.h:340
item
Definition climisc.h:80
packet_ruleset_control::version
char version[MAX_LEN_NAME]
Definition packets_gen.h:1482
packet_ruleset_control::nation_count
int nation_count
Definition packets_gen.h:1471
packet_ruleset_control::num_disaster_types
int num_disaster_types
Definition packets_gen.h:1465
packet_ruleset_control::num_resource_types
int num_resource_types
Definition packets_gen.h:1463
packet_ruleset_control::name
char name[MAX_LEN_NAME]
Definition packets_gen.h:1481
rscompat_info
Definition rscompat.h:29
rscompat_info::compat_mode
bool compat_mode
Definition rscompat.h:30
rscompat_info::log_cb
rs_conversion_logger log_cb
Definition rscompat.h:31
styles_re_active_iterate_end
#define styles_re_active_iterate_end
Definition style.h:60
styles_re_active_iterate
#define styles_re_active_iterate(_p)
Definition style.h:56
fc_snprintf
int fc_snprintf(char *str, size_t n, const char *format,...)
Definition support.c:969
TRUE
#define TRUE
Definition support.h:46
FALSE
#define FALSE
Definition support.h:47
sanitylog
static conversion_log * sanitylog
Definition tab_misc.cpp:462
sanity_log_cb
static void sanity_log_cb(const char *msg)
Definition tab_misc.cpp:467
effect_counter
static bool effect_counter(struct effect *peff, void *data)
Definition tab_misc.cpp:322
tab_misc.h
advance_re_active_iterate
#define advance_re_active_iterate(_p)
Definition tech.h:275
tech_class_re_active_iterate
#define tech_class_re_active_iterate(_p)
Definition tech.h:208
advance_re_active_iterate_end
#define advance_re_active_iterate_end
Definition tech.h:279
tech_class_re_active_iterate_end
#define tech_class_re_active_iterate_end
Definition tech.h:212
terrain_re_active_iterate_end
#define terrain_re_active_iterate_end
Definition terrain.h:373
terrain_re_active_iterate
#define terrain_re_active_iterate(_p)
Definition terrain.h:369
goods_type_re_active_iterate_end
#define goods_type_re_active_iterate_end
Definition traderoutes.h:231
goods_type_re_active_iterate
#define goods_type_re_active_iterate(_p)
Definition traderoutes.h:227
unit_type_re_active_iterate
#define unit_type_re_active_iterate(_p)
Definition unittype.h:850
unit_class_re_active_iterate_end
#define unit_class_re_active_iterate_end
Definition unittype.h:892
unit_class_re_active_iterate
#define unit_class_re_active_iterate(_p)
Definition unittype.h:888
unit_type_re_active_iterate_end
#define unit_type_re_active_iterate_end
Definition unittype.h:854