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

Freeciv-3.1

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