Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Namespace Members | Class Members | File Members | Related Pages

economy.c File Reference

#include "conq.h"
#include "kernel.h"

Include dependency graph for economy.c:

Include dependency graph

Classes

struct  a_materialhandler

Defines

#define CHECK_MAXGAP

Typedefs

typedef a_materialhandler MaterialHandler

Enumerations

enum  MaterialHandlerType { mh_unit, mh_treasury, mh_cell }

Functions

void run_economy (void)
void try_sharing (Unit *from, Unit *to, int m)
void run_all_consumption (void)
void maybe_starve (Unit *unit, int partial)

Variables

short any_unit_production = -1
short any_terrain_production = -1
short any_people_production = -1
short any_people_consumption = -1
short any_cell_consumption = -1
short any_unit_base_consumption = -1
short any_unit_starvation = -1
short max_terrain_to_terrain_length = -1
int tmpexcess
int tmpneed

Define Documentation

#define CHECK_MAXGAP
 

Value:

if (can_transfer_material(m, mh_from+from_ptr, &mh_tmp)) { \
        gap = material_gap(mh_from+from_ptr, &mh_tmp); \
        if (gap > maxgap) tiesize = 0; \
        if ((gap >= maxgap) && (xrandom(++tiesize) == 0)) { \
            maxgap = gap; \
            mh_to = mh_tmp; \
        } \
    }


Typedef Documentation

typedef struct a_materialhandler MaterialHandler
 


Enumeration Type Documentation

enum MaterialHandlerType
 

Enumeration values:
mh_unit 
mh_treasury 
mh_cell 


Function Documentation

void maybe_starve Unit unit,
int  partial
 

void run_all_consumption void   ) 
 

void run_economy void   ) 
 

void try_sharing Unit from,
Unit to,
int  m
 


Variable Documentation

short any_cell_consumption = -1
 

short any_people_consumption = -1
 

short any_people_production = -1
 

short any_terrain_production = -1
 

short any_unit_base_consumption = -1
 

short any_unit_production = -1
 

short any_unit_starvation = -1
 

short max_terrain_to_terrain_length = -1
 

int tmpexcess
 

int tmpneed
 


Generated on Sat Sep 17 10:29:08 2005 for XconqKernel by doxygen 1.3.6