Freeciv-3.1
Loading...
Searching...
No Matches
rscompat.h
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#ifndef FC__RSCOMPAT_H
14#define FC__RSCOMPAT_H
15
16#ifdef __cplusplus
17extern "C" {
18#endif /* __cplusplus */
19
20/* utility */
21#include "support.h"
22
23/* server */
24#include "ruleset.h"
25
26#define RULESET_COMPAT_CAP "+Freeciv-3.0-ruleset"
27
34
35void rscompat_init_info(struct rscompat_info *info);
36
37int rscompat_check_capabilities(struct section_file *file, const char *filename,
38 const struct rscompat_info *info);
40 const char *filename,
41 const struct rscompat_info *info);
42
43bool rscompat_names(struct rscompat_info *info);
44
46void rscompat_postprocess(struct rscompat_info *info);
47
48/* General upgrade functions that should be kept to avoid regressions in
49 * corner case handling. */
51
52/* Functions from ruleset.c made visible to rscompat.c */
53struct requirement_vector *lookup_req_list(struct section_file *file,
54 struct rscompat_info *compat,
55 const char *sec,
56 const char *sub,
57 const char *rfor);
58
59/* Functions specific to 3.0 -> 3.1 transition */
61 struct action_auto_perf *auto_perf,
62 size_t psize,
63 enum unit_type_flag_id *protecor_flag);
64const char *rscompat_req_type_name_3_1(const char *old_type);
65const char *rscompat_req_name_3_1(const char *type,
66 const char *old_name);
68 struct requirement_vector *preqs,
69 int *reqs_count,
70 const char *filename, const char *sec,
71 const char *sub, const char *rfor);
72const char *rscompat_utype_flag_name_3_1(struct rscompat_info *info,
73 const char *old_type);
75 const char *old_type);
76bool rscompat_old_effect_3_1(const char *type, struct section_file *file,
77 const char *sec_name, struct rscompat_info *compat);
79 struct unit_class *pclass);
81 struct extra_type *pextra);
82enum road_gui_type rscompat_road_gui_type_3_1(struct road_type *proad);
84 bool slow_invasions);
85
87 int act_id);
89 int act_id);
90
91#ifdef __cplusplus
92}
93#endif /* __cplusplus */
94
95#endif /* FC__RSCOMPAT_H */
GType type
Definition repodlgs.c:1312
const char * rscompat_action_ui_name_S3_1(struct rscompat_info *compat, int act_id)
Definition rscompat.c:2240
void rscompat_adjust_pre_sanity(struct rscompat_info *info)
Definition rscompat.c:839
enum road_gui_type rscompat_road_gui_type_3_1(struct road_type *proad)
Definition rscompat.c:2222
void rscompat_extra_adjust_3_1(struct rscompat_info *compat, struct extra_type *pextra)
Definition rscompat.c:2206
void rscompat_uclass_flags_3_1(struct rscompat_info *compat, struct unit_class *pclass)
Definition rscompat.c:2194
const char * rscompat_req_name_3_1(const char *type, const char *old_name)
Definition rscompat.c:2061
bool rscompat_auto_attack_3_1(struct rscompat_info *compat, struct action_auto_perf *auto_perf, size_t psize, enum unit_type_flag_id *protecor_flag)
Definition rscompat.c:1751
bool rscompat_old_effect_3_1(const char *type, struct section_file *file, const char *sec_name, struct rscompat_info *compat)
Definition rscompat.c:806
bool rscompat_names(struct rscompat_info *info)
Definition rscompat.c:386
void rscompat_req_vec_adjust_3_1(struct rscompat_info *compat, struct requirement_vector *preqs, int *reqs_count, const char *filename, const char *sec, const char *sub, const char *rfor)
Definition rscompat.c:2081
bool rscompat_old_slow_invasions_3_1(struct rscompat_info *compat, bool slow_invasions)
Definition rscompat.c:1910
void rscompat_postprocess(struct rscompat_info *info)
Definition rscompat.c:859
int rscompat_check_capabilities(struct section_file *file, const char *filename, const struct rscompat_info *info)
Definition rscompat.c:65
const char * rscompat_utype_flag_name_3_1(struct rscompat_info *info, const char *old_type)
Definition rscompat.c:2167
struct requirement_vector * lookup_req_list(struct section_file *file, struct rscompat_info *compat, const char *sec, const char *sub, const char *rfor)
Definition ruleset.c:645
void rscompat_enablers_add_obligatory_hard_reqs(void)
Definition rscompat.c:285
const char * rscompat_action_max_range_name_S3_1(struct rscompat_info *compat, int act_id)
Definition rscompat.c:2255
void rscompat_init_info(struct rscompat_info *info)
Definition rscompat.c:56
bool rscompat_check_cap_and_version(struct section_file *file, const char *filename, const struct rscompat_info *info)
Definition rscompat.c:131
const char * rscompat_combat_bonus_name_3_1(struct rscompat_info *compat, const char *old_type)
Definition rscompat.c:2179
const char * rscompat_req_type_name_3_1(const char *old_type)
Definition rscompat.c:2045
void(* rs_conversion_logger)(const char *msg)
Definition ruleset.h:40
static struct compatibility compat[]
Definition savecompat.c:101
bool compat_mode
Definition rscompat.h:30
rs_conversion_logger log_cb
Definition rscompat.h:31