Freeciv-3.3
Loading...
Searching...
No Matches
Data Structures | Macros | Functions
multipliers.h File Reference
#include "bitvector.h"
#include "string_vector.h"
#include "fc_types.h"
#include "name_translation.h"
#include "requirements.h"

Go to the source code of this file.

Data Structures

struct  multiplier
 

Macros

#define multipliers_iterate(_mul_)
 
#define multipliers_iterate_end
 
#define multipliers_re_active_iterate(_mul_)
 
#define multipliers_re_active_iterate_end
 

Functions

void multipliers_init (void)
 
void multipliers_free (void)
 
Multiplier_type_id multiplier_count (void)
 
Multiplier_type_id multiplier_index (const struct multiplier *pmul)
 
Multiplier_type_id multiplier_number (const struct multiplier *pmul)
 
struct multipliermultiplier_by_number (Multiplier_type_id id)
 
const charmultiplier_name_translation (const struct multiplier *pmul)
 
const charmultiplier_rule_name (const struct multiplier *pmul)
 
struct multipliermultiplier_by_rule_name (const char *name)
 
bool multiplier_can_be_changed (struct multiplier *pmul, struct player *pplayer)
 

Macro Definition Documentation

◆ multipliers_iterate

#define multipliers_iterate (   _mul_)
Value:
{ \
for (_i = 0; _i < multiplier_count(); _i++) { \
char * incite_cost
Definition comments.c:76
int Multiplier_type_id
Definition fc_types.h:245
Multiplier_type_id multiplier_count(void)
Definition multipliers.c:88
struct multiplier * multiplier_by_number(Multiplier_type_id id)
Definition multipliers.c:57

Definition at line 61 of file multipliers.h.

◆ multipliers_iterate_end

#define multipliers_iterate_end
Value:
} \
}

Definition at line 67 of file multipliers.h.

◆ multipliers_re_active_iterate

#define multipliers_re_active_iterate (   _mul_)
Value:
if (!_mul_->ruledit_disabled) {
#define multipliers_iterate(_mul_)
Definition multipliers.h:61

Definition at line 71 of file multipliers.h.

◆ multipliers_re_active_iterate_end

#define multipliers_re_active_iterate_end
Value:
} \
#define multipliers_iterate_end
Definition multipliers.h:67

Definition at line 75 of file multipliers.h.

Function Documentation

◆ multiplier_by_number()

struct multiplier * multiplier_by_number ( Multiplier_type_id  id)

Returns multiplier associated to given number

Definition at line 57 of file multipliers.c.

Referenced by tab_multiplier::add_now(), handle_player_multiplier(), handle_ruleset_multiplier(), and recv_ruleset_effect().

◆ multiplier_by_rule_name()

struct multiplier * multiplier_by_rule_name ( const char name)

Returns multiplier matching rule name, or NULL if there is no multiplier with such a name.

Definition at line 115 of file multipliers.c.

Referenced by tab_multiplier::initialize_new_multiplier(), load_ruleset_effects(), effect_edit::multiplier_menu(), tab_multiplier::select_multiplier(), sg_load_savefile(), and sg_load_savefile().

◆ multiplier_can_be_changed()

bool multiplier_can_be_changed ( struct multiplier pmul,
struct player pplayer 
)

◆ multiplier_count()

Multiplier_type_id multiplier_count ( void  )

◆ multiplier_index()

Multiplier_type_id multiplier_index ( const struct multiplier pmul)

◆ multiplier_name_translation()

const char * multiplier_name_translation ( const struct multiplier pmul)

Return the (translated) name of the multiplier. You don't have to free the return pointer.

Definition at line 97 of file multipliers.c.

Referenced by create_multiplier_dialog(), end_phase(), get_effect_req_text(), and multipler_rates_dialog::multipler_rates_dialog().

◆ multiplier_number()

Multiplier_type_id multiplier_number ( const struct multiplier pmul)

Returns multiplier number.

Definition at line 67 of file multipliers.c.

Referenced by multiplier_index(), send_ruleset_cache(), and send_ruleset_multipliers().

◆ multiplier_rule_name()

const char * multiplier_rule_name ( const struct multiplier pmul)

◆ multipliers_free()

void multipliers_free ( void  )

Free all multipliers

Definition at line 43 of file multipliers.c.

Referenced by game_ruleset_free().

◆ multipliers_init()

void multipliers_init ( void  )

Initialize all multipliers

Definition at line 28 of file multipliers.c.

Referenced by game_ruleset_init().