Freeciv-3.2: /fast/freeciv/nightly/S3_2/tools/ruledit/ruledit_qt.cpp Source File

Freeciv-3.2

Loading...
Searching...
No Matches
ruledit_qt.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// Qt
19#include <QApplication>
20#include <QCloseEvent>
21#include <QLabel>
22#include <QLineEdit>
23#include <QMainWindow>
24#include <QMessageBox>
25#include <QPushButton>
26#include <QStackedLayout>
27#include <QVBoxLayout>
28
29// utility
30#include "fcintl.h"
31#include "log.h"
32#include "registry.h"
33
34// common
35#include "game.h"
36#include "version.h"
37
38// server
39#include "ruleset.h"
40
41// ruledit
42#include "conversion_log.h"
43#include "effect_edit.h"
44#include "requirers_dlg.h"
45#include "req_edit.h"
46#include "req_vec_fix.h"
47#include "ruledit.h"
48#include "tab_achievement.h"
49#include "tab_building.h"
50#include "tab_counters.h"
51#include "tab_enablers.h"
52#include "tab_extras.h"
53#include "tab_good.h"
54#include "tab_gov.h"
55#include "tab_misc.h"
56#include "tab_multiplier.h"
57#include "tab_nation.h"
58#include "tab_tech.h"
59#include "tab_terrains.h"
60#include "tab_unit.h"
61
62#include "ruledit_qt.h"
63
64 static ruledit_gui *gui;
65 static QApplication *qapp;
66 static conversion_log *convlog;
67
68/**********************************************************************/
71 int ruledit_qt_run(int argc, char **argv)
72{
73 ruledit_main *main_window;
74 QWidget *central;
75 int ret;
76
77 qapp = new QApplication(argc, argv);
78 central = new QWidget;
79 main_window = new ruledit_main(qapp, central);
80
81 gui = new ruledit_gui;
82 gui->setup(central);
83 main_window->setCentralWidget(central);
84 main_window->setVisible(true);
85
86 ret = qapp->exec();
87
88 delete gui;
89 delete qapp;
90
91 return ret;
92}
93
94/**********************************************************************/
97 void ruledit_qt_display_requirers(const char *msg, void *data)
98{
99 requirers_dlg *requirers = (requirers_dlg *)data;
100
101 gui->show_required(requirers, msg);
102}
103
104/**********************************************************************/
107 void ruledit_gui::setup(QWidget *central_in)
108{
109 QVBoxLayout *full_layout = new QVBoxLayout();
110 QVBoxLayout *edit_layout = new QVBoxLayout();
111 QWidget *edit_widget = new QWidget();
112 QPushButton *ruleset_accept;
113 QLabel *rs_label;
114 QLabel *version_label;
115 char verbuf[2048];
116 const char *rev_ver;
117 const char *mode;
118
119 data.nationlist = NULL;
120 data.nationlist_saved = NULL;
121
122 central = central_in;
123
124 rev_ver = fc_git_revision();
125
126#ifndef FC_QT5_MODE
127 mode = R__("built in Qt6 mode.");
128#else // FC_QT5_MODE
129 mode = R__("built in Qt5 mode.");
130#endif // FC_QT5_MODE
131
132 if (rev_ver == NULL) {
133 fc_snprintf(verbuf, sizeof(verbuf), "%s%s\n%s", word_version(),
134 VERSION_STRING, mode);
135 } else {
136 fc_snprintf(verbuf, sizeof(verbuf), R__("%s%s\ncommit: %s\n%s"),
137 word_version(), VERSION_STRING, rev_ver, mode);
138 }
139
140 main_layout = new QStackedLayout();
141
142 if (reargs.ruleset == nullptr) {
143 QVBoxLayout *preload_layout = new QVBoxLayout();
144 QWidget *preload_widget = new QWidget();
145
146 preload_layout->setSizeConstraint(QLayout::SetMaximumSize);
147 version_label = new QLabel(verbuf);
148 version_label->setAlignment(Qt::AlignHCenter);
149 version_label->setParent(central);
150 preload_layout->addWidget(version_label);
151 rs_label = new QLabel(QString::fromUtf8(R__("Give ruleset to use as starting point.")));
152 rs_label->setSizePolicy(QSizePolicy::Ignored, QSizePolicy::Fixed);
153 preload_layout->addWidget(rs_label);
154 ruleset_select = new QLineEdit(central);
155 ruleset_select->setText(GAME_DEFAULT_RULESETDIR);
156 connect(ruleset_select, SIGNAL(returnPressed()),
157 this, SLOT(rulesetdir_given()));
158 preload_layout->addWidget(ruleset_select);
159 ruleset_accept = new QPushButton(QString::fromUtf8(R__("Start editing")));
160 connect(ruleset_accept, SIGNAL(pressed()), this, SLOT(rulesetdir_given()));
161 preload_layout->addWidget(ruleset_accept);
162
163 preload_widget->setLayout(preload_layout);
164 main_layout->addWidget(preload_widget);
165 }
166
167 stack = new QTabWidget(central);
168
169 misc = new tab_misc(this);
170 stack->addTab(misc, QString::fromUtf8(R__("Misc")));
171 tech = new tab_tech(this);
172 stack->addTab(tech, QString::fromUtf8(R__("Tech")));
173 bldg = new tab_building(this);
174 stack->addTab(bldg, QString::fromUtf8(R__("Buildings")));
175 unit = new tab_unit(this);
176 stack->addTab(unit, QString::fromUtf8(R__("Units")));
177 ach = new tab_achievement(this);
178 stack->addTab(ach, QString::fromUtf8(R__("Achievements")));
179 good = new tab_good(this);
180 stack->addTab(good, QString::fromUtf8(R__("Goods")));
181 gov = new tab_gov(this);
182 stack->addTab(gov, QString::fromUtf8(R__("Governments")));
183 enablers = new tab_enabler(this);
184 stack->addTab(enablers, QString::fromUtf8(R__("Enablers")));
185 extras = new tab_extras(this);
186 stack->addTab(extras, QString::fromUtf8(R__("Extras")));
187 terrains = new tab_terrains(this);
188 stack->addTab(terrains, QString::fromUtf8(R__("Terrains")));
189 multipliers = new tab_multiplier(this);
190 stack->addTab(multipliers, QString::fromUtf8(R__("Multipliers")));
191 counter = new tab_counter(this);
192 stack->addTab(counter, QString::fromUtf8(R__("Counters")));
193 nation = new tab_nation(this);
194 stack->addTab(nation, QString::fromUtf8(R__("Nations")));
195
196 edit_layout->addWidget(stack);
197
198 edit_widget->setLayout(edit_layout);
199 main_layout->addWidget(edit_widget);
200
201 full_layout->addLayout(main_layout);
202
203 msg_dspl = new QLabel(QString::fromUtf8(R__("Welcome to freeciv-ruledit")));
204 msg_dspl->setParent(central);
205
206 msg_dspl->setAlignment(Qt::AlignHCenter);
207
208 full_layout->addWidget(msg_dspl);
209
210 central->setLayout(full_layout);
211
212 req_edits = req_edit_list_new();
213 this->req_vec_fixers = req_vec_fix_list_new();
214 effect_edits = effect_edit_list_new();
215
216 if (reargs.ruleset != nullptr) {
217 sz_strlcpy(game.server.rulesetdir, reargs.ruleset);
218 launch_now();
219 }
220}
221
222/**********************************************************************/
225 static void conversion_log_cb(const char *msg)
226{
227 convlog->add(msg);
228}
229
230/**********************************************************************/
233 void ruledit_gui::rulesetdir_given()
234{
235 QByteArray rn_bytes;
236
237 rn_bytes = ruleset_select->text().toUtf8();
238 sz_strlcpy(game.server.rulesetdir, rn_bytes.data());
239
240 launch_now();
241}
242
243/**********************************************************************/
248 void ruledit_gui::launch_now()
249{
250 convlog = new conversion_log(QString::fromUtf8(R__("Old ruleset to a new format")));
251
252 if (load_rulesets(NULL, NULL, TRUE, conversion_log_cb, FALSE, TRUE, TRUE)) {
253 display_msg(R__("Ruleset loaded"));
254
255 // Make freeable copy
256 if (game.server.ruledit.nationlist != NULL) {
257 data.nationlist = fc_strdup(game.server.ruledit.nationlist);
258 } else {
259 data.nationlist = NULL;
260 }
261
262 ach->refresh();
263 bldg->refresh();
264 misc->ruleset_loaded();
265 nation->refresh();
266 tech->refresh();
267 unit->refresh();
268 good->refresh();
269 gov->refresh();
270 enablers->refresh();
271 extras->refresh();
272 multipliers->refresh();
273 terrains->refresh();
274 counter->refresh();
275 main_layout->setCurrentIndex(1);
276 } else {
277 display_msg(R__("Ruleset loading failed!"));
278 }
279}
280
281/**********************************************************************/
285 void ruledit_gui::incoming_req_vec_change(const requirement_vector *vec)
286{
287 emit req_vec_may_have_changed(vec);
288}
289
290/**********************************************************************/
293 void ruledit_gui::display_msg(const char *msg)
294{
295 msg_dspl->setText(QString::fromUtf8(msg));
296}
297
298/**********************************************************************/
301 requirers_dlg *ruledit_gui::create_requirers(const char *title)
302{
303 requirers_dlg *requirers;
304
305 requirers = new requirers_dlg(this);
306
307 requirers->clear(title);
308
309 return requirers;
310}
311
312/**********************************************************************/
315 void ruledit_gui::show_required(requirers_dlg *requirers, const char *msg)
316{
317 requirers->add(msg);
318
319 // Show dialog if not already visible
320 requirers->show();
321}
322
323/**********************************************************************/
326 void ruledit_gui::flush_widgets()
327{
328 misc->flush_widgets();
329 nation->flush_widgets();
330}
331
332/**********************************************************************/
335 void ruledit_gui::open_req_edit(QString target, struct requirement_vector *preqs)
336{
337 req_edit *redit;
338
339 req_edit_list_iterate(req_edits, old_edit) {
340 if (old_edit->req_vector == preqs) {
341 // Already open
342 return;
343 }
344 } req_edit_list_iterate_end;
345
346 redit = new req_edit(this, target, preqs);
347
348 redit->show();
349
350 connect(redit,
351 SIGNAL(req_vec_may_have_changed(const requirement_vector *)),
352 this, SLOT(incoming_req_vec_change(const requirement_vector *)));
353
354 req_edit_list_append(req_edits, redit);
355}
356
357/**********************************************************************/
360 void ruledit_gui::unregister_req_edit(class req_edit *redit)
361{
362 req_edit_list_remove(req_edits, redit);
363}
364
365/**********************************************************************/
368 void ruledit_gui::open_req_vec_fix(req_vec_fix_item *item_info)
369{
370 req_vec_fix *fixer;
371
372 req_vec_fix_list_iterate(req_vec_fixers, old_fixer) {
373 if (old_fixer->item() == item_info->item()) {
374 item_info->close();
375
376 // Already open
377 return;
378 }
379 } req_vec_fix_list_iterate_end;
380
381 fixer = new req_vec_fix(this, item_info);
382
383 fixer->refresh();
384 fixer->show();
385
386 connect(fixer,
387 SIGNAL(rec_veq_may_have_changed(const requirement_vector *)),
388 this, SLOT(incoming_req_vec_change(const requirement_vector *)));
389
390 req_vec_fix_list_append(req_vec_fixers, fixer);
391}
392
393/**********************************************************************/
396 void ruledit_gui::unregister_req_vec_fix(req_vec_fix *fixer)
397{
398 req_vec_fix_list_remove(req_vec_fixers, fixer);
399}
400
401/**********************************************************************/
404 void ruledit_gui::open_effect_edit(QString target, struct universal *uni,
405 enum effect_filter_main_class efmc)
406{
407 effect_edit *e_edit;
408
409 effect_edit_list_iterate(effect_edits, old_edit) {
410 struct universal *old = old_edit->filter_get();
411
412 if (uni != nullptr) {
413 if (are_universals_equal(old, uni)) {
414 // Already open
415 return;
416 }
417 } else if (old->kind == VUT_NONE && old_edit->efmc == efmc) {
418 // Already open
419 return;
420 }
421 } effect_edit_list_iterate_end;
422
423 e_edit = new effect_edit(this, target, uni, efmc);
424
425 e_edit->show();
426
427 effect_edit_list_append(effect_edits, e_edit);
428}
429
430/**********************************************************************/
433 void ruledit_gui::unregister_effect_edit(class effect_edit *e_edit)
434{
435 effect_edit_list_remove(effect_edits, e_edit);
436}
437
438/**********************************************************************/
441 void ruledit_gui::refresh_effect_edits()
442{
443 effect_edit_list_iterate(effect_edits, e_edit) {
444 e_edit->refresh();
445 } effect_edit_list_iterate_end;
446}
447
448/**********************************************************************/
451ruledit_main::ruledit_main(QApplication *qapp_in, QWidget *central_in) : QMainWindow()
452{
453 QPixmap *pm = new QPixmap;
454 const char *full_icon_path = fileinfoname(get_data_dirs(), "freeciv-ruledit.png");
455 const QString title = QString::fromUtf8(R__("Freeciv Ruleset Editor"));
456 const QString fip = QString(full_icon_path);
457 QSize old_size;
458 int width;
459 int height;
460
461 pm->load(fip);
462 qapp_in->setWindowIcon(QIcon(*pm));
463
464 qapp = qapp_in;
465 central = central_in;
466
467 setWindowTitle(title);
468
469 // Adjust Window size
470 old_size = size();
471 width = old_size.width();
472 height = old_size.height();
473
474 width = MAX(width, RULEDIT_WINWIDTH);
475 height = MAX(height, RULEDIT_WINHEIGHT);
476
477 resize(width, height);
478}
479
480/**********************************************************************/
483 void ruledit_main::popup_quit_dialog()
484{
485 QMessageBox ask(central);
486 int ret;
487
488 ask.setText(R__("Are you sure you want to quit?"));
489 ask.setStandardButtons(QMessageBox::Cancel | QMessageBox::Ok);
490 ask.setDefaultButton(QMessageBox::Cancel);
491 ask.setIcon(QMessageBox::Warning);
492 ask.setWindowTitle(R__("Quit?"));
493 ret = ask.exec();
494
495 switch (ret) {
496 case QMessageBox::Cancel:
497 return;
498 break;
499 case QMessageBox::Ok:
500 qapp->quit();
501 break;
502 }
503}
504
505/**********************************************************************/
508 void ruledit_main::closeEvent(QCloseEvent *cevent)
509{
510 // Handle quit via confirmation dialog.
511 popup_quit_dialog();
512
513 // Do not handle quit here, but let user to answer to confirmation dialog.
514 cevent->ignore();
515}
height
struct canvas int int struct sprite int int int int height
Definition canvas_g.h:44
width
struct canvas int int struct sprite int int int width
Definition canvas_g.h:44
conversion_log
Definition conversion_log.h:26
conversion_log::add
void add(const char *msg)
Definition conversion_log.cpp:54
effect_edit
Definition effect_edit.h:48
req_edit
Definition req_edit.h:36
req_vec_fix_item
Definition req_vec_fix.h:49
req_vec_fix_item::close
virtual void close()=0
req_vec_fix_item::item
virtual const void * item()=0
req_vec_fix
Definition req_vec_fix.h:158
requirers_dlg
Definition requirers_dlg.h:28
ruledit_gui
Definition ruledit_qt.h:97
ruledit_gui::nation
tab_nation * nation
Definition ruledit_qt.h:148
ruledit_gui::ach
tab_achievement * ach
Definition ruledit_qt.h:136
ruledit_gui::req_vec_may_have_changed
void req_vec_may_have_changed(const requirement_vector *vec)
ruledit_gui::open_req_vec_fix
void open_req_vec_fix(req_vec_fix_item *item_info)
Definition ruledit_qt.cpp:368
ruledit_gui::good
tab_good * good
Definition ruledit_qt.h:142
ruledit_gui::enablers
tab_enabler * enablers
Definition ruledit_qt.h:144
ruledit_gui::unregister_effect_edit
void unregister_effect_edit(class effect_edit *e_edit)
Definition ruledit_qt.cpp:433
ruledit_gui::flush_widgets
void flush_widgets()
Definition ruledit_qt.cpp:326
ruledit_gui::multipliers
tab_multiplier * multipliers
Definition ruledit_qt.h:146
ruledit_gui::main_layout
QStackedLayout * main_layout
Definition ruledit_qt.h:134
ruledit_gui::data
struct rule_data data
Definition ruledit_qt.h:118
ruledit_gui::misc
tab_misc * misc
Definition ruledit_qt.h:139
ruledit_gui::effect_edits
struct effect_edit_list * effect_edits
Definition ruledit_qt.h:152
ruledit_gui::extras
tab_extras * extras
Definition ruledit_qt.h:145
ruledit_gui::incoming_req_vec_change
void incoming_req_vec_change(const requirement_vector *vec)
Definition ruledit_qt.cpp:285
ruledit_gui::terrains
tab_terrains * terrains
Definition ruledit_qt.h:147
ruledit_gui::display_msg
void display_msg(const char *msg)
Definition ruledit_qt.cpp:293
ruledit_gui::refresh_effect_edits
void refresh_effect_edits()
Definition ruledit_qt.cpp:441
ruledit_gui::setup
void setup(QWidget *central_in)
Definition ruledit_qt.cpp:107
ruledit_gui::open_req_edit
void open_req_edit(QString target, struct requirement_vector *preqs)
Definition ruledit_qt.cpp:335
ruledit_gui::gov
tab_gov * gov
Definition ruledit_qt.h:143
ruledit_gui::unregister_req_vec_fix
void unregister_req_vec_fix(req_vec_fix *fixer)
Definition ruledit_qt.cpp:396
ruledit_gui::bldg
tab_building * bldg
Definition ruledit_qt.h:137
ruledit_gui::create_requirers
requirers_dlg * create_requirers(const char *title)
Definition ruledit_qt.cpp:301
ruledit_gui::tech
tab_tech * tech
Definition ruledit_qt.h:140
ruledit_gui::launch_now
void launch_now()
Definition ruledit_qt.cpp:248
ruledit_gui::req_edits
struct req_edit_list * req_edits
Definition ruledit_qt.h:150
ruledit_gui::stack
QTabWidget * stack
Definition ruledit_qt.h:131
ruledit_gui::req_vec_fixers
struct req_vec_fix_list * req_vec_fixers
Definition ruledit_qt.h:151
ruledit_gui::show_required
void show_required(requirers_dlg *requirers, const char *msg)
Definition ruledit_qt.cpp:315
ruledit_gui::msg_dspl
QLabel * msg_dspl
Definition ruledit_qt.h:130
ruledit_gui::central
QWidget * central
Definition ruledit_qt.h:133
ruledit_gui::rulesetdir_given
void rulesetdir_given()
Definition ruledit_qt.cpp:233
ruledit_gui::open_effect_edit
void open_effect_edit(QString target, struct universal *uni, enum effect_filter_main_class efmc)
Definition ruledit_qt.cpp:404
ruledit_gui::ruleset_select
QLineEdit * ruleset_select
Definition ruledit_qt.h:132
ruledit_gui::unregister_req_edit
void unregister_req_edit(class req_edit *redit)
Definition ruledit_qt.cpp:360
ruledit_main
Definition ruledit_qt.h:54
ruledit_main::central
QWidget * central
Definition ruledit_qt.h:63
ruledit_main::popup_quit_dialog
void popup_quit_dialog()
Definition ruledit_qt.cpp:483
ruledit_main::ruledit_main
ruledit_main(QApplication *qapp_in, QWidget *central_in)
Definition ruledit_qt.cpp:451
ruledit_main::closeEvent
void closeEvent(QCloseEvent *cevent)
Definition ruledit_qt.cpp:508
ruledit_main::qapp
QApplication * qapp
Definition ruledit_qt.h:62
tab_achievement
Definition tab_achievement.h:31
tab_achievement::refresh
void refresh()
Definition tab_achievement.cpp:111
tab_building
Definition tab_building.h:31
tab_building::refresh
void refresh()
Definition tab_building.cpp:117
tab_counter
Definition tab_counters.h:36
tab_enabler
Definition tab_enablers.h:37
tab_enabler::refresh
void refresh()
Definition tab_enablers.cpp:178
tab_extras
Definition tab_extras.h:31
tab_extras::refresh
void refresh()
Definition tab_extras.cpp:120
tab_good
Definition tab_good.h:31
tab_good::refresh
void refresh()
Definition tab_good.cpp:114
tab_gov
Definition tab_gov.h:31
tab_gov::refresh
void refresh()
Definition tab_gov.cpp:113
tab_misc
Definition tab_misc.h:27
tab_misc::flush_widgets
void flush_widgets()
Definition tab_misc.cpp:514
tab_misc::ruleset_loaded
void ruleset_loaded()
Definition tab_misc.cpp:251
tab_multiplier
Definition tab_multiplier.h:31
tab_multiplier::refresh
void refresh()
Definition tab_multiplier.cpp:109
tab_nation
Definition tab_nation.h:26
tab_nation::flush_widgets
void flush_widgets()
Definition tab_nation.cpp:83
tab_nation::refresh
void refresh()
Definition tab_nation.cpp:68
tab_tech
Definition tab_tech.h:38
tab_tech::refresh
void refresh()
Definition tab_tech.cpp:141
tab_terrains
Definition tab_terrains.h:31
tab_terrains::refresh
void refresh()
Definition tab_terrains.cpp:116
tab_unit
Definition tab_unit.h:31
incite_cost
char * incite_cost
Definition comments.c:74
conversion_log.h
effect_edit.h
effect_filter_main_class
effect_filter_main_class
Definition effect_edit.h:34
fcintl.h
R__
#define R__(String)
Definition fcintl.h:75
game
struct civ_game game
Definition game.c:62
game.h
GAME_DEFAULT_RULESETDIR
#define GAME_DEFAULT_RULESETDIR
Definition game.h:672
title
const char * title
Definition repodlgs.c:1314
log.h
fc_strdup
#define fc_strdup(str)
Definition mem.h:43
registry.h
req_edit.h
req_vec_fix.h
are_universals_equal
bool are_universals_equal(const struct universal *psource1, const struct universal *psource2)
Definition requirements.c:6466
requirers_dlg.h
reargs
struct ruledit_arguments reargs
Definition ruledit.cpp:56
ruledit.h
ruledit_qt_display_requirers
void ruledit_qt_display_requirers(const char *msg, void *data)
Definition ruledit_qt.cpp:97
qapp
static QApplication * qapp
Definition ruledit_qt.cpp:65
ruledit_qt_run
int ruledit_qt_run(int argc, char **argv)
Definition ruledit_qt.cpp:71
conversion_log_cb
static void conversion_log_cb(const char *msg)
Definition ruledit_qt.cpp:225
gui
static ruledit_gui * gui
Definition ruledit_qt.cpp:64
convlog
static conversion_log * convlog
Definition ruledit_qt.cpp:66
ruledit_qt.h
RULEDIT_WINHEIGHT
#define RULEDIT_WINHEIGHT
Definition ruledit_qt.h:51
effect_edit_list_iterate_end
#define effect_edit_list_iterate_end
Definition ruledit_qt.h:85
req_edit_list_iterate
#define req_edit_list_iterate(reqeditlist, preqedit)
Definition ruledit_qt.h:74
RULEDIT_WINWIDTH
#define RULEDIT_WINWIDTH
Definition ruledit_qt.h:50
req_vec_fix_list_iterate
#define req_vec_fix_list_iterate(reqvecfixlist, preqvecfix)
Definition ruledit_qt.h:92
effect_edit_list_iterate
#define effect_edit_list_iterate(effecteditlist, peffectedit)
Definition ruledit_qt.h:83
req_edit_list_iterate_end
#define req_edit_list_iterate_end
Definition ruledit_qt.h:76
req_vec_fix_list_iterate_end
#define req_vec_fix_list_iterate_end
Definition ruledit_qt.h:94
load_rulesets
bool load_rulesets(const char *restore, const char *alt, bool compat_mode, rs_conversion_logger logger, bool act, bool buffer_script, bool load_luadata)
Definition ruleset.c:9363
ruleset.h
fileinfoname
const char * fileinfoname(const struct strvec *dirs, const char *filename)
Definition shared.c:1101
get_data_dirs
const struct strvec * get_data_dirs(void)
Definition shared.c:893
MAX
#define MAX(x, y)
Definition shared.h:54
size
size_t size
Definition specvec.h:72
civ_game::nationlist
char * nationlist
Definition game.h:281
civ_game::rulesetdir
char rulesetdir[MAX_LEN_NAME]
Definition game.h:238
civ_game::ruledit
struct civ_game::@31::@35::@40 ruledit
civ_game::server
struct civ_game::@31::@35 server
counter
Definition counters.h:27
rule_data::nationlist
char * nationlist
Definition rulesave.h:22
rule_data::nationlist_saved
char * nationlist_saved
Definition rulesave.h:23
ruledit_arguments::ruleset
char * ruleset
Definition ruledit.h:20
unit
Definition unit.h:138
universal
Definition fc_types.h:901
universal::kind
enum universals_n kind
Definition fc_types.h:903
fc_snprintf
int fc_snprintf(char *str, size_t n, const char *format,...)
Definition support.c:974
sz_strlcpy
#define sz_strlcpy(dest, src)
Definition support.h:189
TRUE
#define TRUE
Definition support.h:46
FALSE
#define FALSE
Definition support.h:47
tab_achievement.h
tab_building.h
tab_counters.h
tab_enablers.h
tab_extras.h
tab_good.h
tab_gov.h
tab_misc.h
tab_multiplier.h
tab_nation.h
tab_tech.h
tab_terrains.h
tab_unit.h
fc_git_revision
const char * fc_git_revision(void)
Definition version.c:75
word_version
const char * word_version(void)
Definition version.c:62
version.h