Sokoban  1.1.3
Le fameux jeu Sokoban, poussez les boîtes !
sdl2.h
Aller à la documentation de ce fichier.
1 /*
2 SDL2 interface data structures for Sokoban
3 Copyright (C) 2022, 2023 Efe ERKEN
4 
5 This file is part of Sokoban
6 
7 Sokoban is free software: you can redistribute it and/or modify
8 it under the terms of the GNU General Public License as published by
9 the Free Software Foundation, either version 3 of the License, or
10 (at your option) any later version.
11 
12 Sokoban is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 GNU General Public License for more details.
16 
17 You should have received a copy of the GNU General Public License
18 along with Sokoban. If not, see <https://www.gnu.org/licenses/>.
19 
20 SPDX-License-Identifier: GPL-3.0-or-later
21 */
22 
23 #ifndef SDL2_H
24 #define SDL2_H
25 
37 #include "SDL.h"
38 
46 typedef struct SDLContext
47 {
48  SDL_Window *window;
49  SDL_Renderer *renderer;
50  int width;
51  int height;
53 
54 extern SDLContext context;
55 
56 void sdl_init();
57 
58 void sdl_quit();
59 
60 #endif
struct SDLContext SDLContext
Structure contenant les informations pour l'affichage SDL2.
void sdl_quit()
Fonction qui referme la bibliothèque SDL2.
Definition: sdl2.c:82
void sdl_init()
Fonction qui lance SDL2 et crée une fenêtre.
Definition: sdl2.c:48
Structure contenant les informations pour l'affichage SDL2.
Definition: sdl2.h:47
SDL_Window * window
Pointeur sur la fenêtre.
Definition: sdl2.h:48
SDL_Renderer * renderer
Pointeur sur le renderer.
Definition: sdl2.h:49
int width
Largeur de la fenêtre.
Definition: sdl2.h:50
int height
Hauteur de la fenêtre.
Definition: sdl2.h:51