-Save pixel ratio in infile

-Fix a bug if a wrong grid xor value was set (was mostly harmless)
-Some cleanup.


git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@1257 416bcca6-2ee7-4201-b75f-2eb2f807beb1
This commit is contained in:
Adrien Destugues
2010-01-16 16:31:03 +00:00
parent 70a61a07ef
commit 655116bd37
4 changed files with 25 additions and 5 deletions

9
misc.c
View File

@@ -731,6 +731,7 @@ void Zoom_a_line(byte* original_line, byte* zoomed_line,
#include <sys/sysinfo.h> // sysinfo() for free RAM
#endif
// Indique quelle est la mémoire disponible
unsigned long Memory_free(void)
{
@@ -786,6 +787,7 @@ short Round(float value)
return temp;
}
// Arrondir le résultat d'une division à la valeur entière supérieure
short Round_div_max(short numerator,short divisor)
{
@@ -795,12 +797,14 @@ short Round_div_max(short numerator,short divisor)
return (numerator/divisor)+1;
}
// Retourne le minimum entre deux nombres
int Min(int a,int b)
{
return (a<b)?a:b;
}
// Retourne le maximum entre deux nombres
int Max(int a,int b)
{
@@ -808,7 +812,6 @@ int Max(int a,int b)
}
// Fonction retournant le libellé d'une mode (ex: " 320x200")
char * Mode_label(int mode)
{
@@ -820,6 +823,7 @@ char * Mode_label(int mode)
return str;
}
// Trouve un mode video à partir d'une chaine: soit "window",
// soit de la forme "320x200"
// Renvoie -1 si la chaine n'est pas convertible
@@ -833,6 +837,5 @@ int Convert_videomode_arg(const char *argument)
return mode_index;
return -1;
}