Freeciv-3.2
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#include "settings.h"
26
27#define RULESET_COMPAT_CAP "+Freeciv-3.1-ruleset"
28
35
36void rscompat_init_info(struct rscompat_info *info);
37
38int rscompat_check_capabilities(struct section_file *file, const char *filename,
39 const struct rscompat_info *info);
41 const char *filename,
42 const struct rscompat_info *info);
43
44bool rscompat_names(struct rscompat_info *info);
45
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 */
54 struct rscompat_info *compat,
55 const char *sec,
56 const char *sub,
57 const char *rfor);
58
59/* Functions specific to 3.1 -> 3.2 transition */
61 const bv_impr_flags flags,
64 const char *type,
65 const char *old_range);
67 const char **ptype, const char **pname,
68 bool *ppresent, const char *sec_name);
69int add_user_extra_flags_3_2(int start);
70const char *rscompat_extra_rmcause_3_2(struct extra_type *pextra,
71 const char *old_name);
72void rscompat_extra_adjust_3_2(struct extra_type *pextra);
75 const char *section, void (*setdef)(struct setting *pset));
77 const char *tsection,
78 struct terrain *pterrain);
80 const char *orig);
82 int act_id);
84 struct action_enabler *enabler,
85 const char *orig_name);
86
87/* In ruleset.c, but should not be in public interface - make static again once
88 * rscompat.c no longer needs. */
89bool lookup_time(const struct section_file *secfile, int *turns,
90 const char *sec_name, const char *property_name,
91 const char *filename, const char *item_name,
92 bool *ok);
93
94#ifdef __cplusplus
95}
96#endif /* __cplusplus */
97
98#endif /* FC__RSCOMPAT_H */
char * incite_cost
Definition comments.c:75
GType type
Definition repodlgs.c:1313
const char * name
Definition inputfile.c:127
void rscompat_settings_do_special_handling(struct section_file *file, const char *section, void(*setdef)(struct setting *pset))
Definition rscompat.c:637
const char * rscompat_req_range_3_2(struct rscompat_info *compat, const char *type, const char *old_range)
Definition rscompat.c:471
int add_user_extra_flags_3_2(int start)
Definition rscompat.c:564
const char * rscompat_action_ui_name_3_2(struct rscompat_info *compat, int act_id)
Definition rscompat.c:783
bool lookup_time(const struct section_file *secfile, int *turns, const char *sec_name, const char *property_name, const char *filename, const char *item_name, bool *ok)
Definition ruleset.c:1264
bool rscompat_terrain_extra_rmtime_3_2(struct section_file *file, const char *tsection, struct terrain *pterrain)
Definition rscompat.c:713
bool rscompat_names(struct rscompat_info *info)
Definition rscompat.c:330
bool rscompat_setting_needs_special_handling(const char *name)
Definition rscompat.c:623
void rscompat_postprocess(struct rscompat_info *info)
Definition rscompat.c:386
int rscompat_check_capabilities(struct section_file *file, const char *filename, const struct rscompat_info *info)
Definition rscompat.c:66
void rscompat_extra_adjust_3_2(struct extra_type *pextra)
Definition rscompat.c:603
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:654
void rscompat_enablers_add_obligatory_hard_reqs(void)
Definition rscompat.c:286
const char * rscompat_action_rule_name_3_2(struct rscompat_info *compat, const char *orig)
Definition rscompat.c:753
void rscompat_req_adjust_3_2(const struct rscompat_info *compat, const char **ptype, const char **pname, bool *ppresent, const char *sec_name)
Definition rscompat.c:498
enum impr_genus_id rscompat_genus_3_2(struct rscompat_info *compat, const bv_impr_flags flags, enum impr_genus_id old_genus)
Definition rscompat.c:455
void rscompat_action_enabler_adjust_3_2(struct rscompat_info *compat, struct action_enabler *enabler, const char *orig_name)
Definition rscompat.c:768
const char * rscompat_extra_rmcause_3_2(struct extra_type *pextra, const char *old_name)
Definition rscompat.c:577
void rscompat_init_info(struct rscompat_info *info)
Definition rscompat.c:57
bool rscompat_check_cap_and_version(struct section_file *file, const char *filename, const struct rscompat_info *info)
Definition rscompat.c:131
void(* rs_conversion_logger)(const char *msg)
Definition ruleset.h:40
static struct compatibility compat[]
Definition savecompat.c:105
bool compat_mode
Definition rscompat.h:31
rs_conversion_logger log_cb
Definition rscompat.h:32