#include "SDL/SDL.h"
#include "SDL/SDL_ttf.h"
#include "SDL/SDL_image.h"
#include "SDL/SDL_mixer.h"
#include "clase.h"
#include "functions.h"
#include "initializare.h"
#include "instructiuni.h"
#include <cstdlib>

void instr()
{
    while (2)
    {
        text_instructiuni.deseneaza();
        inapoi.miscare();
        inapoi.deseneaza();

        while (SDL_PollEvent(&x_out))
            if (x_out.type==SDL_QUIT)
            {
                close_sdl();
                exit(EXIT_SUCCESS);
            }

        Uint8 *keystates = SDL_GetKeyState( NULL );
        if (keystates[SDLK_LALT] && keystates[SDLK_F4]) {close_sdl(); exit(EXIT_SUCCESS);}

        if (inapoi.click()) return;

        SDL_Flip(screen);
    }
}
