Fumofumotris/source/fumoengine/fumoengine.c
Julia 118e832a21 fjc
f
2024-05-02 17:17:37 -05:00

26 lines
503 B
C

#include "fumoengine.h"
#include "platform.h"
void ErrorExit(char *message)
{
printf(message);
exit(1);
}
bool FumoInit(struct FumoGame *game)
{
if (!PlatformInit())
ErrorExit("Platform failed to initialize");
if (!CreateController(&game->ctrl))
ErrorExit("Out of memory");
if (!CreateEvent(&game->update))
ErrorExit("Out of memory");
if (!BeginInputThread(&game->input_hand))
ErrorExit("Input handle failed to initialize");
return 0;
}