thrive/01_text_adventure/main.c

33 lines
568 B
C

#include "../raylib.h"
#include "log.h"
#include "input.h"
#include <stdlib.h>
#define TARGET_FPS 60
int main(void)
{
InitWindow(800, 450, "Text Adventure");
SetTargetFPS(TARGET_FPS);
Log *log = create_log();
Vector2 input_position = { 190, 200 };
Input *input = create_input(input_position);
input->log = log;
while (!WindowShouldClose())
{
BeginDrawing();
ClearBackground(BLACK);
handle_pressed_keys(input);
draw_log(log);
draw_text(input);
EndDrawing();
}
CloseWindow();
free(input);
return 0;
}