Commit 284b313e authored by Yassine BAHOU's avatar Yassine BAHOU
Browse files

Upload New File

parent 3edca7d9
// #include <math.h>
// #include <stdio.h>
// #include <SDL2/SDL.h>
// #include <string.h>
// #include <SDL2/SDL_image.h>
// #include <stdbool.h>
// #include "image.h"
// #include "matrice.h"
// #include "animationperso.h"
// // gcc *.c -o jeu -lSDL2 -lSDL2_gfx -lSDL2_image -lSDL2_ttf -lSDL2_mixer -lSDL2_net -lm
// int main(int argc, char* argv[])
// {
// if(SDL_Init(SDL_INIT_VIDEO) < 0)
// {
// SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "[DEBUG] > %s", SDL_GetError());
// return EXIT_FAILURE;
// }
// SDL_Texture * texture = NULL;
// SDL_Texture * texture_fond = NULL;
// SDL_Window * pWindow;
// SDL_Renderer * pRenderer;
// pWindow = SDL_CreateWindow("rendu",SDL_WINDOWPOS_CENTERED, SDL_WINDOWPOS_CENTERED, 20*32, 20*32, SDL_WINDOW_SHOWN);
// if (pWindow == NULL)
// {
// SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "[DEBUG] > %s", SDL_GetError());
// SDL_Quit();
// return EXIT_FAILURE;
// }
// pRenderer = SDL_CreateRenderer(pWindow, -1, SDL_RENDERER_ACCELERATED);
// if (pRenderer == NULL)
// {
// SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "[DEBUG] > %s", SDL_GetError());
// SDL_Quit();
// return EXIT_FAILURE;
// }
// texture=load_texture_from_image("mur.png",pWindow, pRenderer); /* creation de la texture qui contient l'image */
// texture_fond=load_texture_from_image("Back.png",pWindow, pRenderer);
// int** matrice =cree(20,20);
// fill_matrix(matrice,20,20);
// insert(matrice,1,1);
// insert(matrice,2,2);
// insert(matrice,3,1);
// insert(matrice,3,2);
// insert(matrice,3,3);
// play_with_texture_2(texture,texture_fond, pWindow,
// pRenderer, matrice);
// SDL_Delay(2000);
// insert(matrice,20,20);
// matrice[0][0]=0;
// play_with_texture_2(texture,texture_fond, pWindow,
// pRenderer, matrice);
// SDL_Delay(2000);
// // SDL_RenderCopy(pRenderer,texture,NULL,NULL); /* On copie la texture dans le render */
// //SDL_RenderPresent(pRenderer); /* On affiche le render */
// //SDL_Delay(5000);
// SDL_DestroyRenderer(pRenderer);
// SDL_DestroyWindow(pWindow);
// SDL_Quit();
// return EXIT_SUCCESS;
// }
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment