Resolution and window size remembered in gfx2.ini. Gfx2.ini now uses hosts' end-of-line character(s)

Removed Gfx2.ini from SVN, since it's automatically re-created from Gfx2.dat as needed.


git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@202 416bcca6-2ee7-4201-b75f-2eb2f807beb1
This commit is contained in:
Yves Rizoud
2008-10-05 19:10:46 +00:00
parent e3bce08464
commit 54b4f5a121
8 changed files with 272 additions and 414 deletions

22
graph.c
View File

@@ -893,14 +893,27 @@ void Afficher_limites_de_l_image(void)
// Fonction retournant le libellé d'une mode (ex: " 320x200")
char * Libelle_mode(int Mode)
{
static char Chaine[9];
static char Chaine[24];
if (! Mode_video[Mode].Fullscreen)
return "window";
sprintf(Chaine, "%dx%d", Mode_video[Mode].Largeur, Mode_video[Mode].Hauteur);
Num2str(Mode_video[Mode].Largeur,Chaine,4);
Chaine[4]='x';
Num2str(Mode_video[Mode].Hauteur,Chaine+5,3);
return Chaine;
}
// Trouve un mode video à partir d'une chaine: soit "window",
// soit de la forme "320x200"
// Renvoie -1 si la chaine n'est pas convertible
int Conversion_argument_mode(const char *Argument)
{
// Je suis paresseux alors je vais juste tester les libellés
int Indice_mode;
for (Indice_mode=0; Indice_mode<Nb_modes_video; Indice_mode++)
if (!stricmp(Libelle_mode(Indice_mode), Argument))
return Indice_mode;
return -1;
}
//--------------------- Initialisation d'un mode vidéo -----------------------
@@ -1000,7 +1013,6 @@ void Initialiser_mode_video(int Largeur, int Hauteur, int Fullscreen)
break;
}
}
//Resolution_actuelle = ?
Menu_Taille_couleur = ((Largeur_ecran/Menu_Facteur_X)-(LARGEUR_MENU+2)) >> 3;
Menu_Ordonnee = Hauteur_ecran;