diff --git a/divers.c b/divers.c index 0ce490f1..caec9a87 100644 --- a/divers.c +++ b/divers.c @@ -72,7 +72,13 @@ void Set_palette(T_Palette Palette) void Attendre_fin_de_click(void) { - puts("Attendre_fin_de_click non implémenté!\n"); + do + { + SDL_PumpEvents(); + puts("Attente fin clic..."); + } + while(SDL_GetMouseState(NULL, NULL)&(SDL_BUTTON(1) | SDL_BUTTON(2) | SDL_BUTTON(3))); //On attend tant que l'un des trois boutons est enfoncé + Mouse_K=0; } void Effacer_image_courante_Stencil(byte Couleur, byte * Pochoir) diff --git a/gfx2.cfg b/gfx2.cfg index a15e8851..d827fb22 100644 Binary files a/gfx2.cfg and b/gfx2.cfg differ diff --git a/init.c b/init.c index ee6408b2..2164905c 100644 --- a/init.c +++ b/init.c @@ -346,10 +346,10 @@ void Charger_DAT(void) Erreur(ERREUR_DAT_CORROMPU); #if __BYTE_ORDER == __BIG_ENDIAN + //Si on est en big endian il faut échanger les octets car la structure est prévue pour du x86. Mot_temporaire=bswap_16(Mot_temporaire); #endif -printf("%d Nb Lignes: %x ",Indice,Mot_temporaire); // On copie ce nombre de lignes dans la table: Table_d_aide[Indice].Nombre_de_lignes=Mot_temporaire; @@ -358,10 +358,10 @@ printf("%d Nb Lignes: %x ",Indice,Mot_temporaire); Erreur(ERREUR_DAT_CORROMPU); #if __BYTE_ORDER == __BIG_ENDIAN + //Si on est en big endian il faut échanger les octets car la structure est prévue pour du x86. Mot_temporaire=bswap_16(Mot_temporaire); #endif -printf("Taille: %x\n",Mot_temporaire); // On alloue la mémoire correspondante: if (!(Table_d_aide[Indice].Debut_de_la_liste=(byte *)malloc(Mot_temporaire))) Erreur(ERREUR_MEMOIRE); @@ -2018,7 +2018,11 @@ int Sauver_CFG(void) // Enregistrement des touches Chunk.Numero=CHUNK_TOUCHES; Chunk.Taille=NB_TOUCHES*sizeof(CFG_Infos_touche); - if (write(Handle,&Chunk,sizeof(Chunk))!=sizeof(Chunk)) + #if __BYTE_ORDER == __BIG_ENDIAN + //On remet les octets dans l'ordre "normal" + Chunk.Taille=bswap_16(Chunk.Taille); + #endif + if (write(Handle,&(Chunk.Numero),sizeof(byte))!=sizeof(byte)||write(Handle,&(Chunk.Taille),sizeof(word))!=sizeof(word)) goto Erreur_sauvegarde_config; for (Indice=0; Indice