eco2d/code/apps/client/source/main.c

28 lines
497 B
C
Raw Normal View History

2021-01-11 20:08:16 +00:00
#define ZPL_IMPL
#include "zpl.h"
2021-01-10 16:42:01 +00:00
#include "game.h"
2021-01-11 21:12:26 +00:00
#include "signal_handling.h"
2021-01-17 07:30:59 +00:00
#include "network.h"
2021-01-10 16:42:01 +00:00
int main(void)
{
2021-01-11 21:12:26 +00:00
sighandler_register();
2021-01-10 16:42:01 +00:00
game_init();
2021-01-17 07:30:59 +00:00
network_init();
network_client_connect("127.0.0.1", 27000);
2021-01-10 16:42:01 +00:00
2021-01-11 20:08:16 +00:00
while (game_is_running())
2021-01-10 16:42:01 +00:00
{
game_input();
game_update();
game_render();
2021-01-17 07:30:59 +00:00
network_client_tick();
2021-01-10 16:42:01 +00:00
}
2021-01-17 07:30:59 +00:00
network_client_disconnect();
2021-01-10 16:42:01 +00:00
game_shutdown();
2021-01-11 21:12:26 +00:00
sighandler_unregister();
2021-01-17 07:30:59 +00:00
network_destroy();
2021-01-10 16:42:01 +00:00
return 0;
}