CalcCity/src/calccity.h

101 lines
1.3 KiB
C
Raw Normal View History

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
/*
2021-11-07 16:44:29 +01:00
0 housing,
1 health,
2 education,
3 food,
4 work,
5 transport,
6 crime,
7 firehazard,
8 nuclearhazard,
9 pollution,
10 commercial,
11 industrial,
12 production,
13 import,
14 export,
15 annual_cost,
2021-11-05 16:37:09 +01:00
2021-11-07 16:44:29 +01:00
16 water_consumption,
17 water_supply,
18 power_consumption,
19 power_supply,
20 grabage,
21 graves,
22 happyness
2021-11-05 16:37:09 +01:00
*/
2021-11-07 16:44:29 +01:00
int stat[23];
2021-11-05 16:37:09 +01:00
2021-11-07 16:44:29 +01:00
// some others statistics = {treasure, population, safety, population in, population out}
int misc[5];
2021-11-05 16:37:09 +01:00
// taxes in percents on {housing, trade, industry, export}
2021-11-07 16:44:29 +01:00
int taxes[4];
2021-10-10 15:56:03 +02:00
// fund in percents on {police, fireman, education, heathcare}
2021-11-07 16:44:29 +01:00
int funds[4];
// in-game time
2021-10-23 18:51:28 +02:00
int month, year;
2021-11-07 16:44:29 +01:00
int blinker_water;
int blinker_alert;
int tick;
// 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;
int menu;
2021-10-10 15:56:03 +02:00
};
2021-10-23 18:51:28 +02:00
struct camera
2021-10-10 15:56:03 +02:00
{
int x, y;
int zoom;
2021-10-10 15:56:03 +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-23 18:51:28 +02:00
struct map
{
2021-10-23 18:51:28 +02:00
unsigned char data[50][50];
char id[50][50];
};
2021-11-05 16:37:09 +01:00
struct building
{
2021-11-07 16:44:29 +01:00
char *id;
int cost;
2021-11-05 16:37:09 +01:00
unsigned char size[2];
2021-11-07 16:44:29 +01:00
int stat[23];
2021-11-05 16:37:09 +01:00
// commercial, industrial, export
2021-11-07 16:44:29 +01:00
int taxes[3];
2021-11-05 16:37:09 +01:00
// police, firemen, education, heathcare
2021-11-07 16:44:29 +01:00
int funds[4];
2021-11-05 16:37:09 +01:00
char *name;
2021-11-05 16:37:09 +01:00
};
#define ENGINE_TICK 100
2021-10-31 15:12:30 +01:00
2021-10-10 15:56:03 +02:00
#endif /* _CALCCITY_H */