#pragma once

#include <stdio.h>
#include <string.h>
#include <SDL2/SDL.h>
#include "minecraftfont.h"
#include "inputbuffer.h"
#include "textures.h"
#include "player.h"
#include "main.h"
#include "data.h"

#define BUFFER_W     200
#define BUFFER_H     150
#define BUFFER_SCALE 4

void strnum            (char *, int, int);
int  drawChar          (SDL_Renderer *, int, int, int);
int  drawStr           (SDL_Renderer *, const char *, int, int);
int  shadowStr         (SDL_Renderer *, const char *, int, int);
int  centerStr         (SDL_Renderer *, const char *, int, int);
int  shadowCenterStr   (SDL_Renderer *, const char *, int, int);
int  drawBig           (SDL_Renderer *, const char *, int, int);
int  drawBGStr         (SDL_Renderer *, const char *, int, int);
int  button            (SDL_Renderer *, const char *, int, int, int, int, int);
int  input             (SDL_Renderer *, const char *, const char *, int, int,
                        int, int, int, int);
void scrollbar         (SDL_Renderer *, int, int, int,
                        int, int, int, int *, int);
int  drawSlot          (SDL_Renderer *, InvSlot *, int, int, int, int);
int  drawWorldListItem (SDL_Renderer *, data_WorldListItem *, int, int, int,
                        int);
void dirtBg            (SDL_Renderer *);
void loadScreen        (SDL_Renderer *, const char *, float, float);
void chatAdd           (const char*);
void white             (SDL_Renderer *);
void tblack            (SDL_Renderer *);

extern int BUFFER_HALF_W;
extern int BUFFER_HALF_H;
extern int WINDOW_W;
extern int WINDOW_H;

extern char chatHistory      [11][64];
extern int  chatHistoryFade  [11];
extern int  chatHistoryIndex;
