CalcCity/src/core.h

41 lines
1.4 KiB
C
Raw Normal View History

2021-10-31 15:12:30 +01:00
#ifndef _CORE_H
#define _CORE_H
#include "calccity.h"
#include "display.h"
#include "menus.h"
2021-10-31 15:12:30 +01:00
// callback_tick : time function
int callback_tick(volatile int *tick);
// default_values : initialize the game
void default_values(struct calccity *current_game, struct camera *camera, struct map *map);
// rtc_key : get a key with RTC system
int rtc_key(void);
// next_step : compute in-game time
2021-11-07 16:44:29 +01:00
void next_step(struct calccity *calccity, struct map *map);
2021-11-06 20:39:36 +01:00
// main_loop : game main loop, manage key, menu, map actualization and building
2021-10-31 15:12:30 +01:00
void main_loop(struct calccity *calccity, struct camera *camera, struct map *map);
2021-11-05 16:37:09 +01:00
// keyboard_managment : get the key, manage input and open menus
void keyboard_managment(struct camera *camera, const int key, const int build_mode);
2021-11-05 16:37:09 +01:00
// can_build : test if the build is legit
bool can_build(struct calccity *calccity, struct camera *camera, struct map *map, struct building *building);
// exit_build_mode : reset build mode and cusor
void exit_build_mode(struct camera *camera, int *build_mode);
// large_building : detect large buildings and adjust the building's id
struct building large_building(struct map *map, const int build_mode, short unsigned int *loc_x, short unsigned int *loc_y);
2021-11-07 16:44:29 +01:00
// update_stat : compute the new stat with buildings
void update_stat(struct calccity *calccity, struct map *map);
2021-11-07 18:31:23 +01:00
// end_year : display the year's balance sheet
void end_year(struct calccity *calccity);
2021-10-31 15:12:30 +01:00
#endif /* _CORE_H */