28 lines
		
	
	
		
			485 B
		
	
	
	
		
			C
		
	
	
	
	
	
			
		
		
	
	
			28 lines
		
	
	
		
			485 B
		
	
	
	
		
			C
		
	
	
	
	
	
#include "../raylib.h"
 | 
						|
#include "input.h"
 | 
						|
 | 
						|
#include <stdlib.h>
 | 
						|
 | 
						|
#define TARGET_FPS 60
 | 
						|
 | 
						|
int main(void)
 | 
						|
{
 | 
						|
    InitWindow(800, 450, "Text Adventure");
 | 
						|
    SetTargetFPS(TARGET_FPS);
 | 
						|
 | 
						|
    Input *input = malloc(sizeof(Input));
 | 
						|
    clear_input_buffer(input);
 | 
						|
 | 
						|
    while (!WindowShouldClose())
 | 
						|
      {
 | 
						|
	BeginDrawing();
 | 
						|
	ClearBackground(BLACK);
 | 
						|
	handle_pressed_keys(input);
 | 
						|
	DrawText(input->input_buffer, 190, 200, 20, RAYWHITE);
 | 
						|
        EndDrawing();
 | 
						|
    }
 | 
						|
    CloseWindow();
 | 
						|
 | 
						|
    return 0;
 | 
						|
}
 |