Patch from begasus to allow building under haiku and beos. The program is crashing when you launch it (segmentation violation).

I'm not sure the way to get the program directory we use is ok for beos, but the official way of doing that is using C++ code.
Maybe it's time to switch to some more unix way to store the config files...

This should also fix watcom build (very untested as i'm using mingw to cross compile windows builds now)
Also added begasus to the credits screen.


git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@325 416bcca6-2ee7-4201-b75f-2eb2f807beb1
This commit is contained in:
Adrien Destugues
2008-11-05 18:59:55 +00:00
parent b11d9e3ff9
commit 3422eeff46
10 changed files with 75 additions and 21 deletions

13
graph.c
View File

@@ -997,6 +997,7 @@ void Initialiser_mode_video(int Largeur, int Hauteur, int Fullscreen)
int Sensibilite_X;
int Sensibilite_Y;
int Indice;
int Facteur;
if (Largeur_ecran!=Largeur ||
Hauteur_ecran!=Hauteur ||
@@ -1011,7 +1012,6 @@ void Initialiser_mode_video(int Largeur, int Hauteur, int Fullscreen)
Largeur = (Largeur + 3 ) & 0xFFFFFFFC;
// Taille des menus
int Facteur;
if (Largeur/320 > Hauteur/200)
Facteur=Hauteur/200;
else
@@ -4484,13 +4484,14 @@ void Rectifier_coordonnees_a_45_degres(short AX, short AY, short* BX, short* BY)
// - une droite avec une pente de 45 degrés
{
int dx, dy;
float tan;
dx = (*BX)-AX;
dy = AY- *BY; // On prend l'opposée car à l'écran les Y sont positifs en bas, et en maths, positifs en haut
if (dx==0) return; // On est en lockx et de toutes façons le X n'a pas bougé, on sort tout de suite pour éviter une méchante division par 0
float tan = (float)dy/(float)dx;
tan = (float)dy/(float)dx;
if (tan <= 0.4142 && tan >= -0.4142)
{
@@ -5221,11 +5222,13 @@ void Tracer_rectangle_degrade(short RAX,short RAY,short RBX,short RBY,short VAX,
}
else
{
Degrade_Intervalle_total = sqrt(pow(VBY - VAY,2)+pow(VBX - VAX,2));
short a = (VBY - VAY)/(VBX - VAX);
short b = VAY - a*VAX;
short a,b;
int Distance_X, Distance_Y;
Degrade_Intervalle_total = sqrt(pow(VBY - VAY,2)+pow(VBX - VAX,2));
a = (VBY - VAY)/(VBX - VAX);
b = VAY - a*VAX;
for (Pos_Y=RAY;Pos_Y<=RBY;Pos_Y++)
for (Pos_X = RAX;Pos_X<=RBX;Pos_X++)
{