Fumofumotris/source/main.c

39 lines
707 B
C
Raw Normal View History

2024-03-25 05:34:59 +00:00
#include <iso646.h>
#include <pthread.h>
#include <stdbool.h>
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
2024-04-15 19:29:51 +00:00
#include "ctrl.h"
2024-04-18 05:04:44 +00:00
#include "input.h"
2024-03-25 05:34:59 +00:00
#include "fumotris.h"
#include "term.h"
#include "tetr.h"
2024-04-03 23:31:47 +00:00
#include "event.h"
2024-04-16 22:14:53 +00:00
#include "platform.h"
2024-03-25 05:34:59 +00:00
2024-04-19 20:23:11 +00:00
void ErrorExit(char *message)
{
printf(message);
exit(1);
}
2024-04-09 07:00:48 +00:00
int main()
{
2024-04-19 20:23:11 +00:00
if (!PlatformInit())
ErrorExit("Platform failed to initialize");
struct Controller ctrl;
if (!CreateCtrl(&ctrl))
ErrorExit("Out of memory");
2024-04-03 23:31:47 +00:00
2024-04-19 20:23:11 +00:00
struct InputThreadHandle input;
if (!BeginInputThread(&input, &ctrl.buf))
ErrorExit("Input handle failed to initialize");
2024-04-03 23:31:47 +00:00
2024-04-19 20:23:11 +00:00
printf("woah");
2024-04-03 23:31:47 +00:00
2024-03-25 05:34:59 +00:00
return 0;
}