2021-10-10 15:56:03 +02:00
|
|
|
#ifndef _CALCCITY_H
|
|
|
|
#define _CALCCITY_H
|
|
|
|
|
2021-11-05 16:37:09 +01:00
|
|
|
#include <stdlib.h>
|
2021-10-31 15:12:30 +01:00
|
|
|
|
2021-10-23 18:51:28 +02:00
|
|
|
struct calccity
|
2021-10-10 15:56:03 +02:00
|
|
|
{
|
|
|
|
|
2021-11-05 16:37:09 +01:00
|
|
|
// main statistics
|
|
|
|
/*
|
|
|
|
housing,
|
|
|
|
health,
|
|
|
|
education,
|
|
|
|
food,
|
|
|
|
work,
|
|
|
|
transport,
|
|
|
|
|
|
|
|
crime,
|
|
|
|
firehazard,
|
|
|
|
nuclearhazard,
|
|
|
|
pollution,
|
|
|
|
|
|
|
|
commercial,
|
|
|
|
industrial,
|
|
|
|
production,
|
|
|
|
import,
|
|
|
|
export,
|
|
|
|
annual_cost,
|
|
|
|
|
|
|
|
water_consumption,
|
|
|
|
power_consumption,
|
|
|
|
power_supply,
|
|
|
|
grabage
|
|
|
|
graves,
|
|
|
|
*/
|
|
|
|
unsigned long stat[21];
|
|
|
|
|
|
|
|
// some others statistics = {treasure, population, safety, hapyness, birth_rate, death_rate, immigration, emigration, water_supply}
|
2021-11-04 18:08:43 +01:00
|
|
|
unsigned long misc[9];
|
2021-11-05 16:37:09 +01:00
|
|
|
|
2021-10-10 16:22:09 +02:00
|
|
|
// taxes in percents on {housing, trade, industry, export}
|
2021-11-04 18:08:43 +01:00
|
|
|
unsigned int taxes[4];
|
2021-10-10 15:56:03 +02:00
|
|
|
|
2021-10-10 16:22:09 +02:00
|
|
|
// fund in percents on {police, fireman, education, heathcare}
|
2021-11-04 18:08:43 +01:00
|
|
|
unsigned int funds[4];
|
2021-10-10 16:22:09 +02:00
|
|
|
|
|
|
|
// in-game time
|
2021-10-23 18:51:28 +02:00
|
|
|
int month, year;
|
|
|
|
int blinker;
|
2021-11-04 18:08:43 +01:00
|
|
|
int tick;
|
2021-10-10 16:22:09 +02:00
|
|
|
|
|
|
|
// in-game options
|
2021-10-31 15:12:30 +01:00
|
|
|
uint8_t disaster;
|
|
|
|
uint8_t animation;
|
2021-10-23 18:51:28 +02:00
|
|
|
int time_speed;
|
2021-11-04 18:08:43 +01:00
|
|
|
int menu;
|
2021-10-10 16:22:09 +02:00
|
|
|
|
2021-10-10 15:56:03 +02:00
|
|
|
};
|
|
|
|
|
2021-10-10 16:22:09 +02:00
|
|
|
|
2021-10-23 18:51:28 +02:00
|
|
|
struct camera
|
2021-10-10 15:56:03 +02:00
|
|
|
{
|
2021-10-10 16:22:09 +02:00
|
|
|
int x, y;
|
|
|
|
int zoom;
|
2021-10-10 15:56:03 +02:00
|
|
|
|
2021-10-10 16:22:09 +02:00
|
|
|
int cursor_x, cursor_y;
|
2021-11-05 16:37:09 +01:00
|
|
|
int cursor_size[2];
|
2021-10-10 15:56:03 +02:00
|
|
|
};
|
|
|
|
|
2021-10-10 16:22:09 +02:00
|
|
|
|
2021-10-23 18:51:28 +02:00
|
|
|
struct map
|
2021-10-10 16:22:09 +02:00
|
|
|
{
|
2021-10-23 18:51:28 +02:00
|
|
|
unsigned char data[50][50];
|
2021-10-10 16:22:09 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
|
2021-11-05 16:37:09 +01:00
|
|
|
struct building
|
2021-11-06 14:23:42 +01:00
|
|
|
{
|
2021-11-05 16:37:09 +01:00
|
|
|
unsigned char *id;
|
2021-11-06 14:23:42 +01:00
|
|
|
long unsigned int cost;
|
2021-11-05 16:37:09 +01:00
|
|
|
unsigned char size[2];
|
|
|
|
|
|
|
|
/*
|
|
|
|
housing,
|
|
|
|
health,
|
|
|
|
education,
|
|
|
|
food,
|
|
|
|
work,
|
|
|
|
transport,
|
|
|
|
|
|
|
|
crime,
|
|
|
|
firehazard,
|
|
|
|
nuclearhazard,
|
|
|
|
pollution,
|
|
|
|
|
|
|
|
commercial,
|
|
|
|
industrial,
|
|
|
|
production,
|
|
|
|
import,
|
|
|
|
export,
|
|
|
|
annual_cost,
|
|
|
|
|
|
|
|
water_consumption,
|
|
|
|
power_consumption,
|
|
|
|
power_supply,
|
|
|
|
grabage
|
|
|
|
graves,
|
|
|
|
*/
|
|
|
|
unsigned int stat[21];
|
|
|
|
|
|
|
|
// commercial, industrial, export
|
|
|
|
unsigned int taxes[3];
|
|
|
|
|
|
|
|
// police, firemen, education, heathcare
|
|
|
|
unsigned int funds[4];
|
|
|
|
|
2021-11-06 14:23:42 +01:00
|
|
|
char *name;
|
2021-11-05 16:37:09 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
|
2021-11-04 18:08:43 +01:00
|
|
|
#define ENGINE_TICK 100
|
2021-10-31 15:12:30 +01:00
|
|
|
|
2021-11-06 14:23:42 +01:00
|
|
|
extern const struct building buildings[41];
|
2021-11-05 16:37:09 +01:00
|
|
|
|
2021-10-10 15:56:03 +02:00
|
|
|
#endif /* _CALCCITY_H */
|