2021-11-04 18:08:43 +01:00
|
|
|
#include <gint/display.h>
|
2022-06-23 11:03:57 +02:00
|
|
|
#include <gint/gint.h>
|
2021-10-31 15:12:30 +01:00
|
|
|
#include "core.h"
|
2022-06-23 11:03:57 +02:00
|
|
|
#include "save.h"
|
2021-10-23 18:51:28 +02:00
|
|
|
|
2021-10-10 15:08:56 +02:00
|
|
|
|
|
|
|
int main(void)
|
|
|
|
{
|
2021-11-04 18:08:43 +01:00
|
|
|
extern font_t font_calccity;
|
|
|
|
dfont(&font_calccity);
|
|
|
|
|
2021-10-23 18:51:28 +02:00
|
|
|
title_screen();
|
|
|
|
|
2021-10-31 15:12:30 +01:00
|
|
|
// Game initialisation
|
2021-10-23 18:51:28 +02:00
|
|
|
struct calccity calccity;
|
|
|
|
struct camera camera;
|
|
|
|
struct map map;
|
2022-06-23 11:03:57 +02:00
|
|
|
gint_world_switch(GINT_CALL(read_save, (void *)&calccity, (void *)&camera, (void *)&map));
|
2021-10-10 15:08:56 +02:00
|
|
|
|
2022-06-23 11:03:57 +02:00
|
|
|
// Game
|
2021-10-31 15:12:30 +01:00
|
|
|
main_loop(&calccity, &camera, &map);
|
2022-06-23 11:03:57 +02:00
|
|
|
|
|
|
|
// Backup data
|
|
|
|
gint_world_switch(GINT_CALL(write_save, (void *)&calccity, (void *)&camera, (void *)&map));
|
|
|
|
|
2021-10-10 15:08:56 +02:00
|
|
|
return 1;
|
2021-10-23 18:51:28 +02:00
|
|
|
}
|