commit
cdb8ae5a34
@ -0,0 +1,59 @@
|
||||
/**
|
||||
* \file GameInputProcessor.h
|
||||
* \brief Define a structure, GameInputProcessor and functions to convert SDL_event to envent for Pontu
|
||||
* \author Martin Rouault
|
||||
* \date 06/12/2021
|
||||
*/
|
||||
|
||||
#ifndef GAME_INPUT_PROCESSOR_INCLUDED
|
||||
#define GAME_INPUT_PROCESSOR_INCLUDED
|
||||
|
||||
#include "engine/Button.h"
|
||||
#include "engine/arrayButton.h"
|
||||
#include "engine/InputElement.h"
|
||||
#include "model/Coord.h"
|
||||
|
||||
/**
|
||||
* \struct GameInputProcessor
|
||||
* \brief Contains datas useful to handle input
|
||||
*/
|
||||
typedef struct
|
||||
{
|
||||
struct array_P_Button tabButton;
|
||||
Coord selectedCase; ///< A case in Board (used to handle move actions) , (-1;-1) si inexistant
|
||||
} GameInputProcessor;
|
||||
|
||||
|
||||
/**
|
||||
* \brief Create a new input processor
|
||||
*
|
||||
* \return A new input processor
|
||||
*/
|
||||
GameInputProcessor createGameInputProcessor();
|
||||
|
||||
/**
|
||||
* @brief Free a game input processor
|
||||
*
|
||||
* @param gameInputProcessor the game input processor to free (do not use after freeing)
|
||||
*/
|
||||
void freeGameInputProcessor(GameInputProcessor* gameInputProcessor);
|
||||
|
||||
/**
|
||||
* \brief Convert a screen coord into a model Coord
|
||||
*
|
||||
* \param [in] point Screen coordinates
|
||||
* \param [in] boardRect The game's board's rect
|
||||
* \return Game coordinate from point
|
||||
*/
|
||||
Coord screenCoordToGameCoord(const SDL_Point* point, const SDL_Rect* boardRect);
|
||||
|
||||
/**
|
||||
* \brief Poll and convert SDL_Events into specific event for Pontu
|
||||
*
|
||||
* \param [in, out] GameinputProcessor The input processor which keeps a state of input in between calls
|
||||
* \param [in] boardRect The game's board's rect
|
||||
* \return InputElement : an event for Pontu
|
||||
*/
|
||||
InputElement proccessGameInput(GameInputProcessor* gameInputProcessor, const SDL_Rect* boardRect);
|
||||
|
||||
#endif // GAME_INPUT_PROCESSOR_INCLUDED
|
@ -0,0 +1,9 @@
|
||||
#ifndef ARRAY_BUTTON_INCLUDED
|
||||
#define ARRAY_BUTTON_INCLUDED
|
||||
|
||||
#include "engine/Button.h"
|
||||
#include "engine/ArrayUtils.h"
|
||||
|
||||
GENERATE_DYNAMIC_ARRAY(P_Button)
|
||||
|
||||
#endif //ARRAY_BUTTON_INCLUDED
|
@ -1,4 +1,9 @@
|
||||
#include <SDL2/SDL.h>
|
||||
#include <stdbool.h>
|
||||
#include "engine/TextLabel.h"
|
||||
#include "engine/Button.h"
|
||||
#include "engine/TextureLoader.h"
|
||||
#include "engine/Colors.h"
|
||||
#include "engine/FontUtils.h"
|
||||
|
||||
bool drawGameCreationMenu(SDL_Renderer* renderer, TTF_Font* font, int width, int height);
|
||||
|
@ -0,0 +1,5 @@
|
||||
#include "engine/Colors.h"
|
||||
|
||||
const SDL_Color COLOR_GENERIC_BUTTON_BACKGROUND = {225, 225, 225, 255};
|
||||
const SDL_Color COLOR_GENERIC_BUTTON_BORDER = {10, 10, 10, 255};
|
||||
const SDL_Color COLOR_GENERIC_BUTTON_BACKGROUND_HOVER = {250, 250, 250, 255};
|
@ -0,0 +1,91 @@
|
||||
#include "engine/GameInputProcessor.h"
|
||||
|
||||
Coord screenCoordToGameCoord(const SDL_Point* point, const SDL_Rect* boardRect){
|
||||
Coord coord = {
|
||||
coord.x = (point->x-boardRect->x)*9/boardRect->w,
|
||||
coord.y = (point->y-boardRect->y)*9/boardRect->h
|
||||
};
|
||||
return coord;
|
||||
}
|
||||
|
||||
GameInputProcessor createGameInputProcessor() {
|
||||
GameInputProcessor gameInputProcessor = {
|
||||
.selectedCase = {.x=-1, .y=-1},
|
||||
.tabButton = array_P_Button_Create()
|
||||
};
|
||||
return gameInputProcessor;
|
||||
}
|
||||
|
||||
void freeGameInputProcessor(GameInputProcessor* gameInputProcessor) {
|
||||
array_P_Button_Free(&gameInputProcessor->tabButton);
|
||||
}
|
||||
|
||||
InputElement proccessGameInput(GameInputProcessor *gameInputProcessor, const SDL_Rect* boardRect)
|
||||
{
|
||||
SDL_Event event;
|
||||
if (!SDL_PollEvent(&event))
|
||||
{
|
||||
return createInputElementNone();
|
||||
}
|
||||
|
||||
switch (event.type)
|
||||
{
|
||||
case SDL_QUIT:
|
||||
return createInputElementUIQuit();
|
||||
case SDL_MOUSEBUTTONDOWN:
|
||||
{
|
||||
const SDL_Point mousePoint = {.x = event.button.x, .y = event.button.y};
|
||||
if (SDL_PointInRect(&mousePoint, boardRect))
|
||||
{
|
||||
if (!coordValid(gameInputProcessor->selectedCase)) {
|
||||
gameInputProcessor->selectedCase = screenCoordToGameCoord(&mousePoint, boardRect);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
}
|
||||
break;
|
||||
}
|
||||
case SDL_MOUSEBUTTONUP:
|
||||
{
|
||||
const SDL_Point mousePoint = {.x = event.button.x, .y = event.button.y};
|
||||
if (SDL_PointInRect(&mousePoint, boardRect))
|
||||
{
|
||||
if (coordValid(gameInputProcessor->selectedCase))
|
||||
{
|
||||
Coord newCoords = screenCoordToGameCoord(&mousePoint, boardRect);
|
||||
if (coordEqual(gameInputProcessor->selectedCase, newCoords)) {
|
||||
gameInputProcessor->selectedCase = newCoords;
|
||||
return createInputElementClickBoard(newCoords);
|
||||
}
|
||||
else {
|
||||
const Coord oldCoord = gameInputProcessor->selectedCase;
|
||||
gameInputProcessor->selectedCase = newCoord(-1,-1);
|
||||
return createInputElementMoveBoard(oldCoord, newCoords);
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
for (size_t i = 0; i<gameInputProcessor->tabButton.size; ++i) {
|
||||
P_Button* b = &gameInputProcessor->tabButton.elems[i];
|
||||
if (SDL_PointInRect(&mousePoint, &b->rect)) {
|
||||
b->onClick(b);
|
||||
}
|
||||
}
|
||||
return createInputElementNone();
|
||||
}
|
||||
break;
|
||||
}
|
||||
case SDL_MOUSEMOTION:
|
||||
{
|
||||
for (size_t i = 0; i<gameInputProcessor->tabButton.size; ++i) {
|
||||
P_Button* b = &gameInputProcessor->tabButton.elems[i];
|
||||
isHover(b, event.motion.x, event.motion.y);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return createInputElementNone();
|
||||
}
|
||||
|
@ -0,0 +1,68 @@
|
||||
#include "view/GameCreationMenu.h"
|
||||
|
||||
bool drawGameCreationMenu(SDL_Renderer* renderer, TTF_Font* font, int width, int height)
|
||||
{
|
||||
// TextLabel for "Nombre de joueur.euse.s" creation
|
||||
SDL_Point nbJoueurLabelPos = {.x=width*0.05, .y=height*0.05};
|
||||
SDL_Color black = {0,0,0,255};
|
||||
SDL_Color white = {225, 255, 255, 255};
|
||||
TextLabel nbJoueurLabel = createTextLabel(
|
||||
"Nombre de joueur.euse.s",
|
||||
&nbJoueurLabelPos,
|
||||
1,
|
||||
&white,
|
||||
font,
|
||||
renderer,
|
||||
POSX_LEFT,
|
||||
POSY_TOP
|
||||
);
|
||||
|
||||
// Incrementation Btn creation
|
||||
|
||||
P_Button incrementBtn = createButton(NULL, NULL, nbJoueurLabelPos.x+calculateStringPixelLenght(font, nbJoueurLabel.text)+32, nbJoueurLabelPos.y, 0, 0, NULL);
|
||||
SDL_Texture* btnTexture = createGenericButtonTexture("+", font, 8,COLOR_GENERIC_BUTTON_BACKGROUND, COLOR_GENERIC_BUTTON_BORDER, 4, 8, &(incrementBtn.rect.w), &(incrementBtn.rect.h), renderer);
|
||||
if(btnTexture == NULL)
|
||||
{
|
||||
fprintf(stderr, "WARNING: Can't create texture: %s\n", SDL_GetError());
|
||||
return false;
|
||||
}
|
||||
SDL_Texture* btnHoveredTexture = createGenericButtonTexture("+", font, 8, COLOR_GENERIC_BUTTON_BORDER, COLOR_GENERIC_BUTTON_BACKGROUND, 4, 8, &(incrementBtn.rect.w), &(incrementBtn.rect.h), renderer);
|
||||
|
||||
if(btnHoveredTexture == NULL)
|
||||
{
|
||||
fprintf(stderr, "WARNING: Can't create hover texture: %s\n", SDL_GetError());
|
||||
return false;
|
||||
}
|
||||
incrementBtn.texture = btnTexture;
|
||||
incrementBtn.hoverTexture = btnHoveredTexture;
|
||||
|
||||
// Decrementation Btn creation
|
||||
|
||||
P_Button decrementBtn = createButton(NULL, NULL, nbJoueurLabelPos.x+calculateStringPixelLenght(font, nbJoueurLabel.text)+32, nbJoueurLabelPos.y, 0, 0, NULL);
|
||||
btnTexture = createGenericButtonTexture("-", font, 8,COLOR_GENERIC_BUTTON_BACKGROUND, COLOR_GENERIC_BUTTON_BORDER, 4, 8, &(decrementBtn.rect.w), &(decrementBtn.rect.h), renderer);
|
||||
if(btnTexture == NULL)
|
||||
{
|
||||
fprintf(stderr, "WARNING: Can't create texture: %s\n", SDL_GetError());
|
||||
return false;
|
||||
}
|
||||
btnHoveredTexture = createGenericButtonTexture("-", font, 8, COLOR_GENERIC_BUTTON_BORDER, COLOR_GENERIC_BUTTON_BACKGROUND, 4, 8, &(decrementBtn.rect.w), &(decrementBtn.rect.h), renderer);
|
||||
|
||||
if(btnHoveredTexture == NULL)
|
||||
{
|
||||
fprintf(stderr, "WARNING: Can't create hover texture: %s\n", SDL_GetError());
|
||||
return false;
|
||||
}
|
||||
decrementBtn.texture = btnTexture;
|
||||
decrementBtn.hoverTexture = btnHoveredTexture;
|
||||
|
||||
//Draw everything
|
||||
drawButtonOnRenderer(renderer, &incrementBtn);
|
||||
drawButtonOnRenderer(renderer, &decrementBtn);
|
||||
drawTextLabel(renderer, &nbJoueurLabel);
|
||||
|
||||
//free
|
||||
freeTextLabel(&nbJoueurLabel);
|
||||
freeButton(&incrementBtn);
|
||||
|
||||
return true;
|
||||
}
|
@ -1,31 +1,116 @@
|
||||
#include "view/Settings.h"
|
||||
|
||||
void onClick(P_Button* buttonCaller) {
|
||||
printf("j'ai perdu %d\n",buttonCaller->rect.x);
|
||||
}
|
||||
|
||||
// Global functions
|
||||
|
||||
bool settingsView(SDL_Renderer* renderer, AudioHandler* ah) {
|
||||
SDL_Rect bg_area = {150,0,300,600};
|
||||
SDL_Rect title_area = {150,0,300,50};
|
||||
SDL_Color white = {255,255,255,255};
|
||||
SDL_Color blue = {52,158,235,255};
|
||||
SDL_Color black = {0,0,0,255};
|
||||
SDL_Texture* bg = NULL;
|
||||
TextLabel tmp_textLabel;
|
||||
bool settingsView(SDL_Window* parent, AudioHandler* ah, const FontHandler* fh) {
|
||||
SDL_Window* window;
|
||||
SDL_Renderer* renderer;
|
||||
if (0 != SDL_CreateWindowAndRenderer(300,600,SDL_WINDOW_SHOWN, &window, &renderer)) {
|
||||
fprintf(stderr,"Error when trying to create window or renderer: %s\n", SDL_GetError());
|
||||
return false;
|
||||
}
|
||||
SDL_Rect title_area = {0,0,300,50};
|
||||
SDL_Point title_point = {150,25};
|
||||
SDL_Point masterVolTitle_point = {150,75};
|
||||
SDL_Color white = {255,255,255,255};
|
||||
SDL_Color blue = {52,158,235,255};
|
||||
SDL_Color black = {0,0,0,255};
|
||||
int hMinus, wMinus, hPlus, wPlus;
|
||||
TextLabel* arr_textLabel = (TextLabel*)malloc(7*sizeof(TextLabel));
|
||||
SDL_Texture** arr_textures = (SDL_Texture**)malloc(2*sizeof(SDL_Texture*));
|
||||
P_Button tmp_button;
|
||||
char tmp_str[3];
|
||||
|
||||
if (arr_textLabel == NULL) {
|
||||
fprintf(stderr, "Can't allocate memory for text labels\n");
|
||||
return false;
|
||||
}
|
||||
|
||||
if (arr_textures == NULL) {
|
||||
fprintf(stderr,"Can't allocate memory for button textures");
|
||||
return false;
|
||||
}
|
||||
|
||||
if (0!=SDL_SetWindowModalFor(window, parent)) {
|
||||
fprintf(stderr,"Warning: Can't set window as modal: %s\n",SDL_GetError());
|
||||
}
|
||||
|
||||
SDL_SetRenderDrawColor(renderer, white.r, white.g, white.b, white.a);
|
||||
SDL_RenderClear(renderer);
|
||||
|
||||
SDL_SetRenderDrawColor(renderer, blue.r, blue.g, blue.b, blue.a);
|
||||
SDL_RenderFillRect(renderer,&title_area);
|
||||
arr_textLabel[0] = createTextLabel("Parametres", &title_point, 2.0, &black,
|
||||
fh->fonts[FONT_retro], renderer, POSX_CENTER, POSY_CENTER);
|
||||
drawTextLabel(renderer, &arr_textLabel[0]);
|
||||
|
||||
arr_textures[0] = createGenericButtonTexture("-",fh->fonts[FONT_retro],32,black,blue, 0, 5, &wMinus, &hMinus, renderer);
|
||||
arr_textures[1] = createGenericButtonTexture("+",fh->fonts[FONT_retro],32,black,blue, 0, 5, &wPlus, &hPlus, renderer);
|
||||
|
||||
/* Master volume */
|
||||
// Title
|
||||
arr_textLabel[1] = createTextLabel("Volume principal", &masterVolTitle_point, 1.25, &black,
|
||||
fh->fonts[FONT_retro], renderer, POSX_CENTER, POSY_CENTER);
|
||||
drawTextLabel(renderer,&arr_textLabel[1]);
|
||||
|
||||
// - button
|
||||
tmp_button = createButton(arr_textures[0], NULL, 0, arr_textLabel[1].textZone.y+arr_textLabel[1].textZone.h+20, wMinus, hMinus, onClick);
|
||||
drawButtonOnRenderer(renderer, &tmp_button);
|
||||
|
||||
SDL_CreateTexture(renderer, SDL_PIXELFORMAT_RGB888, SDL_TEXTUREACCESS_TARGET, 300,600);
|
||||
SDL_SetRenderTarget(renderer, bg);
|
||||
SDL_SetRenderDrawColor(renderer, white.r, white.g, white.b, white.a);
|
||||
SDL_RenderFillRect(renderer,&bg_area);
|
||||
// + button
|
||||
tmp_button = createButton(arr_textures[1], NULL, 270, arr_textLabel[1].textZone.y+arr_textLabel[1].textZone.h+20, wPlus, hPlus, onClick);
|
||||
drawButtonOnRenderer(renderer, &tmp_button);
|
||||
|
||||
SDL_SetRenderDrawColor(renderer, blue.r, blue.g, blue.b, blue.a);
|
||||
SDL_RenderFillRect(renderer,&title_area);
|
||||
tmp_textLabel = createTextLabel("Paramètres", &((SDL_Point) {150,50}), 1, &black,
|
||||
FONT_Curvilingus, renderer, POSX_CENTER, POSY_CENTER);
|
||||
// Current value
|
||||
sprintf(tmp_str, "%d", ah->masterVol);
|
||||
arr_textLabel[2] = createTextLabel(tmp_str, &((SDL_Point) {150, tmp_button.rect.y+tmp_button.rect.h/2}), 1.5, &black, fh->fonts[FONT_retro], renderer, POSX_CENTER, POSY_CENTER);
|
||||
drawTextLabel(renderer, &arr_textLabel[2]);
|
||||
|
||||
/* Music volume */
|
||||
// Title
|
||||
arr_textLabel[3] = createTextLabel("Volume musique", &((SDL_Point) {150, tmp_button.rect.y+tmp_button.rect.h+20}), 1.5, &black,
|
||||
fh->fonts[FONT_retro], renderer, POSX_CENTER, POSY_CENTER);
|
||||
drawTextLabel(renderer, &arr_textLabel[3]);
|
||||
|
||||
// - button
|
||||
tmp_button = createButton(arr_textures[0], NULL, 0, arr_textLabel[3].textZone.y+arr_textLabel[3].textZone.h+20, wMinus, hMinus, onClick);
|
||||
drawButtonOnRenderer(renderer, &tmp_button);
|
||||
|
||||
SDL_RenderCopy(renderer, bg, NULL, &bg_area);
|
||||
SDL_SetRenderTarget(renderer, NULL);
|
||||
SDL_RenderPresent(renderer);
|
||||
// + button
|
||||
tmp_button = createButton(arr_textures[1], NULL, 270, arr_textLabel[3].textZone.y+arr_textLabel[3].textZone.h+20, wPlus, hPlus, onClick);
|
||||
drawButtonOnRenderer(renderer, &tmp_button);
|
||||
|
||||
// Current value
|
||||
sprintf(tmp_str, "%d", ah->volMusic);
|
||||
arr_textLabel[4] = createTextLabel(tmp_str, &((SDL_Point) {150, tmp_button.rect.y+tmp_button.rect.h/2}), 1.5, &black, fh->fonts[FONT_retro], renderer, POSX_CENTER, POSY_CENTER);
|
||||
drawTextLabel(renderer, &arr_textLabel[4]);
|
||||
|
||||
/* SFX Volume */
|
||||
// Title
|
||||
arr_textLabel[5] = createTextLabel("Volume sons", &((SDL_Point) {150, tmp_button.rect.y+tmp_button.rect.h + 20}), 1.5, &black,
|
||||
fh->fonts[FONT_retro], renderer, POSX_CENTER, POSY_CENTER);
|
||||
drawTextLabel(renderer, &arr_textLabel[5]);
|
||||
|
||||
// - button
|
||||
tmp_button = createButton(arr_textures[0], NULL, 0, arr_textLabel[5].textZone.y+arr_textLabel[5].textZone.h+20, wMinus, hMinus, onClick);
|
||||
drawButtonOnRenderer(renderer, &tmp_button);
|
||||
|
||||
// + button
|
||||
tmp_button = createButton(arr_textures[1], NULL, 270, arr_textLabel[5].textZone.y+arr_textLabel[5].textZone.h+20, wPlus, hPlus, onClick);
|
||||
drawButtonOnRenderer(renderer, &tmp_button);
|
||||
|
||||
// Current value
|
||||
sprintf(tmp_str, "%d", ah->volSFX);
|
||||
arr_textLabel[6] = createTextLabel(tmp_str, &((SDL_Point) {150, tmp_button.rect.y+tmp_button.rect.h/2}), 1.5, &black, fh->fonts[FONT_retro], renderer, POSX_CENTER, POSY_CENTER);
|
||||
drawTextLabel(renderer, &arr_textLabel[6]);
|
||||
|
||||
|
||||
SDL_RenderPresent(renderer);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@ -0,0 +1,98 @@
|
||||
#include <SDL2/SDL.h>
|
||||
#include <stdio.h>
|
||||
#include "view/GameCreationMenu.h"
|
||||
#include "engine/FontLoader.h"
|
||||
#include "engine/TextInput.h"
|
||||
|
||||
int testCreationMenu(void) {
|
||||
SDL_Window *window = NULL;
|
||||
SDL_Renderer *renderer = NULL;
|
||||
SDL_Texture* picture;
|
||||
TextInput textInput;
|
||||
int statut = EXIT_FAILURE;
|
||||
char* path = "rsrc/img/Lenna.png";
|
||||
int i=0;
|
||||
int w, h;
|
||||
if(0 != SDL_Init(SDL_INIT_VIDEO))
|
||||
{
|
||||
fprintf(stderr, "Erreur SDL_INIT: %s\n", SDL_GetError());
|
||||
goto Quit;
|
||||
}
|
||||
|
||||
//fenetre
|
||||
window = SDL_CreateWindow("Fenêtre", SDL_WINDOWPOS_CENTERED, SDL_WINDOWPOS_CENTERED, 640,480, SDL_WINDOW_SHOWN);
|
||||
if(window == NULL)
|
||||
{
|
||||
fprintf(stderr, "Erreur SDL_CreateWindow: %s\n", SDL_GetError());
|
||||
goto Quit;
|
||||
}
|
||||
|
||||
//rendu
|
||||
renderer = SDL_CreateRenderer(window, -1, SDL_RENDERER_ACCELERATED);
|
||||
if(renderer == NULL)
|
||||
{
|
||||
fprintf(stderr, "Erreur SDL_CreateRenderer: %s\n", SDL_GetError());
|
||||
goto Quit;
|
||||
}
|
||||
|
||||
//Fonts
|
||||
if(TTF_Init() == -1)
|
||||
{
|
||||
fprintf(stderr, "Erreur: TTF_Init: %s\n", TTF_GetError());
|
||||
goto Quit;
|
||||
}
|
||||
|
||||
if(0 != SDL_SetRenderDrawColor(renderer, 0,0,0,0)) //choisi la couleur avec laquelle travailler
|
||||
{
|
||||
fprintf(stderr, "Erreur SDL_SetRenderDrawColor: %s\n", SDL_GetError());
|
||||
goto Quit;
|
||||
}
|
||||
|
||||
if(0 != SDL_RenderClear(renderer)) //efface le rendu en le repeignant avec la couleur choisi
|
||||
{
|
||||
fprintf(stderr, "Erreur SDL_SetRenderDrawColor: %s\n", SDL_GetError());
|
||||
goto Quit;
|
||||
}
|
||||
|
||||
if(0 != SDL_SetRenderDrawColor(renderer, 255,255,255,255)) //choisi la couleur avec laquelle travailler
|
||||
{
|
||||
fprintf(stderr, "Erreur SDL_SetRenderDrawColor: %s\n", SDL_GetError());
|
||||
goto Quit;
|
||||
}
|
||||
|
||||
|
||||
SDL_bool quit = SDL_FALSE;
|
||||
SDL_Event event;
|
||||
|
||||
FontHandler fontHandler = loadFonts();
|
||||
|
||||
SDL_GetWindowSize(window, &w, &h);
|
||||
while(!quit)
|
||||
{
|
||||
while(SDL_PollEvent(&event))
|
||||
{
|
||||
switch(event.type)
|
||||
{
|
||||
case SDL_QUIT:
|
||||
quit = SDL_TRUE;
|
||||
break;
|
||||
case SDL_MOUSEBUTTONUP:
|
||||
break;
|
||||
}
|
||||
}
|
||||
drawGameCreationMenu(renderer, fontHandler.fonts[FONT_retro], w, h);
|
||||
SDL_RenderPresent(renderer);
|
||||
|
||||
SDL_Delay(20);
|
||||
}
|
||||
|
||||
Quit:
|
||||
freeFonts(fontHandler);
|
||||
if(renderer != NULL)
|
||||
SDL_DestroyRenderer(renderer);
|
||||
if(window != NULL)
|
||||
SDL_DestroyWindow(window);
|
||||
TTF_Quit();
|
||||
SDL_Quit();
|
||||
return statut;
|
||||
}
|
Loading…
Reference in new issue