Skip to content
Snippets Groups Projects
Commit ef44b5a6 authored by Sanchez Alexandre's avatar Sanchez Alexandre
Browse files

[Linux] Version valide qui affiche avec la SDL

- Map 1 seulement
- pb avec la lecture des maps
parent dd977c1a
No related branches found
No related tags found
No related merge requests found
Pipeline #
......@@ -73,7 +73,7 @@ int main_SDL(char* Map)
pos_bouton_quitter.y=(HAUTEUR_CARTE*HAUTEUR_CASE-HAUTEUR_BOUTON)/2+HAUTEUR_BOUTON;
pos_bouton_continuer.y=(HAUTEUR_CARTE*HAUTEUR_CASE-HAUTEUR_BOUTON)/2-HAUTEUR_BOUTON;
guerrier = SDL_LoadBMP("../resources/guerrier.bmp");
guerrier = SDL_LoadBMP("../resources/Skins/guerrier.bmp");
if (!guerrier)
{
printf("Unable to load bitmap: %s\n", SDL_GetError());
......@@ -81,21 +81,21 @@ int main_SDL(char* Map)
}
SDL_SetColorKey(guerrier, SDL_SRCCOLORKEY, SDL_MapRGB(guerrier->format, 0, 0, 255));
bouton_continuer = SDL_LoadBMP("../resources/continuer.bmp");
bouton_continuer = SDL_LoadBMP("../resources/Skins/continuer.bmp");
if (!bouton_continuer)
{
printf("Unable to load bitmap: %s\n", SDL_GetError());
return 1;
}
bouton_quitter = SDL_LoadBMP("../resources/quitter.bmp");
bouton_quitter = SDL_LoadBMP("../resources/Skins/quitter.bmp");
if (!bouton_continuer)
{
printf("Unable to load bitmap: %s\n", SDL_GetError());
return 1;
}
mage = SDL_LoadBMP("../resources/mage.bmp");
mage = SDL_LoadBMP("../resources/Skins/mage.bmp");
if (!mage)
{
printf("Unable to load bitmap: %s\n", SDL_GetError());
......@@ -103,7 +103,7 @@ int main_SDL(char* Map)
}
SDL_SetColorKey(mage, SDL_SRCCOLORKEY, SDL_MapRGB(mage->format, 0, 0, 255));
voleur = SDL_LoadBMP("../resources/voleur.bmp");
voleur = SDL_LoadBMP("../resources/Skins/voleur.bmp");
if (!voleur)
{
printf("Unable to load bitmap: %s\n", SDL_GetError());
......@@ -112,7 +112,7 @@ int main_SDL(char* Map)
SDL_SetColorKey(voleur, SDL_SRCCOLORKEY, SDL_MapRGB(voleur->format, 0, 0, 255));
archer = SDL_LoadBMP("../resources/archer.bmp");
archer = SDL_LoadBMP("../resources/Skins/archer.bmp");
if (!archer)
{
printf("Unable to load bitmap: %s\n", SDL_GetError());
......@@ -120,7 +120,7 @@ int main_SDL(char* Map)
}
SDL_SetColorKey(archer, SDL_SRCCOLORKEY, SDL_MapRGB(archer->format, 0, 0, 255));
guerisseur = SDL_LoadBMP("../resources/guerisseur.bmp");
guerisseur = SDL_LoadBMP("../resources/Skins/guerisseur.bmp");
if (!guerisseur)
{
printf("Unable to load bitmap: %s\n", SDL_GetError());
......@@ -128,7 +128,7 @@ int main_SDL(char* Map)
}
SDL_SetColorKey(guerisseur, SDL_SRCCOLORKEY, SDL_MapRGB(guerisseur->format, 0, 0, 255));
plaine = SDL_LoadBMP("../resources/plaine.bmp");
plaine = SDL_LoadBMP("../resources/Skins/plaine.bmp");
if (!plaine)
{
printf("Unable to load bitmap: %s\n", SDL_GetError());
......@@ -136,7 +136,7 @@ int main_SDL(char* Map)
}
SDL_SetColorKey(plaine, SDL_SRCCOLORKEY, SDL_MapRGB(plaine->format, 0, 0, 255));
eau = SDL_LoadBMP("../resources/eau.bmp");
eau = SDL_LoadBMP("../resources/Skins/eau.bmp");
if (!eau)
{
printf("Unable to load bitmap: %s\n", SDL_GetError());
......@@ -144,7 +144,7 @@ int main_SDL(char* Map)
}
SDL_SetColorKey(eau, SDL_SRCCOLORKEY, SDL_MapRGB(eau->format, 0, 0, 255));
montagne = SDL_LoadBMP("../resources/montagne.bmp");
montagne = SDL_LoadBMP("../resources/Skins/montagne.bmp");
if (!montagne)
{
printf("Unable to load bitmap: %s\n", SDL_GetError());
......@@ -152,7 +152,7 @@ int main_SDL(char* Map)
}
SDL_SetColorKey(montagne, SDL_SRCCOLORKEY, SDL_MapRGB(montagne->format, 0, 0, 255));
foret = SDL_LoadBMP("../resources/foret.bmp");
foret = SDL_LoadBMP("../resources/Skins/foret.bmp");
if (!foret)
{
printf("Unable to load bitmap: %s\n", SDL_GetError());
......@@ -160,7 +160,7 @@ int main_SDL(char* Map)
}
SDL_SetColorKey(foret, SDL_SRCCOLORKEY, SDL_MapRGB(foret->format, 0, 0, 255));
Case_brillante = SDL_LoadBMP("../resources/case_brillante.bmp");
Case_brillante = SDL_LoadBMP("../resources/Skins/case_brillante.bmp");
if (!Case_brillante)
{
printf("Unable to load bitmap: %s\n", SDL_GetError());
......@@ -168,7 +168,7 @@ int main_SDL(char* Map)
}
SDL_SetColorKey(Case_brillante, SDL_SRCCOLORKEY, SDL_MapRGB(Case_brillante->format, 0, 0, 255));
Guerrier_select = SDL_LoadBMP("../resources/guerrier_select.bmp");
Guerrier_select = SDL_LoadBMP("../resources/Skins/guerrier_select.bmp");
if (!Guerrier_select)
{
printf("Unable to load bitmap: %s\n", SDL_GetError());
......
......@@ -78,20 +78,17 @@ int main()
/*init_jeu("../resources/Init_jeu.xml");*/
Terrain *Terrains_A;
char *Map_A = ExtraireCarte(4);
char *Map_A = ExtraireCarte(1);
printf("Map en version texte : %s\n", Map_A);
//Terrain *Terrains_A = Librairie_Terrains("../resources/Terrains.XML");
//printf("info Terrain: %d\n", Terrains_A[1].franchissable);
Terrains_A = Librairie_Terrains("../resources/Terrains.XML");
printf("info Terrain: %d\n", Terrains_A[1].franchissable);
Skins_Charac *Images_persos = Load_Skin_Charac("../resources/Skins.xml");
printf("Adresse du skin mage damaged : %s\n", Images_persos[0].charac_id);
//Skins_Charac *Images_persos = Load_Skin_Charac("../resources/Skins.xml");
//printf("Adresse du skin mage damaged : %s\n", Images_persos[0].charac_id);
Skins_Terrain *Images_terrains = Load_Skins_Terrain("../resources/Skins.xml");
printf("Adresse du skin montagne : %s\n", Images_terrains[2].terrain_default);
//Skins_Terrain *Images_terrains = Load_Skins_Terrain("../resources/Skins.xml");
//printf("Adresse du skin montagne : %s\n", Images_terrains[2].terrain_default);
main_SDL(Map_A);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment